Download Print this page

Motorola USB08 Reference Manual: Interrupt And Reset Vector Module Vecjb8.c

Universal serial bus evaluation board using the mc68hc908jb8.
Hide thumbs

Advertisement

3.6 Interrupt and Reset Vector Module VECJB8.C

USB08 Evaluation Board
MOTOROLA
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 U08ADC.C, 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.
The file
VECJB8.C
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
Software Module Descriptions
Interrupt and Reset Vector Module VECJB8.C
contains the definitions of the interrupt vector table
Software Module Descriptions
Designer Reference Manual
49

Advertisement

Chapters

This manual also for:

Mc68hc908jb8

Comments to this Manuals

Symbols: 0
Latest comments: