Designer Reference Manual
USB08 Evaluation Board
52
Software Module Descriptions
MOTOROLA
Software Module Descriptions
NOTE:
It has to be pointed out for completeness, that with the KBI module of the
MC68HC908JB8 not only single keys but also extensive key fields in
matrix arrangement can be easily scanned.
3.9 LED Control with U08LED.H
Controlling the three light-emitting diodes (LED) attached to port D is
easy. For initialization, the data direction of the used port pins PTD[0..2]
has to be switched to an output state. The initialization as well as the
switching of the LEDs is performed via four macros. Therefore, a header
file is enough for the realization of these functions. A special C module
is not required in this case.
The LEDs are addressed, beginning with a 1. The switching on of the
first LED (at PTD[0]) takes place, for example, by means of:
onLED(1);
3.10 Software ADC Module U08ADC.C
Although the MC68HC908JB8 does not have an integrated ADC, it is
nevertheless possible to measure analog values (and in particular
resistance values) in a simple way. For this purpose, an RC combination
is attached to a conventional digital port pin and the load time of the
capacitor is measured. The working principle is shown in
Figure 3-2. Measurement of Resistor Values Using a Digital Input
V
CC
R
C
GND
S
E
Содержание 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 ...