RFM12 – Wireless Transceiver Module Demo using pic microcontoller
This project shows how to do wireless communication with the RFM12 tranceiver modue in combination with a PIC microcontroller.
The RFM12 is a low costing ISM band FSK transceiver module. There are different module variants available which support different frequency bands: 315/433/868/915MHZ. The module has an SPI interface for communication with a microcontroller.
For this demo project I used a PIC18F458 and a RFM12 module with 433 MHz. But with some small modifications it will also work for other PIC micros or RFM12 moduls with other frequency bands.
The connection of the RFM12 tranceiver module is very simple. It just needs
- a power supply (2.2V – 5.4V)
- a 10k pull-up to Vdd on the FSK/DATA/nFFS pin
- antenna (simple wire with 17 cm length for 433MHz)
- 4 pins for SPI communication (SDI, SDO, SCK, nSEL)
- optinal: one interrupt pin (nIRQ, not used in this demo)
For this demo two microcontroller boards with one RFM12 on each board is required. One acts as transmitter, the other one as receiver.
The driver which is used in this project is mainly based on a RFM12 driver written for an AVR microcontroller (see link).
I have ported the code to the PIC world. The driver can be compiled with the CCS C compiler and the Microchip C18 compiler.
If you use the RFM12 driver in your project, you might use another PIC or use different pins for the connection of the RFM12 module. For configuring the driver to your project needs, you need to adapt the driver configuration header file rfm12conf.h.
For more detail: RFM12 – Wireless Transceiver Module Demo
JLCPCB – Prototype 10 PCBs for $2 (For Any Color)
China’s Largest PCB Prototype Enterprise, 600,000+ Customers & 10,000+ Online Orders Daily
How to Get PCB Cash Coupon from JLCPCB: https://bit.ly/2GMCH9w