-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed inconsistent documentation, added Tinyx313 pin map #155
Conversation
The ATTiny is a bit confusing, I think because of the labeling of the MISO/MOSI pins. Technically the Master-In-Slave-Out (MISO) pin on one device should be connected to the Master-Out-Slave-In (MOSI) pin on the other device. It seems the labeling standards generally dictate that this is actually reversed on one device, so users can simply connect MISO to MISO and MOSI to MOSI. If you take a look at this pinout you will see it lists the pins differently than in this updated documentation. The other part of this is that this document has been changed a couple of times due to the information posted above. I have some ATTiny devices, but can't remember the answer off-hand, so if anybody can add some info or opinions here, it would probably help. |
It is confusing because MOSI and MISO are swapped in tiny datasheets (as if tiny is a slave device), but DI (Data In) and DO (Data Out) labels tell actual pin functions. |
Lol. Thanks for the info, I think the DI/DO labels pretty much give us the answer but I'm still a bit confused over the labeling, so I'll try to show my work/thinking. On Uno, MISO (DI) is pin 12, and is listed as connecting to nrf pin 7 (MISO). This leads me to believe that the nrf is following the standard, and the nrf MISO labeled pin is the DO pin. If you look at this nrf24l01 pinout it lists the nrf24l01 pin6 as MOSI (DI) and nrf pin 7 as MISO (DO). So if we compare the UNO to the ATtiny, and use the same standard, the DI pin of the tiny (MOSI above) should connect to nrf pin 7 (MISO/DO). Using the same logic, and looking at the existing documentation for the ATtiny24/44/84, it looks like pin8 is DO so it should be connected to nrf pin 6 (MOSI/DI). In the end however, if my logic is flawed, you can simply trace the wiring from the ATtiny to the nrf24l01 and tell me which pin numbers are actually connected when it is working, and I will do the same as soon as I can. |
Well, NRF can only be a slave device, and it will output data to its Master In Slave Out pin and input it from Master Out Slave In. |
With the Arduino SPI library, the MCU is always SPI master. The MISO and MOSI functionality remains static, while the slave is selected using the SS/CS pin. Double checking my work, it looks like I was referencing your updated document the whole time, which means we are in agreement. ATtiny 2313: ATtiny 45: Attiny 44: I still do want to double check the wiring myself, just because I know this has changed a couple times, and I want this to be the last. 🍺 |
Dynamic payloads were left disabled by default on ATtiny while being enabled by default for everything else. Confirm ATtiny pins for documentation per nRF24/RF24#155
Fixed inconsistent documentation, added Tinyx313 pin map
@zador-blood-stained Thanks for taking the time to not only point this out, but to fix the documentation also! |
This finishes Tiny2313/4313 support by adding pin configuration documentation. Also fixed some incorrect pin names and numbers in other ATtinys doc.