![Silicon Laboratories Si4012 Programming Manual Download Page 19](http://html1.mh-extra.com/html/silicon-laboratories/si4012/si4012_programming-manual_1272046019.webp)
AN746
Rev. 0.1
19
5.2.4. Packet Transmission (TX)
Since the radio configuration happened according to the empty project, the only remaining task is to send packets
with the Si4012_SendPacket(U8 bButtonNumber) function. Having done the radio configuration, SM_STEP2 waits
for push button actions. Three different kinds of packets can be sent by pushing button1, button2, and button3.
When a button is pushed, the appropriate LED on the LCD base board will blink once. The same packet will be
sent over the air three times shortly after one another. After one packet has been sent successfully, the RF Pico
board LED will blink once.
The following figure illustrates the packet structure used in this sample project.
The CRC field is calculated over the CHIP ID, the button info, and the rolling counter to ensure error-free packet
reception. The two-byte CRC is implemented in the CRC.h module by CRC_CalculateCRC16(U8* pbInputData, U8
bLengthOfInputData) function. The Si4012 related functions are implemented in the Si4012.h module. These
functions can manipulate the radio such as turn off/on the radio chip, start/stop the different transmit modes (CW/
PN9), send packets using the built-in FIFO, and set the internal properties via the radio’s Application Programming
Interface (API). The API offers the option to access all of the radio’s internal properties. The host MCU is
connected to the radio via SMBus. The SMBus related functions, which can provide access to the API, can be
found in SMBus.h module under the drivers folder. The packet to be sent, including the preamble and the sync
word pattern, are filled in the FIFO of the radio by the host MCU. The sample code related functions are listed
below.
PREAMBLE
SYNC WORD
CHIP ID
Button info
Rolling Counter
CRC
13 byte
2 byte
4 byte
1 byte
2 byte
2 byte
Summary of Contents for Si4012
Page 14: ...AN746 14 Rev 0 1...
Page 18: ...AN746 18 Rev 0 1...
Page 29: ...AN746 Rev 0 1 29 NOTES...