PIC10F220/222
DS41270E-page 30
2007 Microchip Technology Inc.
7.7
Analog Conversion Result
Register
The ADRES register contains the results of the last
conversion. These results are present during the sam-
pling period of the next analog conversion process.
After the sampling period is over, ADRES is cleared (=
0
). A ‘leading one’ is then right shifted into the ADRES
to serve as an internal conversion complete bit. As
each bit weight, starting with the MSb, is converted, the
leading one is shifted right and the converted bit is
stuffed into ADRES. After a total of 9 right shifts of the
‘leading one’ have taken place, the conversion is com-
plete; the ‘leading one’ has been shifted out and the
GO/DONE bit is cleared.
If the GO/DONE bit is cleared in software during a con-
version, the conversion stops. The data in ADRES is
the partial conversion result. This data is valid for the bit
weights that have been converted. The position of the
‘leading one’ determines the number of bits that have
been converted. The bits that were not converted
before the GO/DONE was cleared are unrecoverable.
7.8
Internal Absolute Voltage
Reference
The function of the Internal Absolute Voltage Refer-
ence is to provide a constant voltage for conversion
across the devices VDD supply range. The A/D Con-
verter is ratiometric with the conversion reference
voltage being VDD. Converting a constant voltage of
0.6V (typical) will result in a result based on the voltage
applied to VDD of the device. The result of conversion
of this reference across the VDD range can be
approximated by: Conversion Result = 0.6V/(VDD/256)
Note:
The actual value of the Absolute Voltage
Reference varies with temperature and
part-to-part variation. The conversion is
also susceptible to analog noise on the
VDD pin and noise generated by the sink-
ing or sourcing of current on the I/O pins.
REGISTER 7-1:
ADCON0: A/D CONVERTER 0 REGISTER
R/W-1
U-0
R/W-1
R/W-0
ANS1
ANS0
—
CHS1
CHS0
GO/DONE
ADON
bit 7
bit 0
Legend:
R = Readable bit
W = Writable bit
U = Unimplemented bit, read as ‘0’
-n = Value at POR
‘1’ = Bit is set
‘0’ = Bit is cleared
x = Bit is unknown
bit 7
ANS1: ADC Analog Input Pin Select bit
1
= GP1/AN1 configured for analog input
0
= GP1/AN1 configured as digital I/O
bit 6
ANS0: ADC Analog Input Pin Select bit(1), (2)
1
= GP0/AN0 configured as an analog input
0
= GP0/AN0 configured as digital I/O
bit 5-4
Unimplemented: Read as ‘0’
bit 3-2
CHS<1:0>: ADC Channel Select bits(3)
00
= Channel 00 (GP0/AN0)
01
= Channel 01 (GP1/AN1)
1X
= 0.6V absolute Voltage reference
bit 1
GO/DONE: ADC Conversion Status bit(4)
1
= ADC conversion in progress. Setting this bit starts an ADC conversion cycle. This bit is automatically cleared
by hardware when the ADC is done converting.
0
= ADC conversion completed/not in progress. Manually clearing this bit while a conversion is in process
terminates the current conversion.
bit 0
ADON: ADC Enable bit
1
= ADC module is operating
0
= ADC module is shut-off and consumes no power
Note
1:
When the ANS bits are set, the channel(s) selected are automatically forced into analog mode regardless of the pin
function previously defined.
2:
The ANS<1:0> bits are active regardless of the condition of ADON
3:
CHS<1:0> bits default to 11 after any Reset.
4:
If the ADON bit is clear, the GO/DONE bit cannot be set.