PIC16C770 Microchip Technology Inc., PIC16C770 Datasheet - Page 107

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
11.0
The analog-to-digital (A/D) converter module has six
inputs for the PIC16C717/770/771.
The PIC16C717 analog-to-digital converter (A/D)
allows conversion of an analog input signal to a corre-
sponding 10-bit digital value, while the A/D converter
in the PIC16C770/771 allows conversion to a corre-
sponding 12-bit digital value. The A/D module has up
to 6 analog inputs, which are multiplexed into one
sample and hold. The output of the sample and hold is
the input into the converter, which generates the result
via successive approximation. The analog reference
voltages are software selectable to either the device’s
analog positive and negative supply voltages (AV
AV
or internal voltage references if enabled (VRH, VRL).
The A/D converter can be triggered by setting the GO/
DONE bit, or by the special event Compare mode of
the ECCP module. When conversion is complete, the
GO/DONE bit returns to ’0’, the ADIF bit in the PIR1
register is set, and an A/D interrupt will occur, if
enabled.
The A/D converter has a unique feature of being able
to operate while the device is in SLEEP mode. To oper-
ate in SLEEP, the A/D conversion clock must be
derived from the A/D’s internal RC oscillator.
2002 Microchip Technology Inc.
SS
), the voltage level on the V
ANALOG-TO-DIGITAL
CONVERTER (A/D) MODULE
REF
+ and V
REF
- pins,
DD
/
The A/D module has four registers. These registers
are:
A device RESET forces all registers to their RESET
state. This forces the A/D module to be turned off and
any conversion is aborted.
11.1
The ADCON0 register, shown in Register 11-1, con-
trols the operation of the A/D module. The ADCON1
register, shown in Register 11-2, configures the func-
tions of the port pins, the voltage reference configura-
tion and the result format. The ANSEL register, shown
in Register 3-1, selects between the Analog or Digital
Port Pin modes. The port pins can be configured as
analog inputs or as digital I/O.
The combination of the ADRESH and ADRESL regis-
ters contain the result of the A/D conversion. The reg-
ister pair is referred to as the ADRES register. When
the A/D conversion is complete, the result is loaded
into ADRES, the GO/DONE bit (ADCON0<2>) is
cleared, and the A/D interrupt flag ADIF is set. The
block diagram of the A/D module is shown in
Figure 11-3.
PIC16C717/770/771
• A/D Result Register Low ADRESL
• A/D Result Register High ADRESH
• A/D Control Register 0 (ADCON0)
• A/D Control Register 1 (ADCON1)
Control Registers
DS41120B-page 105

Related parts for PIC16C770