PIC18LF2550 2.4GHz Serial Link

I wanted to make a wireless serial link that would allow me to send and receive data between Microchip PIC microcontrollers and a computer. I found some very useful information and some helpful code for utilizing a Laipac TRW-24G 2.4GHz wireless transceiver with a PIC16F88 as a wireless serial link. The PIC16F88 is a nice little chip that provides a number of useful features (including an onboard USART and the ability to use a bootloader). I am a fan of the PIC16F88; however, I believe that the PIC18 series are much more robust, so I created a circuit that would allow much more flexibility in design and deployment. This project is a relatively simple circuit that utilizes a PIC18LF2550 microcontroller and the Laipac TRW-24G 2.4GHz transceiver to create a wireless serial link.

Full circuit

The source and firmware for the circuit can be found at the bottom of the page. Each section of the circuit is labeled in the schematic above. All of the sections and their components are described below. The part numbers for the components are linked to websites for data and more information when available.

Power Supply

The power supply uses a 9 volt battery and a TC1264-3.0V high-accuracy low-dropout linear voltage regulator to provide a stable 3 volt supply for the microcontroller and the transceiver. A 1uF (microFarad) polarized decoupling capacitor is necessary on the output of the voltage regulator to prevent spikes or ripples. A wall wart power supply as low as 3.3V can be substituted for the 9 Volt battery.

RF-24G Transceiver

The Laipac TRW-24G 2.4GHz transceiver uses a Nordic Semiconductor nRF2401a transceiver chip and includes all of the necessary components. The TRW-24G (also called the RF-24G and TXRX24G) requires a 3 Volt power supply and 3 Volt logic, so running the circuit at 5 volts is not a viable option. Information on the chip’s interface cam be found in the following data sheets:
http://www.sparkfun.com/datasheets/RF/RF-24G_datasheet.pdf
http://www.sparkfun.com/datasheets/RF/RF-24G.pdf
http://www.sparkfun.com/datasheets/RF/nRF2401rev1_1.pdf
https://www.sparkfun.com/datasheets/RF/RF-24G.pdf

Microcontroller

The microcontroller used was a Microchip PIC18LF2550. I modified the PIC18F2550 Tiny PIC Bootloader assembly file so I could use a 10MHz crystal/resonator at 57,600 baud (the modified bootloader can be found at the bottom of the page). The PIC18LF2550 runs at a maximum speed of 16MHz (4 MIPs) with a 3 Volt power supply; however, I had 10MHz and 20MHz ceramic resonators on-hand, so I ran at the fastest ‘safe’ speed possible (I could overclock the PIC by running it at 20MHz with a 3 volt supply, but it would be running out of spec. so it may not operate reliably). The firmware was written in C (using CCS PICC) and can be found at the bottom of the page, in addition to a generic RF-24G driver for Laipac TRW-24G 2.4GHz transceivers. R1 is a pull-up resistor necessary for operation. C1 is a stabilizing capacitor that is used for the onboard USB voltage regulator (which is not utilized in this project). The component marked ‘RES’ is a 10MHz resonator.

RS232 Level Converter

A MAX233 was used to convert the logic level signals of the PIC18F2550 to RS-232 compatible voltage levels. The MAX233 is running at 3 Volts, which is under the nominal operating voltage of 5 Volts; however, the circuit design would necessitate an additional voltage regulator (for the 5 Volt supply) and repeated testing found no problems with communication performance. It is a little hypocritical of me to use the “running out of spec.” argument for the microcontroller, but not for the RS232 level converter; however, the MAX233 was the only chip I had on-hand and there are 3V RS-232 transceivers available (including the MAX3323E), which can easily be substituted.

Source and Firmware

The PIC must initially programmed with the ‘SAC_tinybld18F2550_10MHz_57600′ hex file to program the bootloader on the PIC. Then, using Tiny PIC Bootloader, the ’18LF2550 RF-24G Serial’ hex file can be placed on the chip using the Tiny PIC Bootloader frontend with ’12h 34h 56h 78h 90h’ in the ‘List of codes to send first:’ in the ‘Options’ menu. Please feel free to contact me if you have any problems.
SAC_tinybld18F2550_10MHz_57600.asm (hex)
18LF2550 RF-24G Serial.c (hex)
RF-24G.c