create new tag
, view all tags
The function initialising the transceiver module consists of a series of SPI writes to various registers of the module which determine how it will operate. Each register is mentioned in the code whether it was used in the firmware or not, to allow for the user to have a general understanding of what the registers do without having to refer to the relevant paperwork. The most important part of this function is right at the start.

write(0x07, 0x81); // Reset register values on RFM22B

There is a delay inserted which gives time for the transceiver module to ‘wake up’ before any information is written. Then a command is sent to clear all of the register before any of the settings are changed. This ensured that every desired register write is executed properly. Although the settings on the transceiver module are fully customisable, the firmware uses the following settings:

Function / Description Default Firmware
Transmission Rate 40 kbps 200 kbps
Transmission Frequency 995 MHz 434 MHz
Peak Frequency Deviation 20 KHz 26 KHz
Transmission Power -1 dBm 2 dBm
Preamble Length 4 Bytes 2 Bytes
Modulation Type Unmodulated carrier Frequency Shift Keying
Mode Direct Mode FIFO Mode
Automatic Packet Handling Enabled Enabled

Before the main loop of the program is entered, the rx_mode function is called to ensure that the default state of the device is awaiting a packet. The rx_mode function is detailed in the ‘Receiving’ section.

Topic revision: r2 - 2012-05-01 - AhmetSekercioglu
This site is powered by the TWiki collaboration platformCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback