Interesting Issue w/ Arduino Nano and nRF24L01+ Transceiver


I'm working on a project to get two ATmega328P chips to communicate with each other over the standard 2.4 GHz channel using transceivers that have the nRF24L01+ chips on them. I've gotten this to work using two Arduino Nanos, and have now moved on to using the ATmega328P Xplained Mini EVM to take the next step into integrating this project into a bare-bones circuit. I'm now trying to get one of these EVM modules to communicate with an Arduino Nano.

My problem is this: although I have gotten these transceivers to work before with the Arduino Nanos, I've stepped away from using Arduino-specific code (drivers that use Arduino commands, like TMRh20's RF24 driver) and am using standard embedded C-style drivers (link to GitHub below). Using these drivers, I've tried to run the code through the Arduino IDE using a main program file that's in Arduino-style, but the other drivers in embedded-C style. One particular thing that sticks out from this method is that I'm using a custom-written SPI driver and not the one Arduino provides. For some reason, when the transceiver is hooked up to the SPI pins and I try to connect the Arduino to the computer, the computer doesn't detect the Arduino (no COM port, doesn't show up at all in the Device Manager), the TX and RX lights remain on, and the board slowly gets extremely hot. I'm not sure if the ATmega328P on the Nano is getting hot or the FTDI chip on the underside. When I unplug all connections to the transceiver and plug in the Nano by itself, the board is detected like normal and stays cool. I should mention that I tried this with two different Arduino Nanos, so I don't believe the problem is with the boards. I've also switched between two cables, so I believe that rules out cables being the problem as well.

Furthermore, this is a new issue from today. Yesterday, the COM port was acting up occasionally and I would have trouble uploading and pulling up the Serial Monitor, but this would usually be fixed by unplugging the wire and plugging it back in.

My question: could programming an Arduino using the standard AVR style of coding to configure the SPI pins cause some conflict with how the USB communicates with the computer? I've looked around online and have found forum posts of people using Arduino's SPI library and having a similar problem, but when I first did this with the two Nanos, I used Arduino's SPI library and had no software issues.

Here is the link to the GitHub repo of the person that wrote the nRF24L01+ driver and the SPI driver. I figure this would be cleaner than attaching all the code to the post.

Thank you in advance for your help and time!

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.