English
Language : 

W79E201 Datasheet, PDF (60/87 Pages) Winbond – 8-BIT MICROCONTROLLER
W79E201
15. ANALOG-TO-DIGITAL CONVERTER
The ADC contains a DAC which converts the contents of a successive approximation register to a
voltage (VDAC) which is compared to the analog input voltage (Vin). The output of the comparator is
fed to the successive approximation control logic which controls the successive approximation
register. A conversion is initiated by setting ADCS in the ADCCON register. ADCS can be set by
software only or by either hardware (P2.0) or software.
Before used ADC circuit, it must enabled by ADCCEN. The software only start mode is selected when
control bit ADCCON.5 (ADEX) =0. A conversion is then started by setting control bit ADCCON.3
(ADCS) The hardware or software start mode is selected when ADCCON.5 =1, and a conversion may
be started by setting ADCCON.3 as above or by applying a rising edge to external pin STADC. When
a conversion is started by applying a rising edge, a low level must be applied to STADC for at least
one machine cycle followed by a high level for at least one machine cycle.
The low-to-high transition of STADC is recognized at the end of a machine cycle, and the conversion
commences at the beginning of the next cycle.
VDAC
Vin
DAC
Comparator
MSB
Successive
Approximation
Register
LSB
Successive
Approximation
Control Logic
Start
Ready
(Stop)
Successive Approximation ADC
The end of the 10-bit conversion is flagged by control bit ADCCON.4 (ADCI). The upper 8 bits of the
result are held in special function register ADCH, and the two remaining bits are held in ADCCON.7
(ADC.1) and ADCCON.6 (ADC.0). The user may ignore the two least significant bits in ADCCON and
use the ADC as an 8-bit converter (8 upper bits in ADCH). In any event, the total actual conversion
time is 50 machine cycles. ADC will be set and the ADCS status flag will be reset 50 cycles after the
ADCS is set.
- 60 -