PIC16F648A-E/SO Microchip Technology, PIC16F648A-E/SO Datasheet - Page 65
![IC,MICROCONTROLLER,8-BIT,PIC CPU,CMOS,SOP,18PIN,PLASTIC](/photos/6/76/67656/150-18-soic_sml.jpg)
PIC16F648A-E/SO
Manufacturer Part Number
PIC16F648A-E/SO
Description
IC,MICROCONTROLLER,8-BIT,PIC CPU,CMOS,SOP,18PIN,PLASTIC
Manufacturer
Microchip Technology
Series
PIC® 16Fr
Datasheets
1.PIC16F616T-ISL.pdf
(8 pages)
2.PIC16F627A-IP.pdf
(180 pages)
3.PIC16F627A-IP.pdf
(8 pages)
4.PIC16F627A-IP.pdf
(22 pages)
Specifications of PIC16F648A-E/SO
Rohs Compliant
YES
Core Processor
PIC
Core Size
8-Bit
Speed
20MHz
Connectivity
UART/USART
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
16
Program Memory Size
7KB (4K x 14)
Program Memory Type
FLASH
Eeprom Size
256 x 8
Ram Size
256 x 8
Voltage - Supply (vcc/vdd)
3 V ~ 5.5 V
Oscillator Type
Internal
Operating Temperature
-40°C ~ 125°C
Package / Case
18-SOIC (7.5mm Width)
Processor Series
PIC16F
Core
PIC
Data Bus Width
8 bit
Data Ram Size
256 B
Interface Type
SCI, USART
Maximum Clock Frequency
20 MHz
Number Of Programmable I/os
16
Number Of Timers
3
Operating Supply Voltage
2 V to 5.5 V
Maximum Operating Temperature
+ 125 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, DM163014, DM164120-4
Minimum Operating Temperature
- 40 C
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
I3DBF648 - BOARD DAUGHTER ICEPIC3
Data Converters
-
Lead Free Status / Rohs Status
Details
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
PIC16F648A-E/SO
Manufacturer:
INTEL
Quantity:
5
The code example in Example 10-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 10-1:
10.2
A single comparator is shown in Figure 10-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 10-2 represent
the uncertainty due to input offsets and response time.
See Table 17-2 for Common Mode voltage.
10.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 10-2).
© 2009 Microchip Technology Inc.
FLAG_REG
CLRF
CLRF
MOVF
ANDLW
IORWF
MOVLW
MOVWF
BSF
MOVLW
MOVWF
BCF
CALL
MOVF
BCF
BSF
BSF
BCF
BSF
BSF
Comparator Operation
Comparator Reference
FLAG_REG
PORTA
CMCON, W
0xC0
FLAG_REG,F ;Store bits in flag register
0x03
CMCON
STATUS,RP0 ;Select Bank1
0x07
TRISA
STATUS,RP0 ;Select Bank 0
DELAY10
CMCON,F
PIR1,CMIF
STATUS,RP0 ;Select Bank 1
PIE1,CMIE
STATUS,RP0 ;Select Bank 0
INTCON,PEIE ;Enable peripheral interrupts
INTCON,GIE ;Global interrupt enable
IN
+, and the digital output of the comparator
EQU
;Init flag register
;Init PORTA
;Load comparator bits
;Mask comparator bits
;Init comparator mode
;CM<2:0> = 011
;Initialize data direction
;Set RA<2:0> as inputs
;RA<4:3> as outputs
;TRISA<7:5> always read ‘0’
;10Μs delay
;Read CMCON to end change
;condition
;Clear pending interrupts
;Enable comparator interrupts
INITIALIZING
COMPARATOR MODULE
IN
-, the output of the comparator
IN
IN
0X20
-, the output of the
- is compared to the
IN
+ is less
IN
+ is
PIC16F627A/628A/648A
FIGURE 10-2:
10.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).
10.3.2
The Comparator module also allows the selection of an
internally
comparators.
Module”, 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 10-1). In this
mode, the internal voltage reference is applied to the
V
10.4
Response time is the minimum time, after selecting a
new reference voltage or input source, before the
comparator output is to have a valid level. If the internal
reference is changed, the maximum delay of the internal
voltage reference must be considered when using the
comparator outputs. Otherwise, the maximum delay of
the comparators should be used (Table 17-2, page 142).
IN
V
V
Result
+ pin of both comparators.
IN
IN
-
+
V
V
IN
IN
Comparator Response Time
+
-
generated
EXTERNAL REFERENCE SIGNAL
INTERNAL REFERENCE SIGNAL
Section 11.0
+
–
SINGLE COMPARATOR
voltage
“Voltage
reference
DS40044G-page 65
SS
Result
and V
Reference
for
DD
, and
the