Download Print this page

Motorola USB08 Reference Manual: Measurement Of Resistor Values Using A Digital Input; Led Control With U08led.h; Software Adc Module U08adc.c

Universal serial bus evaluation board using the mc68hc908jb8.
Hide thumbs

Advertisement

Software Module Descriptions
NOTE:

3.9 LED Control with U08LED.H

3.10 Software ADC Module U08ADC.C

Designer Reference Manual
52
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.
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);
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
Software Module Descriptions
V
CC
R
C
S
GND
Figure
3-2.
E
USB08 Evaluation Board
MOTOROLA

Advertisement

Chapters

This manual also for:

Mc68hc908jb8

Comments to this Manuals

Symbols: 0
Latest comments: