SN8P2740 Series
ADC, OP-amp, Comparator 8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 108
Version 2.0
1
1
1
3
3
3
8 CHANNEL ANALOG TO DIGITAL
CONVERTER (ADC)
13.1 OVERVIEW
The analog to digital converter (ADC) is SAR structure with 8-input sources and up to 4096-step resolution to transfer
analog signal into 12-bits digital buffers. The ADC builds in 8-channel input source (AIN0~AIN7) to measure 8 different
analog signal sources controlled by CHS[2:0] and GCHS bits. The ADC resolution can be selected 8-bit and 12-bit
resolutions through ADLEN bit. The ADC converting rate can be selected by ADCKS[1:0] bits to decide ADC
converting time. The ADC reference high voltage includes two sources controlled by AVREFH bit. One is internal Vdd
(AVREFH=0), and the other one is external reference voltage input pin from P4.0 pin (AVREFH=1). The ADC builds in
P4CON register to set pure analog input pin. It is necessary to set P4 as input mode without pull-up resistor by
program. After setup ADENB and ADS bits, the ADC starts to convert analog signal to digital data. When the
conversion is complete, the ADC circuit will set EOC and ADCIRQ bits
to “1” and the digital data outputs in ADB and
ADR registers. If the ADCIEN = 1, the ADC interrupt request occurs and executes interrupt service routine when
ADCIRQ = 1 after ADC converting. If ADC interrupt function is enabled (ADCIEN=1), the system will execute interrupt
procedure. The interrupt procedure is system program counter points to interrupt vector (ORG 8) and executes
interrupt service routine after finishing ADC converting. Clear ADCIRQ by program is necessary in interrupt procedure.
AIN5/
P4.5
AIN4/
P4.4
AIN7/
P4.7
AIN6/
P4.6
AIN3/
P4.3
AIN2/
P4.2
AIN1/
P4.1
AIN0/AVREFH/
P4.0
P4CON
CHS[2:0]
GCHS
Internal Vdd
ADC High
Reference Voltage
Analog
Input
ADENB ADS
ADC Clock
Counter
ADCKS[1:0]
ADLEN
ADB[11:0]
EOC
ADCIRQ
8/12
AVREFH
SAR ADC
ADT
ADC Offset
Calibration