While browsing the arduino forum, I came across this site that wrote about several methods to have serial communications to the attiny. Since I only have CSN & CE pins free when the nRF24L01 is not transmitting, I decide to go with the TinyDebugSerial method of serial output. This method will use the attiny85 PB3 pin and transmit to the Serial-TTL receiver or an Arduino.
You can use a USB-Serial TTL module or an Arduino to receive the serial transmitted by the attiny and only use one pin on the attiny. Since I have an extra USB FTDI to Serial TTL breakout board, I will use this board and also power up the attiny and nRF24L01 using the on-board selectable 5V/3.3V regulator. Choose 3.3V jumper as the nRF24L01 can only take up to 3.8V only.
|attiny/nRF24L01 with FTDI BoB|
|attiny to USB-Serial TTL|
TinyDebugSerial mySerial = TinyDebugSerial();
// Put this in setup()
mySerial.begin( 9600 );
// Put this in loop()
The rest of the code is at the github repo under libraries/mirf85/examples at the link below.
When I tried to compiled it, I got the following compilation errors due to using an older version of WinAVR on Windows or older avr-gcc on Mac OSX software on the Arduino IDE 1.0.1.
"R_AVR_13_PCREL against symbol `exit' defined in .fini9 section in"
Here are the links to the fixes and I will not rewrite it here... it have to do with an updated ld file for the avr.
Windows fixes :- Arduino Forum
Max OSX fixes :- Arduino Forum
Once the above fixes is applied, I was able to see serial output on my USB-Serial on the serial monitor or any terminal program.
Summary Links :-
- Updated github repo with TinyDebugSerial
- Serial Comms with attiny
- Atmel AVR TinyISP
- Attiny cores https://code.google.com/p/arduino-tiny/
- Window fixes for R_AVR_13_PCREL
- Mac OSX fixes for R_AVR_13_PCREL