English
Language : 

W79E217A Datasheet, PDF (59/207 Pages) Winbond – 8-bit Microcontroller
Preliminary W79E217A Data Sheet
ADC CONTROL REGISTER
Bit:
7
6
5
4
3
2
1
0
ADCEN -
ADCEX ADCI
ADCS
AADR.2 AADR.1 AADR.0
Mnemonic: ADCCON
Address: E1h
BIT NAME
7 ADCEN
6-
5 ADCEX
4 ADCI
3 ADCS
2-0 AADR
FUNCTION
Enable A/D Converter Function. Set ADCEN to logic high to enable ADC block.
Reserved.
Enable external start control of ADC conversion by a rising edge from P4.0.
ADCEX=0: Disable external start. ADCEX=1: Enable external start control.
A/D Converting Complete/Interrupt Flag. This flag is set when ADC conversion is
completed. The ADC interrupt is requested if the interrupt is enabled. ADCI is set
by hardware and cleared by software only.
ADC Start and Status: Set this bit to start an A/D conversion. It may also be set
by STADC if ADCEX is 1. This signal remains high while the ADC is busy and is
reset right after ADCI is set.
Notes:
1. It is recommended to clear ADCI before ADCS is set. However, if ADCI is
cleared and ADCS is set at the same time, a new A/D conversion may start
on the same channel.
2. Software clearing of ADCS will abort conversion in progress.
3. ADC cannot start a new conversion while ADCS or ADCI is high.
Select and enable analog input channel from ADC0 to ADC7.
AADR[2:0] ADC selected input AADR[2:0] ADC selected input
000
ADCCH0 (P1.0)
100
ADCCH4 (P1.4)
001
ADCCH1 (P1.1)
101
ADCCH5 (P1.5)
010
ADCCH2 (P1.2)
110
ADCCH6 (P1.6)
011
ADCCH3 (P1.3)
111
ADCCH7 (P1.7)
The ADCI and ADCS control the ADC conversion as below:
ADCI
ADCS
ADC STATUS
0
0
ADC not busy; A conversion can be started.
0
1
ADC busy; Start of a new conversion is blocked.
1
0
Conversion completed; Start of a new conversion requires ADCI = 0.
1
1
This is an internal temporary state that user can ignore it.
ADC CONVERTER RESULT HIGH REGISTER
Bit:
7
6
5
4
3
2
1
0
ADC.9
ADC.8
ADC.7
ADC.6
ADC.5
ADC.4
ADC.3
ADC.2
Mnemonic: ADCH
Address: E2h
BIT NAME
FUNCTION
7-0 ADC[9:2] 8 MSB of 10 bit A/D conversion result. ADCH is a read only register.
- 59 -
Publication Release Date: December 14, 2007
Revision A3.0