beautypg.com

Analog-to-digital converter, Description – Rainbow Electronics AT89C5132 User Manual

Page 129

background image

129

AT8xC5132

4173A–8051–08/02

Analog-to-Digital
Converter

The AT8xC5132 implement a 2-channel 10-bit (8 true Bits) analog-to-digital converter
(ADC). The first channel of this ADC can be used for battery monitoring while the sec-
ond channel can be used for voice sampling at 8 kHz.

Description

The A/D converter interfaces with the C51 core through four special function registers:
ADCON, the ADC control register (see Table 118); ADDH and ADDL, the ADC data reg-
isters (see Table 120 and Table 121); and ADCLK, the ADC clock register (see
Table 119).

As shown in Figure 105, the ADC is composed of a 10-bit cascaded potentiometric digi-
tal to analog converter, connected to the negative input of a comparator. The output
voltage of this DAC is compared to the analog voltage stored in the Sample and Hold
and coming from AIN0 or AIN1 input depending on the channel selected (see
Table 117).

Figure 105. ADC Structure

Figure 106 shows the timing diagram of a complete conversion. For simplicity, the figure
depicts the waveforms in idealized form and does not provide precise timing informa-
tion. For ADC characteristics and timing parameters refer to the Section “AC
Characteristics”.

Figure 106. Timing Diagram

0

1

AIN1

AIN0

ADCS

ADCON.0

AVSS

Sample and Hold

ADDH

AREFP

R/2R DAC

ADC

CLOCK

AREFN

8

10

ADEN

ADCON.5

ADSST

ADCON.3

ADEOC

ADCON.4

ADC

Interrupt

Request

EADC

IEN1.3

CONTROL

+

-

ADDL

2

SAR

ADEN

ADSST

ADEOC

T

SETUP

T

CONV

CLK

T

ADCLK