Hello,
I am using SpenceKonde's attiny core for the 861a and nRF24L01 modules with the RF24 library.
I want to get 2 nRF24L01's connected. I have done this when the nRF's are each connected to arduino Uno's. I adapted the GettingStarted code provided with the RF24 library to do this. Then, I modified that example to send button data, and potentiometer data through the nRF24's. It worked great, but I need to shrink my project, and I have a bunch of attTiny 861s. However, when I adapt my Uno code for the t861s( all I need to change are pin numbers), the nRF's don't connect to each other at all.
So, I'm going as simple as I can to establish how to use a t861 with the nRF: I wrote bare-bones code for a Uno to transmit to a 861. No extra features, the only things that happen are theUno sends a payload, then the 861 reads the payload and sends it right back to the Uno. The 861 has no serial monitor, but if I send the data back to the Uno, I could confirm that the 861 was receiving correctly.
I'm confident in my circuit. I'm a bit scared that there are no other examples of the 861 being used with the nRF24. So maybe the trick to using a t861 with an nRF24 hasn't been found. Importantly, the RF24 library does not have pin defines for the ATTINY861, as it does the t85 and 2313. I am no expert but that seemed the case, and may mean this project is dead in the water. Additionally, the 861 has a USI not hardware SPI. This the MOSI/MISO pins are actually DO/DI pins. These pins definitions can change which one is MOSI/MISO. Luckily, it seems this happens when the RF24 is a slave, and that never happens for me. EDIT: Rookie mistake here, when the t861 gets programmed through ISP, it is a slave. And, the 861 pinout diagram in the datasheet shows the slave ISP connections. So, the pinout diagram's labels of MOSI and MISO is for slave mode. Thus, when my sketch used the t861 as a master, I was using the wrong pins. I permanently switched them. See post below for the second error that had me stuck.
So that has been in the back of my mind. I switch MOSI/MISO when I flash a new sketch, but it never works. Finally, I'm worried that the DO/DI defines would need to be switched in the RF24 library for that swap to work, not just at the pin header.
I cannot get the radios to give even a hint of connection when I use the 861. Hopefully, someone out there knows about this? I got in over my head
Finally, I will post a circuit if you request it. The UNO hooks up to the nRF through the ICSP header(setup worked when i used 2 Uno's) and the 861 has MISO,MOSI,SCK, CE, and CSN plugged in, as well as VCC/GND. Reason I didn't, is because the 861 doesn't have a fritzing schematic.
AtTiny861Rx.ino (2.17 KB)
UnoTX.ino (2.78 KB)