參數(shù)資料
型號: PIC16F627-04E/P
廠商: Microchip Technology
文件頁數(shù): 124/170頁
文件大?。?/td> 0K
描述: IC MCU FLASH 1KX14 18-DIP
標(biāo)準(zhǔn)包裝: 25
系列: PIC® 16F
核心處理器: PIC
芯體尺寸: 8-位
速度: 4MHz
連通性: UART/USART
外圍設(shè)備: 欠壓檢測/復(fù)位,POR,PWM,WDT
輸入/輸出數(shù): 16
程序存儲器容量: 1.75KB(1K x 14)
程序存儲器類型: 閃存
EEPROM 大小: 128 x 8
RAM 容量: 224 x 8
電壓 - 電源 (Vcc/Vdd): 3 V ~ 5.5 V
振蕩器型: 內(nèi)部
工作溫度: -40°C ~ 125°C
封裝/外殼: 18-DIP(0.300",7.62mm)
包裝: 管件
配用: DVA16XP183-ND - ADAPTER ICE 18DIP/SOIC/SSOP
2003 Microchip Technology Inc.
Preliminary
DS40300C-page 55
PIC16F62X
The code example in Example 9-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 9-1:
INITIALIZING
COMPARATOR MODULE
9.2
Comparator Operation
A single comparator is shown in Figure 9-2 along with
the relationship between the analog input levels and
the digital output. When the analog input at V
IN+ is less
than the analog input V
IN-, the output of the comparator
is a digital low level. When the analog input at V
IN+ is
greater than the analog input V
IN-, the output of the
comparator is a digital high level. The shaded areas of
the output of the comparator in Figure 9-2 represent
the uncertainty due to input offsets and response time.
9.3
Comparator Reference
An external or internal reference signal may be used
depending on the Comparator Operating mode. The
analog signal that is present at V
IN- is compared to the
signal at V
IN+, and the digital output of the comparator
is adjusted accordingly (Figure 9-2).
FIGURE 9-2:
SINGLE COMPARATOR
9.3.1
EXTERNAL REFERENCE SIGNAL
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
SS and VDD, and
can be applied to either pin of the comparator(s).
9.3.2
INTERNAL REFERENCE SIGNAL
The Comparator module also allows the selection of an
internally
generated
voltage
reference
for
the
comparators. Section 10.0, Voltage Reference Manual,
contains a detailed description of the Voltage Refer-
ence module that provides this signal. The internal
reference signal is used when the comparators are in
mode CM<2:0>=010 (Figure 9-1). In this mode, the
internal voltage reference is applied to the V
IN+ pin of
both comparators.
9.4
Comparator Response Time
Response time is the minimum time, after selecting a
new reference voltage or input source, before the
comparator output is ensured 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
FLAG_REG EQU
0X20
CLRF
FLAG_REG
;Init flag register
CLRF
PORTA
;Init PORTA
MOVF
CMCON, W
;Load comparator bits
ANDLW
0xC0
;Mask comparator bits
IORWF
FLAG_REG,F
;Store bits in flag register
MOVLW
0x03
;Init comparator mode
MOVWF
CMCON
;CM<2:0> = 011
BSF
STATUS,RP0
;Select Bank1
MOVLW
0x07
;Initialize data direction
MOVWF
TRISA
;Set RA<2:0> as inputs
;RA<4:3> as outputs
;TRISA<7:5> always read ‘0’
BCF
STATUS,RP0
;Select Bank 0
CALL
DELAY10
;10
s delay
MOVF
CMCON,F
;Read CMCONtoend changecondition
BCF
PIR1,CMIF
;Clear pending interrupts
BSF
STATUS,RP0
;Select Bank 1
BSF
PIE1,CMIE
;Enable comparator interrupts
BCF
STATUS,RP0
;Select Bank 0
BSF
INTCON,PEIE ;Enable peripheral interrupts
BSF
INTCON,GIE
;Global interrupt enable
+
Vi
N+
V
IN-
Result
V
IN-
V
IN+
相關(guān)PDF資料
PDF描述
PIC16F627-20E/P IC MCU FLASH 1KX14 18-DIP
PIC16C54C-20I/P IC MCU OTP 512X12 18DIP
PIC16F627T-04E/SO IC MCU FLASH 1KX14 18-SOIC
PIC18LF448-I/L IC PIC MCU FLASH 8KX16 44PLCC
PIC18F448-E/P IC MCU FLASH 8KX16 W/CAN 40-DIP
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
PIC16F627-04I/P 功能描述:8位微控制器 -MCU 1.75KB 224 RAM 16I/O 4MHz IndTemp PDIP18 RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時(shí)鐘頻率:50 MHz 程序存儲器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風(fēng)格:SMD/SMT
PIC16F627-04I/P 制造商:Microchip Technology Inc 功能描述:IC 8BIT FLASH MCU 16F627 DIP18
PIC16F627-04I/P 制造商:Microchip Technology Inc 功能描述:18 Pin 1.75 KB Std Flash 224 RAM 16 I
PIC16F627-04I/SO 功能描述:8位微控制器 -MCU 1.75KB 224 RAM 16I/O 4MHz IndTemp SOIC18 RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時(shí)鐘頻率:50 MHz 程序存儲器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風(fēng)格:SMD/SMT
PIC16F627-04I/SO 制造商:Microchip Technology Inc 功能描述:8BIT FLASH MCU SMD 16F627 SOIC18