![Sino Wealth SH79F3283 Скачать руководство пользователя страница 111](http://html1.mh-extra.com/html/sino-wealth/sh79f3283/sh79f3283_manual_1283063111.webp)
SH79F3283
111
8.7.3 Register
Table 8.36
ADC Control Register
93H, Bank0
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
ADCON
ADON
ADCIF
EC
REFC
SCH2
SCH1
SCH0
GO/DONE
—---—-----—
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset Value
(POR/WDT/LVR/PIN)
0
0
0
0
0
0
0
0
Bit Number
Bit Mnemonic
Description
7
ADON
ADC Enable bit
0: Disable the ADC module
1: Enable the ADC module
6
ADCIF
ADC Interrupt Flag bit
0: No ADC interrupt, cleared by software.
1: Set by hardware to indicate that the AD Convert has been completed, or
analog input is larger than ADDATH/L if compare is enabled
5
EC
Compare Function Enable bit
0: Compare function disabled
1: Compare function enabled
4
REFC
Reference Voltage Select bit
0: the reference voltage connected to V
DD
1: the reference voltage input from V
REF
pin
3-1
SCH[2:0]
ADC channel Select bits (Combination control with SCH3)
0000: ADC channel AN0
0001: ADC channel AN1
0010: ADC channel AN2
0011: ADC channel AN3
0100: ADC channel AN4
0101: ADC channel AN5
0110: ADC channel AN6
0111: ADC channel AN7
1000: ADC channel AN8
11xx: internal 1.25V Reference
0
GO/DONE
—---—------—
ADC status flag bit
0: Automatically cleared by hardware when AD convert is completed. Clearing
this bit during converting time will stop current conversion. If Compare function
is enabled, this bit will not be cleared by hardware until software clear.
1: Set to start AD convert or digital compare.
Note:
(1) When select the reference voltage input from V
REF
pin (REFC = 1), the P4.4 is shared as V
REF
input.
(2) After set ADON to 1, please set a 10us delay, then set GO/DONE to 1 to ensure the ADC normal operate.