PIC16C745/P Microchip Technology, PIC16C745/P Datasheet - Page 91

no-image

PIC16C745/P

Manufacturer Part Number
PIC16C745/P
Description
8-Bit CMOS Microcontrollers with USB
Manufacturer
Microchip Technology
Datasheet
The following steps should be followed for doing an A/D
conversion:
1.
2.
3.
FIGURE 12-1: A/D BLOCK DIAGRAM
1999 Microchip Technology Inc.
Note 1: Not available on PIC16C745.
Configure the A/D module:
• Configure analog pins / voltage reference /
• Select A/D input channel (ADCON0)
• Select A/D conversion clock (ADCON0)
• Turn on A/D module (ADCON0)
Configure A/D interrupt (if desired):
• Clear ADIF bit
• Set ADIE bit
• Set GIE bit
Wait the required acquisition time.
and digital I/O (ADCON1)
Converter
A/D
(Reference
voltage)
V
REF
(Input voltage)
PCFG<2:0>
Advanced Information
V
IN
V
DD
001 or
011 or
101
000 or
010 or
100 or
11x
4.
5.
6.
7.
Start conversion:
• Set GO/DONE bit (ADCON0)
Wait for A/D conversion to complete, by either:
• Polling for the GO/DONE bit to be cleared
OR
• Waiting for the A/D interrupt
Read A/D result register (ADRES), clear bit
ADIF if required.
For next conversion, go to step 1 or step 2 as
required. The A/D conversion time per bit is
defined as T
required before next acquisition starts.
CHS<2:0>
PIC16C745/765
111
110
101
100
011
010
001
000
AD
. A minimum wait of 2T
RA1/AN1
RE2/AN7(1)
RA2/AN2
RA0/AN0
RE1/AN6(1)
RE0/AN5(1)
RA5/AN4
RA3/AN3/V
DS41124A-page 91
AD
REF
is

Related parts for PIC16C745/P