PIC16C432-E/SS Microchip Technology, PIC16C432-E/SS Datasheet - Page 37

IC MCU CMOS 8BIT 20MHZ 2K 20SSOP

PIC16C432-E/SS

Manufacturer Part Number
PIC16C432-E/SS
Description
IC MCU CMOS 8BIT 20MHZ 2K 20SSOP
Manufacturer
Microchip Technology
Series
PIC® 16Cr
Datasheets

Specifications of PIC16C432-E/SS

Core Processor
PIC
Core Size
8-Bit
Speed
20MHz
Connectivity
LIN (Local Interconnect Network)
Peripherals
Brown-out Detect/Reset, POR, WDT
Number Of I /o
12
Program Memory Size
3.5KB (2K x 14)
Program Memory Type
OTP
Ram Size
128 x 8
Voltage - Supply (vcc/vdd)
4.5 V ~ 5.5 V
Oscillator Type
External
Operating Temperature
-40°C ~ 125°C
Package / Case
20-SSOP
For Use With
XLT20SS-1 - SOCKET TRANSITION 18DIP 20SSOPAC164307 - MODULE SKT FOR PM3 28SSOPAC164029 - MODULE SKT PROMATEII 20DIP/SSOP
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Eeprom Size
-
Data Converters
-
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.
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).
FLAG_REG EQU
CLRF
CLRF
MOVF
ANDLW
IORWF
MOVLW
MOVWF
BSF
MOVLW
MOVWF
BCF
CALL
MOVF
BCF
BSF
BSF
BCF
BSF
BSF
2002 Microchip Technology Inc.
FLAG_REG
PORTA
CMCON,W
0xC0
FLAG_REG,F
0x03
CMCON
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
Comparator Reference
IN
+, and the digital output of the comparator
0X20
;Init flag register
;Init PORTA
;Move comparator contents to W
;Mask comparator bits
;Store bits in flag register
;Init comparator mode
;CM<2:0> = 011
;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
;10ms 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
IN
-, the output of the
- is compared to the
IN
+ is less
IN
+ is
Preliminary
PIC16C432
DS41140B-page 35

Related parts for PIC16C432-E/SS