Code Example; Figure 22 Code Example For Usage Of Send_Rf_Telegram() - Infineon SP37 Function Manual

High integrated single-chip tpms sensor with a low power embedded microcontroller and wireless fsk/ask uhf transmitter
Table of Contents

Advertisement

2.38.9

Code Example

// Library function prototypes
#include "SP37_ROMLibrary.h"
void main()
{
// Return value of send RF telegram is stored in sendRF_StatusByte
signed char sendRF_StatusByte;
// Array for pattern descriptor table
unsigned char idata descriptorPtr[10];
// Start of table pattern indicator
// battery measurement enabled, no delay for delayOSC
descriptorPtr[0] = 0x80;
// Transmit type pattern descriptor
// Type: ASK, Manchester
descriptorPtr[1] = 0x10;
// Length: 14 bits
descriptorPtr[2] = 14;
// Data: 8 bits (7->0) transmitted: 01010101
descriptorPtr[3] = 0x55;
// Data: 6 bits (7->2) transmitted: 101001
descriptorPtr[4] = 0xA5;
// Transmit type pattern descriptor
// Type: FSK, Manchester
descriptorPtr[5] = 0x00;
// Length: 16 bits
descriptorPtr[6] = 16;
// Data: 8 bits (7->0) transmitted: 10101010
descriptorPtr[7] = 0xAA;
// Data: 8 bits (7->0) transmitted: 01010101
descriptorPtr[8] = 0x55;
// End of table pattern descriptor
descriptorPtr[9] = 0xF1;
// These tasks need to be done, details are application dependent
// RF Transmitter SFR Initialization
// Start xtal oscillator function call
// VCO tuning function call
// Start supply voltage function call (if required )
// Send RF telegram function call, baudrate = 9600 bit/s
sendRF_StatusByte = Send_RF_Telegram(9600, descriptorPtr);
//
Get supply voltage function call (if required)
}
Figure 22
Code example for usage of Send_RF_Telegram()
ROM Library Function Guide
Tire Pressure Monitoring Sensor
131
SP37
ROM Library Functions
Revision 1.0, 2011-12-15

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents