Designer Reference Manual
USB08 Evaluation Board
98
Source Code Files
MOTOROLA
Source Code Files
// Things that should be done immediately after Reset
// (this is called by the C-Startup Module)
//
void _HC08Setup() {
CONFIG = 0x21;
// USB Reset Disable, COP Disable
TSC = 0x00;
// clear TSTOP, Prescaler=0
}
//----------------------------------------------------------------------------
// Dummy Interrupt Handler
// Place a Breakpoint here in case you are looking for spurious Interrupts
//
@interrupt void isrDummy() {
nop();
// just for Debugging
}
//----------------------------------------------------------------------------
void main() {
uchar n, a;
uchar io_buffer[8];
uchar adc[3];
initPipe();
// init RS232 or USB Pipe
initLED();
// init LED Output
initKey();
// init Key Input
initSADC();
// init Soft ADC
cli();
a = 0;
while(1) {
// update ADC results (1 out of 3 at one time)
adc[a] = getSADC(a+1);
if(++a==3) a=0;
// get data from input pipe
n=0;
do {
io_buffer[n++] = getPipe();
} while(n<8);
// process input data
if(io_buffer[0]==0) offLED(1);
else onLED(1);
if(io_buffer[1]==0) offLED(2);
else onLED(2);
if(io_buffer[2]==0) offLED(3);
else onLED(3);
Содержание 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 ...