Datasheets»Microchip Technology»PIC16F87XATI/SP Datasheet

PIC16F87XATI/SP Datasheet - Page 132

Download or read online Microchip Technology PIC16F87XATI/SP 28/40/44-Pin Enhanced Flash Microcontrollers pdf datasheet.



Page
132 of 234
prevnext
PIC16F87XA
11.4
A/D Conversions
Clearing the GO/DONE bit during a conversion will
abort the current conversion. The A/D Result register
pair will NOT be updated with the partially completed
A/D conversion sample. That is, the ADRESH:ADRESL
registers will continue to contain the value of the last
completed conversion (or the last value written to the
ADRESH:ADRESL registers). After the A/D conversion
FIGURE 11-3:
A/D CONVERSION T
T
to T
T
1
T
2
T
CY
AD
AD
AD
AD
b9
b8
Conversion starts
Holding capacitor is disconnected from analog input (typically 100 ns)
Set GO bit
11.4.1
A/D RESULT REGISTERS
The ADRESH:ADRESL register pair is the location
where the 10-bit A/D result is loaded at the completion
of the A/D conversion. This register pair is 16 bits wide.
The A/D module gives the flexibility to left or right justify
the 10-bit result in the 16-bit result register. The A/D
FIGURE 11-4:
A/D RESULT JUSTIFICATION
ADFM = 1
7
2 1 0 7
0000 00
ADRESH
ADRESL
10-bit Result
Right Justified
DS39582C-page 132
is aborted, the next acquisition on the selected channel
is automatically started. The GO/DONE bit can then be
set to start the conversion.
In Figure 11-3, after the GO bit is set, the first time
segment has a minimum of T
Note:
The GO/DONE bit should NOT be set in
the same instruction that turns on the A/D.
CYCLES
AD
T
4
T
5
T
8
T
3
T
6
T
7
AD
AD
AD
AD
AD
b7
b6
b5
b4
b3
ADRES is loaded
GO bit is cleared
ADIF bit is set
Holding capacitor is connected to analog input
Format Select bit (ADFM) controls this justification.
Figure 11-4 shows the operation of the A/D result
justification. The extra bits are loaded with ‘0’s. When
an A/D result will not overwrite these locations (A/D dis-
able), these registers may be used as two general
purpose 8-bit registers.
10-bit Result
0
7
ADRESH
10-bit Result
and a maximum of T
.
CY
AD
9
T
10 T
11
AD
AD
AD
b2
b1
b0
ADFM = 0
0 7 6 5
0
0000 00
ADRESL
Left Justified
 2001-2013 Microchip Technology Inc.

Comments to this Datasheet