PIC16F684-I/ML Microchip Technology Inc., PIC16F684-I/ML Datasheet - Page 60

no-image

PIC16F684-I/ML

Manufacturer Part Number
PIC16F684-I/ML
Description
MCU, 8-Bit, 2KW Flash, 128 RAM, 12 I/O, QFN-16
Manufacturer
Microchip Technology Inc.
Datasheet

Specifications of PIC16F684-I/ML

A/d Inputs
8-Channel, 10-Bit
Comparators
2
Cpu Speed
5 MIPS
Eeprom Memory
256 Bytes
Input Output
12
Memory Type
Flash
Number Of Bits
8
Package Type
16-pin QFN
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
PIC16F684
8.2
There are eight modes of operation for the comparator.
The CM<2:0> bits of the CMCON0 register are used to
select these modes as shown in Figure 8-5. I/O lines
change as a function of the mode and are designated
as follows:
• Analog function (A): digital input buffer is disabled
• Digital function (D): comparator digital output,
• Normal port function (I/O): independent of
FIGURE 8-5:
DS41202F-page 58
Note 1:
Comparators Reset (POR Default Value)
CM<2:0> = 000
Legend: A = Analog Input, ports always reads ‘0’
overrides port function
comparator
Three Inputs Multiplexed to Two Comparators
CM<2:0> = 001
Four Inputs Multiplexed to Two Comparators
CM<2:0> = 010
Two Common Reference Comparators
CM<2:0> = 011
C1IN-
C1IN+
C2IN-
C2IN+
C1IN-
C1IN+
C2IN-
C2IN+
Comparator Configuration
C1IN-
C1IN+
C2IN-
C2IN+
C1IN-
C1IN+
C2IN-
C2IN+
Reads as ‘0’, unless CxINV = 1.
I/O = Normal port I/O
A
A
A
A
A
A
A
A
A
A
A
A
I/O
CIS = 0
CIS = 1
A
A
A
CIS = 0
CIS = 1
CIS = 0
CIS = 1
COMPARATOR I/O OPERATING MODES
V
V
V
V
IN
IN
IN
IN
V
V
V
V
-
+
-
+
IN
IN
IN
IN
-
+
-
+
V
V
V
V
C1
C2
V
V
V
V
IN
IN
IN
IN
IN
IN
IN
IN
C1
C2
-
+
-
+
-
+
-
+
From
C1
C2
C1
C2
CV
Off
Off
C1OUT
C2OUT
(1)
(1)
REF
C2OUT
C1OUT
C1OUT
C2OUT
Module
Two Independent Comparators
CM<2:0> = 100
Comparators Off (Lowest Power)
CM<2:0> = 111
One Independent Comparator
CM<2:0> = 101
Two Common Reference Comparators with Outputs
CM<2:0> = 110
CIS = Comparator Input Switch (CMCON0<3>)
D = Comparator Digital Output
The port pins denoted as “A” will read as a ‘0’
regardless of the state of the I/O pin or the I/O control
TRIS bit. Pins used as analog inputs should also have
the corresponding TRIS bit set to ‘1’ to disable the
digital output driver. Pins denoted as “D” should have
the corresponding TRIS bit set to ‘0’ to enable the
digital output driver.
Note:
C1OUT(pin)
C2OUT(pin)
C1IN-
C1IN+
C2IN-
C2IN+
C1IN-
C1IN+
C2IN-
C2IN+
C1IN-
C2IN-
C2IN+
C1IN-
C1IN+
C2IN-
C2IN+
Comparator interrupts should be disabled
during a Comparator mode change to
prevent unintended interrupts.
A
A
A
A
I/O
I/O
A
A
I/O
I/O
I/O
I/O
D
A
D
A
A
V
V
V
V
V
V
V
V
IN
IN
IN
IN
IN
IN
IN
IN
V
V
V
V
V
V
V
V
IN
IN
IN
IN
-
+
-
+
-
+
-
+
© 2007 Microchip Technology Inc.
IN
IN
IN
IN
-
+
-
+
-
+
-
+
C1
C2
C1
C2
C1
C2
C1
C2
C1OUT
C2OUT
Off
C2OUT
Off
Off
C1OUT
C2OUT
(1)
(1)
(1)

Related parts for PIC16F684-I/ML