I have been searching for low cost wireless boards in the past few months to interface with PIR detectors & temperature sensors to create a small wireless network at home, and I have found the following product :
I bought some (via www.wayengineer.com), and only found limited number of documents describing them (mostly the datasheet on stcmcu.com).
The schematics were found on : http://www.electrodragon.com/w/index.php?title=NRF24L01_UART_w/STC15F204_IC
The 8051 core only has Timers/ADC/Interrupts – Serial interface has to be software emulated (example provided in the datasheet)
And around the same time, Ishan Kehribar (Little Wire…) submitted the following code for nrf24l01 : https://github.com/kehribar/nrf24L01_plus . That library is simple to port and only consist in 4 files (nrf24.c / nrf24.h / nRF24L01.h and radioPinFunctions.c ). I decided to use it and port (? only radioPinFunctions.c has to be changed…)
After some tests/trials/bugs etc.. trying to get sdcc to work (I used version 3.3.0), here is the result (MCU@18.432 Mhz, Serial @9600bps) :
TX device :
> TX device ready > Tranmission went OK > Retranmission count:2 > Tranmission went OK > Retranmission count:0 > Tranmission went OK > Retranmission count:0 > Tranmission went OK > Retranmission count:0 > Tranmission went OK > Retranmission count:0
RX device :
> RX device ready > 00 AA 55 00 > 00 AA 55 01 > 00 AA 55 02 > 00 AA 55 03 > 00 AA 55 04 > 00 AA 55 05 > 00 AA 55 06 > 00 AA 55 07 > 00 AA 55 08 > 00 AA 55 09
Code is currently using around 1.5KB (1K for the nrf24 lib, 128b for the soft UART). You can download it here.
I will play with the external interrupts and Power Down modes later to interface with the PIR detectors / Temp sensors / ADC…
August 2013 : I have added code to monitor power batteries (via ADC), powerdown wakeup via port interrupt, DS1820 with a onewire library Code is here.
Schematics (TX) :