General Structure Of The M68Hc08 Firmware - Motorola USB08 Reference Manual

Universal serial bus evaluation board using the mc68hc908jb8
Table of Contents

Advertisement

Software Module Descriptions

3.3 General Structure of the M68HC08 Firmware

Designer Reference Manual
44
The firmware of the M68HC08 consists of several source code modules
which are embedded into a common compiler project. The main()
function is contained in the module U08MAIN.C. It controls the program
sequence via an endless loop (as usual in embedded software). The
module
U08KEY.C
settles the scanning of the input keys. Control of the
light-emitting diodes (LED) on the board is done using simple C macros;
no special C module is required for this purpose. The module
U08ADC.C
is responsible for reading of the resistive sensors.
These modules are supported by the file VECJB8.C, which contains the
interrupt and reset vectors. The four C source code modules are merged
into a common compiler project. In addition, the assembler module
CRTSJB8.S
which contains the C startup code is required.
The control of keys, LEDs, and analog-to-digital (A/D) transmitters are
support functions to the demonstration project because the main
attention is paid to the communication interface. The communication
functions are implemented directly by means of "#include" instructions in
the main module U08MAIN.C.
Two ways of communication are implemented in the demonstration:
RS232 or USB. The selection takes place by defining USE_USB_PIPE
in the head of the main module. If this macro is defined,
automatically becomes a part of the main module; otherwise, the RS232
communication module
If the USB implementation in the file
U08DESC.C
is also translated at the same time. It contains the static
data for all necessary USB descriptors.
For each of the C files U08KEY.C, U08ADC.C, U08USB.C, and
U08232.C
there is a corresponding header file (* H) with the same base
name. The functions for controlling the LEDs on the board are contained
as macros in the file U08LED.H. In several cases, the header
MC68HC08JB8.H contains the register and bit mask definitions required
by the MC68HC908JB8 microcontroller (MCU).
Software Module Descriptions
U08232.C
is merged.
U08USB.C
U08USB.C
is used, the file
USB08 Evaluation Board
MOTOROLA

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mc68hc908jb8

Table of Contents