Motorola USB08 Reference Manual page 115

Universal serial bus evaluation board using the mc68hc908jb8
Table of Contents

Advertisement

//----------------------------------------------------------------------------
char getSSCI() {
char c;
unsigned char n;
unsigned char ccr_save;
//
ccr_save = getCCR();
//
disableINTR();
while(tstRxLvl()!=0) ;
delayHalfBit();
n=8;
do {
delayBitTime();
c >>= 1;
if(tstRxLvl()!=0)
c |= 0x80;
} while(--n);
delayBitTime();
if(tstRxLvl()==0) {
// add framing error
// handling if desired
}
delayHalfBit();
//
setCCR(ccr_save);
return c;
}
//============================================================================
USB08 Evaluation Board
MOTOROLA
// save current Interrupt Mask
// disable Interrupts
// wait for H-L transition
// get 8 Databits
// check Rx Line during Stopbit
// restore previous Interrupt Mask
Source Code Files
Source Code Files
Contents
Designer Reference Manual
115

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mc68hc908jb8

Table of Contents