Designer Reference Manual
USB08 Evaluation Board
114
Source Code Files
MOTOROLA
Source Code Files
void delayHalfBit() {
// subtract ~20 Clocks for Overhead!
// 120 * 5 Clocks = 600 Clocks
_asm("\
lda #120
\n\
__dhbl:deca
\n\
nop
\n\
bne __dhbl
\n\
");
}
void delayBitTime() {
delayHalfBit();
delayHalfBit();
}
//----------------------------------------------------------------------------
void initSSCI() {
setTxHigh();
// set Output Data Latch H
enaTxOut();
// enable Output Driver for Tx
enaRxIn();
// Rx is an Input Line
}
//----------------------------------------------------------------------------
void putSSCI(char c) {
unsigned char n;
unsigned char ccr_save;
//
ccr_save = getCCR();
// save current Interrupt Mask
//
disableINTR();
// disable Interrupts
setTxLow();
// send Startbit
delayBitTime();
n=8;
do {
// send 8 Databits, LSB first
if((c&1)==0)
setTxLow();
else
setTxHigh();
delayBitTime();
c >>= 1;
} while(--n);
setTxHigh();
// send Stopbit
delayBitTime();
delayBitTime();
//
setCCR(ccr_save);
// restore previous Interrupt Mask
}
Содержание MC68HC908JB8
Страница 2: ...blank ...
Страница 6: ...Designer Reference Manual USB08 Evaluation Board 6 List of Sections MOTOROLA List of Sections ...
Страница 16: ...Designer Reference Manual USB08 Evaluation Board 16 List of Tables MOTOROLA List of Tables ...
Страница 42: ...Designer Reference Manual USB08 Evaluation Board 42 Hardware Description MOTOROLA Hardware Description ...
Страница 88: ...Designer Reference Manual USB08 Evaluation Board 88 USB08 Descriptors MOTOROLA USB08 Descriptors ...
Страница 243: ...blank ...