Motorola USB08 Reference Manual page 114

Universal serial bus evaluation board using the mc68hc908jb8
Table of Contents

Advertisement

Source Code Files
void delayHalfBit() {
// subtract ~20 Clocks for Overhead!
// 120 * 5 Clocks = 600 Clocks
_asm("\
lda #120
__dhbl:deca
nop
bne __dhbl
");
}
void delayBitTime() {
delayHalfBit();
delayHalfBit();
}
//----------------------------------------------------------------------------
void initSSCI() {
setTxHigh();
enaTxOut();
enaRxIn();
}
//----------------------------------------------------------------------------
void putSSCI(char c) {
unsigned char n;
unsigned char ccr_save;
//
ccr_save = getCCR();
//
disableINTR();
setTxLow();
delayBitTime();
n=8;
do {
if((c&1)==0)
setTxLow();
else
setTxHigh();
delayBitTime();
c >>= 1;
} while(--n);
setTxHigh();
delayBitTime();
delayBitTime();
//
setCCR(ccr_save);
}
Designer Reference Manual
114
\n\
\n\
\n\
\n\
Source Code Files
// set Output Data Latch H
// enable Output Driver for Tx
// Rx is an Input Line
// save current Interrupt Mask
// disable Interrupts
// send Startbit
// send 8 Databits, LSB first
// send Stopbit
// restore previous Interrupt Mask
USB08 Evaluation Board
MOTOROLA

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mc68hc908jb8

Table of Contents