PIC16F785-I/P Microchip Technology Inc., PIC16F785-I/P Datasheet - Page 82

no-image

PIC16F785-I/P

Manufacturer Part Number
PIC16F785-I/P
Description
MCU, 8-Bit, 2KW Flash, 128 RAM, 18 I/O, DIP-20
Manufacturer
Microchip Technology Inc.
Datasheet

Specifications of PIC16F785-I/P

A/d Inputs
12-Channel, 10-Bit
Comparators
2
Cpu Speed
5 MIPS
Eeprom Memory
256 Bytes
Input Output
17
Memory Type
Flash
Number Of Bits
8
Package Type
20-pin PDIP
Programmable Memory
3.5K Bytes
Ram Size
128 Bytes
Speed
20 MHz
Timers
2-8-bit, 1-16-bit
Voltage, Range
2-5.5 V
Lead Free Status / Rohs Status
RoHS Compliant part Electrostatic Device
PIC16F785/HV785
12.1
There are four registers available to control the
functionality of the A/D module:
1.
2.
3.
4.
12.1.1
The
ANSEL0<7:0>) and the TRISA<4,2:0>, TRISB<5:4>
and TRISC<7:6,3:0>> bits control the operation of the
A/D port pins. Set the corresponding TRISx bits to ‘1’ to
set the pin output driver to its high-impedance state.
Likewise, set the corresponding ANSx bit to disable the
digital input buffer.
12.1.2
There are fourteen analog channels on the PIC16F785/
HV785. The CHS<3:0> bits (ADCON0<5:2>) control
which channel is connected to the sample and hold
circuit.
TABLE 12-1:
DS41249D-page 80
Legend: Shaded cells are outside of recommended range.
Note 1:
Note:
Operation
16 T
32 T
64 T
A/D RC
ANSEL0 (Register 12-1)
ANSEL1 (Register 12-2)
ADCON0 (Register 12-3)
ADCON1 (Register 12-4)
2 T
4 T
8 T
A/D Clock Source (T
2:
3:
4:
OSC
OSC
OSC
ANS<11:0>
OSC
OSC
OSC
A/D Configuration and Operation
The A/D RC source has a typical T
These values violate the minimum required T
For faster conversion times, the selection of another clock source is recommended.
When the device frequency is greater than 1 MHz, the A/D RC clock source is only recommended if the
conversion will be performed during Sleep.
ANALOG PORT PINS
Analog voltages on any pin that is defined
as a digital input may cause the input
buffer to conduct excess current.
CHANNEL SELECTION
ADCS2:ADCS0
T
AD
VS. DEVICE OPERATING FREQUENCIES
bits
000
100
001
101
010
110
x11
AD
)
(ANSEL1<3:0>
2-6 s
100 ns
200 ns
400 ns
800 ns
20 MHz
1.6 s
3.2 s
AD
(1), (4)
(2)
(2)
(2)
(2)
time of 4 s for V
and
Preliminary
AD
time.
2-6 s
12.8 s
400 ns
800 ns
12.1.3
There are two options for the voltage reference to the
A/D converter: either V
applied to V
controls the voltage reference selection. If VCFG is set,
then the voltage on the V
otherwise, V
12.1.4
The A/D conversion cycle requires 11 T
of the conversion clock is software selectable via the
ADCS bits (ADCON1<6:4>). There are seven possible
clock options:
• F
• F
• F
• F
• F
• F
• F
For correct conversion, the A/D conversion clock
(1/T
1.6 s. Table 12-1 shows a few T
selected frequencies.
5 MHz
1.6 s
3.2 s
6.4 s
DD
OSC
OSC
OSC
OSC
OSC
OSC
RC
AD
Device Frequency
(1), (4)
(2)
(2)
(3)
) must be selected to ensure a minimum T
> 3.0V.
(dedicated internal oscillator)
/2
/4
/8
/16
/32
/64
VOLTAGE REFERENCE
CONVERSION CLOCK
REF
DD
is the reference.
is used. The VCFG bit (ADCON0<6>)
2-6 s
16.0 s
500 ns
1.0 s
8.0 s
4 MHz
2.0 s
4.0 s
DD
© 2006 Microchip Technology Inc.
(1), (4)
is used or an analog voltage
(2)
(3)
(2)
(3)
REF
pin is the reference;
AD
2-6 s
calculations for
AD
1.25 MHz
12.8 s
25.6 s
51.2 s
1.6 s
3.2 s
6.4 s
. The source
(1), (4)
(3)
(3)
(3)
AD
of

Related parts for PIC16F785-I/P