PIC16F785-I/SO Microchip Technology, PIC16F785-I/SO Datasheet - Page 66

IC PIC MCU FLASH 2KX14 20SOIC

PIC16F785-I/SO

Manufacturer Part Number
PIC16F785-I/SO
Description
IC PIC MCU FLASH 2KX14 20SOIC
Manufacturer
Microchip Technology
Series
PIC® 16Fr

Specifications of PIC16F785-I/SO

Program Memory Type
FLASH
Program Memory Size
3.5KB (2K x 14)
Package / Case
20-SOIC (7.5mm Width)
Core Processor
PIC
Core Size
8-Bit
Speed
20MHz
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
17
Eeprom Size
256 x 8
Ram Size
128 x 8
Voltage - Supply (vcc/vdd)
2 V ~ 5.5 V
Data Converters
A/D 14x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Processor Series
PIC16F
Core
PIC
Data Bus Width
8 bit
Data Ram Size
128 B
Interface Type
RS- 232/USB
Maximum Clock Frequency
20 MHz
Number Of Programmable I/os
17
Number Of Timers
3
Operating Supply Voltage
2 V to 5.5 V
Maximum Operating Temperature
+ 85 C
Mounting Style
SMD/SMT
3rd Party Development Tools
52715-96, 52716-328, 52717-734
Development Tools By Supplier
PG164130, DV164035, DV244005, DV164005, PG164120, ICE2000, DV164120, DM163029
Minimum Operating Temperature
- 40 C
On-chip Adc
14-ch x 10-bit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
XLT20SO1-1 - SOCKET TRANS ICE 20DIP TO 20SOICXLT18SO-1 - SOCKET TRANSITION 18SOIC 300MILAC162060 - HEADER INTRFC MPLAB ICD2 20PINAC164039 - MODULE SKT PROMATE II 20DIP/SOIC
Connectivity
-
Lead Free Status / Rohs Status
Lead free / RoHS Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC16F785-I/SO
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
PIC16F785
9.1.2
The CM2CON0 register is a functional copy of the
CM1CON0 register described in Section 9.1.1. A sec-
ond control register, CM2CON1, is also present for
control of an additional synchronizing feature, as well
as mirrors of both comparator outputs.
9.1.2.1
The CM2CON0 register, shown in Register 9-2, con-
tains the control and Status bits for Comparator C2.
Setting C2ON (CM2CON0<7>) enables Comparator
C2 for operation.
Bits C2CH<1:0> (CM2CON0<1:0>) select the compar-
ator input from the four analog pins, AN<7:5,1>.
C2R (CM2CON0<2>) selects the reference to be used
with the comparator. Setting C2R (CM2CON0<2>)
selects the C2V
reference module as the reference voltage for the com-
parator. Clearing C2R selects the C2IN+ input on the
RC0/AN4/C2IN+ pin.
The output of the comparator is available internally via
the C2OUT bit (CM2CON0<6>). To make the output
available for an external connection, the C2OE bit
(CM2CON0<5>) must be set.
FIGURE 9-2:
DS41249A-page 64
RA1/AN1/C12IN0-/V
Note 1: To use AN<7:5,1> as analog inputs, the
RC2/AN6/C12IN2-/OP2
RC3/AN7/C12IN3-/OP1
RC1/AN5/C12IN1-/PH1
COMPARATOR C2 CONTROL
REGISTERS
appropriate bits must be programmed to 1
in the ANSEL0 register.
Control Register CM2CON0
RC0/AN4/C2IN+
Note 1: When C2ON = 0, the C2 comparator will produce a ‘0’ output to the XOR Gate.
REF
REF
output of the comparator voltage
2: Timer1 gate control (see Figure 6-2 on page 50).
COMPARATOR C2 SIMPLIFIED BLOCK DIAGRAM
/ICSPCLK
C2V
REF
C2CH<1:0>
C2R
0
1
0
1
2
3
MUX
2
MUX
C2VN
C2VP
Preliminary
C2
C2ON
C2POL
C2SP
(1)
From TMR1
The comparator output, C2OUT, can be inverted by
setting the C2POL bit (CM2CON0<4>). Clearing
C2POL results in a non-inverted output.
A complete table showing the output state versus input
conditions and the polarity bit is shown in Table 9-2.
TABLE 9-2:
C2SP (CM2CON0<3>) configures the speed of the
comparator. When C2SP is set, the comparator oper-
ates at its normal speed. Clearing C2SP operates the
comparator in low-power mode.
Input Condition
Q3*RD_CM2CON0
Note 1: The internal output of the comparator is
C2VN > C2VP
C2VN < C2VP
C2VN > C2VP
C2VN < C2VP
Clock
Q1
2: The C2 interrupt will operate correctly
3: For C2 output on RC4/C2OUT/PH2:
latched at the end of each instruction
cycle. External outputs are not latched.
with C2OE set or cleared. An external
output is not required for the C2 interrupt.
(C2OE=1) & (C2ON=1) & (TRISA<4>=0).
D
NRESET
C2OUT
D
EN
Q
C2 OUTPUT STATE VERSUS
INPUT CONDITIONS
Q
C2SYNC
D
EN
C2POL
CL
C2POL
0
1
 2004 Microchip Technology Inc.
MUX
Q
0
0
1
1
RD_CM2CON0
SYNCC2OUT
RC4/C2OUT/PH2
C20E
To PWM Logic
C2OUT
Data Bus
0
1
1
0
Set C2IF
(2)
To

Related parts for PIC16F785-I/SO