
GMS81508/16
27
2.8. A/D CONVERTER
A/D Converter has an 8-bit resolution, and input is possible up to 8 channel.
A/D Converter consists of Analog Input Multiplexer, A/D convert Mode Register, Resistance Ladder,
Sample and Holder, Successive Approximation Circuit and A/D Conversion Data Register.
Ladder
Resistor
Decoder
MUX
S/H
Control Register
Successive
Approximation
Circuit
A/D Conversion
Data Register(8bit)
ADEN ADS2 ADS1 ADS0 ADST ADSF
-
-
AN0
AN1
AN2
AN3
AN4
AN5
AN6
AN7
COMPARATOR
AVref
AVss
Internal Data Bus
IFA
2.8.1. Control of A/D Converter
The analog input is selected by bit2~4 of A/D Converter Mode Register(ADCM). This bits chooses
among AN0~AN7. The other analog pins which are not used not A/D conversion be used as
normal port.
The A/D Conversion is started by setting A/D Conversion Start bit (ADST) to "1"(only for ADEN=1).
After A/D Conversion is started, ADST is cleared by hardware. During A/D Conversion, when
ADST is set to "1", A/D Conversion starts again from the beginning.
The analog input voltage and the reference voltage are compared and the result is stored in the
A/D Converter Data Register(ADR) and ADSF(bit0 of ADCM) is set to "1". The A/D interrupt
request is generated at the completion of A/D conversion.
The result of the conversion is obtained by reading out the A/D register(ADR).