PIC16C622A-20I/P Microchip Technology, PIC16C622A-20I/P Datasheet - Page 41

no-image

PIC16C622A-20I/P

Manufacturer Part Number
PIC16C622A-20I/P
Description
IC,MICROCONTROLLER,8-BIT,PIC CPU,CMOS,DIP,18PIN,PLASTIC
Manufacturer
Microchip Technology
Series
PIC® 16Cr
Datasheets

Specifications of PIC16C622A-20I/P

Rohs Compliant
YES
Core Processor
PIC
Core Size
8-Bit
Speed
20MHz
Peripherals
Brown-out Detect/Reset, POR, WDT
Number Of I /o
13
Program Memory Size
3.5KB (2K x 14)
Program Memory Type
OTP
Ram Size
128 x 8
Voltage - Supply (vcc/vdd)
2.5 V ~ 5.5 V
Oscillator Type
External
Operating Temperature
-40°C ~ 85°C
Package / Case
18-DIP (0.300", 7.62mm)
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
ISPICR1 - ADAPTER IN-CIRCUIT PROGRAMMINGDVA16XP180 - ADAPTER DEVICE FOR MPLAB-ICEAC164010 - MODULE SKT PROMATEII DIP/SOIC
Eeprom Size
-
Data Converters
-
Connectivity
-
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
The code example in Example 7-1 depicts the steps
required to configure the comparator module. RA3 and
RA4 are configured as digital output. RA0 and RA1 are
configured as the V- inputs and RA2 as the V+ input to
both comparators.
EXAMPLE 7-1:
7.2
A single comparator is shown in Figure 7-2 along with
the relationship between the analog input levels and
the digital output. When the analog input at V
than the analog input V
is a digital low level. When the analog input at V
greater than the analog input V
comparator is a digital high level. The shaded areas of
the output of the comparator in Figure 7-2 represent
the uncertainty due to input offsets and response time.
 2003 Microchip Technology Inc.
MOVLW
MOVWF
CLRF
BSF
MOVLW
MOVWF
BCF
CALL
MOVF
BCF
BSF
BSF
BCF
BSF
BSF
0x03
CMCON
PORTA
STATUS,RP0
0x07
TRISA
STATUS,RP0
DELAY 10
CMCON,F
PIR1,CMIF
STATUS,RP0
PIE1,CMIE
STATUS,RP0
INTCON,PEIE ;Enable peripheral interrupts
INTCON,GIE
Comparator Operation
;Init comparator mode
;CM<2:0> = 011
;Init PORTA
;Select Bank1
;Initialize data direction
;Set RA<2:0> as inputs
;RA<4:3> as outputs
;TRISA<7:5> always read ‘0’
;Select Bank 0
;10µs delay
;Read CMCON to end change condition
;Clear pending interrupts
;Select Bank 1
;Enable comparator interrupts
;Select Bank 0
;Global interrupt enable
INITIALIZING
COMPARATOR MODULE
IN
-, the output of the comparator
IN
-, the output of the
IN
+ is less
IN
+ is
7.3
An external or internal reference signal may be used
depending on the comparator Operating mode. The
analog signal that is present at V
signal at V
is adjusted accordingly (Figure 7-2).
FIGURE 7-2:
7.3.1
When external voltage references are used, the
comparator module can be configured to have the
comparators operate from the same or different
reference sources. However, threshold detector
applications may require the same reference. The
reference signal must be between V
can be applied to either pin of the comparator(s).
7.3.2
The comparator module also allows the selection of an
internally
comparators. Section 10, Instruction Sets, contains a
detailed description of the Voltage Reference Module
that provides this signal. The internal reference signal
is used when the comparators are in mode
CM<2:0>=010 (Figure 7-1). In this mode, the internal
voltage reference is applied to the V
comparators.
Output
V
V
V
V
utput
IN
IN
IN–
IN+
-
+
V
V
IN
IN
Comparator Reference
+
-
IN
generated
+, and the digital output of the comparator
EXTERNAL REFERENCE SIGNAL
INTERNAL REFERENCE SIGNAL
+
SINGLE COMPARATOR
voltage
PIC16C62X
IN
reference
- is compared to the
DS30235J-page 39
SS
IN
Output
and V
+ pin of both
for
DD
, and
the

Related parts for PIC16C622A-20I/P