News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Anyone with simple NRF24L01 example code?

Started by harddkyss, Apr 15, 2026, 09:04 PM

Previous topic - Next topic

harddkyss

I have a need for a few NRF24L01+ modules I have laying around ('Bout 20) I made some code but I'm not really happy with it, it does work but I think it's by chance it is. I know I'm missing a few things. I've searched on this forum and only found some code for a 12F675 (I think) I know Les made some code but he is at Expert level coding and that was waaaaay over my head and I didn't recognize the syntax at all, must be new.

I just need an extremely simple 1 byte packet for RX/TX using most of the defaults that are on the NRF24 upon power up, nothing crazy. The specific device I have is a 16F887 but can be any 28-40 pin 16F (Yea I know it's really old ;D ) If anyone has some known working code that would be very awesome!! I have a CLCD on PORTB and I'm using PORTD for SPI data and have individual development boards for TX/RX radio's. I'm using the LCD's to debug the code it really helps a lot!
I'm not using any libraries for now as it seems easier to debug 'till I get a solid working model. 18F devices are fine to, I think I have some laying around but for now would prefer 16F.
Thanks
Daniel H.

RGV250

Hi,
Did you find this, https://protoncompiler.com/index.php/topic,1920.msg14978.html#msg14978  it is written for 18F or enhanced 14 bit, I don't think the 16F887 will come into that category but might.

Regards,
Bob

harddkyss

Yea that's the one I was talking about that Les did, I don't recognize any of the syntax it would be very hard to troubleshoot should something go wrong. I searched high and low on here and didn't find anything. I even used AI for a month which helped a little but ended up going down a wild rabbit hole. There's tons of code for the little arduinos on google but I'm a PIC fan boy. ;)  surely an 8 bit pic could handle it, I just need to send a couple 10 bit ADC values once per second or higher.

I had some code few years ago and dropped my portable hard drive while it was running, you know those spinny things they use to have and you can just imagine what happened, I lost all of it, the code worked excellent, I torture tested it and it was great, easy, program and go. Now I'm fighting with files randomly becoming blank on SSD's and old age. Thank you for the help. :)

Gamboa

Hi harddkyss

I found this information in my files. I don't know if it will help you.

Best Regards,
Gamboa
Long live for you