Download GlucoBox System

Transcript
• RF_MANCHESTER_ERROR
• RF_LENGTH_ERROR
• RF_CRC_ERROR
• RF_ADDRESS_ERROR
• RF_RX_TIMEOUT
• RF_RSSI_ABSENT
Moreover, additional argument can automatically set RF IC to power down mode after
reception.
G.6
F IRMWARE LIMITATIONS
This version of RF protocol implementation has some limitations. These are:
• MICRF506 setup is defined once at compilation level in rf_setup.h
• optimization for low level routines is required or else receive process does not decode
data stream correctly – at this stage, Optimize Level 3 for rf_gen.c is required in
MPLAB C30 environment
G.7
E XAMPLE 1: SENDING A PACKET
#include "rf_service.h"
unsigned char test_packet[]="Salut12345";
unsigned char error;
void main(void)
{
RF_Init_Service(1);
RF_Powerdown();
RF_Set_TX_Power(6);
while(1)
{
error = RF_Send_Packet(
(uint8*)test_packet,
5, RF_COMMAND_NOACK,
RF_RECEIVER_ADDRESS,
RF_AUTO_POWERDOWN_ON);
DelayMs(2000);
}
}
91