English
Language : 

GMS81C2020 Datasheet, PDF (63/92 Pages) Hynix Semiconductor – CMOS Single-Chip 8-Bit Microcontroller with A/D Converter & VFD Driver
Hyundai Micro Electronics
GMS81C2020/GMS81C2120
18. ANALOG TO DIGITAL CONVERTER
The analog-to-digital converter (A/D) allows conversion
of an analog input signal to a corresponding 8-bit digital
value. The A/D module has twelve analog inputs, which
are multiplexed into one sample and hold. The output of
the sample and hold is the input into the converter, which
generates the result via successive approximation.
The A/D module has two registers which are the control
register ADCM and A/D result register ADCR. The
ADCM register, shown in Figure 18-2 , controls the oper-
ation of the A/D converter module. The port pins can be
configured as analog inputs or digital I/O.
To use analog inputs, each port is assigned analog input
port by setting the bit ANSEL[7:0] in R6FUNC register.
Also it is assigned analog input port by setting the bit AN-
SEL[11:8] in R7FUNC register. And selected the corre-
sponding channel to be converted by setting ADS[3:0].
The processing of conversion is start when the start bit
ADST is set to "1". After one cycle, it is cleared by hard-
ware. The register ADCR contains the results of the A/D
conversion. When the conversion is completed, the result
is loaded into the ADCR, the A/D conversion status bit
ADSF is set to "1", and the A/D interrupt flag ADIF is set.
The block diagram of the A/D module is shown in Figure
18-1 . The A/D status bit ADSF is set automatically when
A/D conversion is completed, cleared when A/D conver-
sion is in process. The conversion time takes maximum 20
uS (at fXI=4 MHz).
R67/AN7
R66/AN6
R65/AN5
R64/AN4
R63/AN3
R62/AN2
R61/AN1
R60/AN0
R6FUNC[7:0]
ANSEL7
ANSEL6
ANSEL5
ANSEL4
ANSEL3
ANSEL2
ANSEL1
ANSEL0
ADS[3:0]
0111
1011
0110
1010
0101
1001
0100
1000
0011
R7FUNC[3:0]
ANSEL11
ANSEL10
ANSEL9
ANSEL8
R73/AN11
R72/AN10
R71/AN9
R70/AN8
0010
0001
0000
A/D Result Register
ADCR(8-bit)
ADDRESS : EBH
RESET VALUE : Undefined
Sample & Hold
S/H
COMPARATOR
Successive
Approximation
Circuit
ADIF
A/D Interrupt
AVDD
ADEN
[ADCM.6]
Resistor
Ladder
Circuit
Figure 18-1 A/D Converter Block Diagram
Nov. 1999 Ver 0.0
preliminary
63