PIC16F688
FIGURE 8-2:
A/D CONVERSION TAD CYCLES
TCY to TAD
TAD1 TAD2
b9
TAD4 TAD5
b7 b6
T
AD
7
T
AD
8
TAD9 TAD10 TAD11
b2 b1 b0
TAD3
b8
TAD6
b5
b4
b3
Conversion Starts
Holding Capacitor is Disconnected from Analog Input (typically 100 ns)
Set GO bit
ADRESH and ADRESL registers are Loaded,
GO bit is Cleared,
ADIF bit is Set,
Holding Capacitor is Connected to Analog Input
8.1.6
CONVERSION OUTPUT
The A/D conversion can be supplied in two formats: left
or right shifted. The ADFM bit (ADCON0<7>) controls
the output format. Figure 8-3 shows the output formats.
FIGURE 8-3:
10-BIT A/D RESULT FORMAT
ADRESH
ADRESL
LSB
(ADFM = 0)
MSB
bit 7
bit 0
bit 7
bit 0
10-bit A/D Result
Unimplemented: Read as ‘0’
(ADFM = 1)
MSB
LSB
bit 0
bit 7
bit 0
bit 7
Unimplemented: Read as ‘0’
10-bit A/D Result
REGISTER 8-1:
ANSEL – ANALOG SELECT REGISTER (ADDRESS: 91h)
R/W-1
ANS7
R/W-1
ANS6
R/W-1
ANS5
R/W-1
ANS4
R/W-1
ANS3
R/W-1
ANS2
R/W-1
ANS1
R/W-1
ANS0
bit 7
bit 0
bit 7-0:
ANS<7:0>: Analog Select bits
Analog select between analog or digital function on pins AN<7:0>, respectively.
1= Analog input. Pin is assigned as analog input.(1)
0= Digital I/O. Pin is assigned to port or special function.
Note 1: Setting a pin to an analog input automatically disables the digital input circuitry,
weak pull-ups, and interrupt-on-change if available. The corresponding TRIS bit
must be set to Input mode in order to allow external control of the voltage on the pin.
Legend:
R = Readable bit
W = Writable bit
‘1’ = Bit is set
U = Unimplemented bit, read as ‘0’
‘0’ = Bit is cleared x = Bit is unknown
- n = Value at POR
2004 Microchip Technology Inc.
Preliminary
DS41203B-page 65