PIC16F628A-I/ML Microchip Technology, PIC16F628A-I/ML Datasheet - Page 65

IC MCU FLASH 2KX14 EEPROM 28QFN

PIC16F628A-I/ML

Manufacturer Part Number
PIC16F628A-I/ML
Description
IC MCU FLASH 2KX14 EEPROM 28QFN
Manufacturer
Microchip Technology
Series
PIC® 16Fr
Datasheets

Specifications of PIC16F628A-I/ML

Core Size
8-Bit
Program Memory Size
3.5KB (2K x 14)
Core Processor
PIC
Speed
20MHz
Connectivity
UART/USART
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
16
Program Memory Type
FLASH
Eeprom Size
128 x 8
Ram Size
224 x 8
Voltage - Supply (vcc/vdd)
3 V ~ 5.5 V
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
28-VQFN Exposed Pad, 28-HVQFN, 28-SQFN, 28-DHVQFN
Controller Family/series
PIC16F
No. Of I/o's
16
Eeprom Memory Size
128Byte
Ram Memory Size
224Byte
Cpu Speed
20MHz
No. Of Timers
3
Processor Series
PIC16F
Core
PIC
Data Bus Width
8 bit
Data Ram Size
224 B
Interface Type
SCI, USART
Maximum Clock Frequency
20 MHz
Number Of Programmable I/os
16
Number Of Timers
1 x 16 bit
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, DM163014, DM164120-4
Minimum Operating Temperature
- 40 C
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
AC164324 - MODULE SKT FOR MPLAB 8DFN/16QFNXLT28QFN3 - SOCKET TRAN ICE 18DIP/28QFNI3DBF648 - BOARD DAUGHTER ICEPIC3AC164033 - ADAPTER 28QFN TO 18DIPAC162053 - HEADER INTERFACE ICD,ICD2 18DIPDV007003 - PROGRAMMER UNIVERSAL PROMATE II
Data Converters
-
Lead Free Status / Rohs Status
 Details
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

Related parts for PIC16F628A-I/ML