AN2262 Motorola / Freescale Semiconductor, AN2262 Datasheet - Page 84

no-image

AN2262

Manufacturer Part Number
AN2262
Description
Wireless HC08 Modem
Manufacturer
Motorola / Freescale Semiconductor
Datasheet
AN2262/D
////////////////////////////////////////////////////////////////
// overflow interrupt toggles the data bit to achieve Manchester coding
#pragma TRAP_PROC
void RFTimerOv_Int(void)
{
}
/////////////////////////////////////////////////////////////////////////////
// output compare interrupt, all tango transmission is done here
#pragma TRAP_PROC
void RFTimerTxd_Int(void)
{
#define nextBit BIT(&txChar,7)
84
RFTimerCTRL;
RFTimerCTRL_TOF = 0;
// note: we don’t serve the interrupt always, in some cases we prefer to
// re-call this function immediatlly.
// any bits to send ?
if(txBits)
{
}
// !txBits => time to special ctl TX
else
{
// no bit for next time, process next data only if no special TX request is pending
// serve the interrupt
RFTimerTXD; RFTimerTXD_CHF = 0;
// prepare next bit
RFTimerTXD_ELSA = nextBit;
// any bit for next time ?
if(--txBits)
// if there is one, it gets processed next time because of txBits==0
else if(!(rfFlgs.all & SPECIALTX_MASK))
{
}
// tail = long non-manchester one
// yes, prepare it
txChar <<= 1;
RF_TxChar_Int();
// any next bits ?
if(!txBits) // no more data for next round
{
}
// send tail
txBits = 1; // send one more bit for Romeo2
txTail = 1;
// ctrl reg. bulk read, needed for correct function of timer
// just for the case
Wireless HC08 Modem
// output compare, set/clear on compare (1:x)
/* clearing RFTimer CH1 flag */
MOTOROLA

Related parts for AN2262