Software Module Descriptions
Interrupt and Reset Vector Module VECJB8.C
USB08 Evaluation Board
Designer Reference Manual
MOTOROLA
Software Module Descriptions
49
The main program loop uses this operational sequence:
1. An analog-to-digital (A/D) conversion is performed. One of three
conversion channels is updated in each cycle run. This procedure
was selected because the transformation, with the simple ADC
software implemented in the module
, takes several
milliseconds.
2. Subsequently, the delivery of an 8-byte data telegram by the input
pipe is accomplished. This length was chosen because it
corresponds to the number of bytes sent by the PC program.
The necessary information for the control of the three LEDs is
contained in the first three bytes. If the received byte is 0, the
respective LED is switched off; otherwise, it is switched on.
3. To send an answer telegram back at the host PC, first fill the send
buffer utilizing the first six bytes of the eight bytes available. In the
first three bytes, the status of the input keys is coded. The next
three bytes transmit the last values of the three analog converter
channels.
4. Now the function putPipe() is called eight times to send the data
telegram. Afterward, the entire cycle run is repeated.
All further program functions, in particular the communication via USB
and the processing of the push button events, are processed by interrupt
functions.
3.6 Interrupt and Reset Vector Module VECJB8.C
The file
contains the definitions of the interrupt vector table
placed at the end of the M68HC08 memory map. The entries in this table
are the start addresses of the respective interrupt service routines. The
MC68HC908JB8 uses eight (7 + 1) vectors. The last, highest position
(address 0xFFFE/0xFFFF) is used by the reset vector.
In the USB08 reference design, the key pad interrupts of the input/output
(I/O) port A are used as well as the USB interrupts in case the USB
implementation was activated. The other interrupt vectors refer to an
empty dummy interrupt service routine (ISR). This dummy ISR is
Содержание 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 ...