PIC16C770 Microchip Technology Inc., PIC16C770 Datasheet - Page 110

no-image

PIC16C770

Manufacturer Part Number
PIC16C770
Description
18/20-pin, 8-bit Cmos Microcontrollers With 10/12-bit A/d
Manufacturer
Microchip Technology Inc.
Datasheet
PIC16C717/770/771
FIGURE 11-2: PIC16C717 10-BIT A/D RESULT FORMAT
After the A/D module has been configured as desired,
the selected channel must be acquired before the con-
version is started. The analog input channels must
have their corresponding TRIS and ANSEL bits
selected as an input. To determine acquisition time, see
Section 11.6. After this acquisition time has elapsed,
the A/D conversion can be started. The following steps
should be followed for doing an A/D conversion:
11.2
11.2.1
The ANSEL and TRIS registers control the operation
of the A/D port pins. The port pins that are desired as
analog inputs must have their corresponding TRIS bit
set (input). If the TRIS bit is cleared (output), the digital
output level (V
ANSEL bits must be set (analog input) to disable the
digital input buffer.
The A/D operation is independent of the state of the
TRIS bits and the ANSEL bits.
DS41120B-page 108
Note 1: When reading the PORTA register, all pins
(ADFM = 0)
(ADFM = 1)
3: Analog levels on any pin that is defined as
Configuring the A/D Module
2: When reading the PORTB register, all
CONFIGURING ANALOG PORT
PINS
configured as analog input channels will
read as ’0’.
a digital input, including the ANx pins, may
cause the input buffer to consume current
that is out of the devices specification.
pins configured as analog pins on
PORTB will be read as ’1’.
OH
or V
OL
MSB
bit7
bit7
) will be converted. The proper
Unused
10-bit A/D Result
MSB
11.2.2
The VCFG bits in the ADCON1 register configure the
A/D module reference inputs. The reference high input
can come from an internal reference (VRH) or (VRL),
an external reference (V
ence input can come from an internal reference (VRL),
an external reference (V
reference is chosen for the reference high or reference
low inputs, the port pin that multiplexes the incoming
external references is configured as an analog input,
regardless of the values contained in the A/D port con-
figuration bits (PCFG<3:0>).
10-bit A/D Result
bit7
bit7
CONFIGURING THE REFERENCE
VOLTAGES
LSB
REF
REF
2002 Microchip Technology Inc.
+), or AV
-), or AV
Unused
LSB
DD
SS
. The low refer-
. If an external
Unused

Related parts for PIC16C770