参数资料
型号: PIC16C662T-04E/TQ
元件分类: 微控制器/微处理器
英文描述: 8-BIT, OTPROM, 4 MHz, RISC MICROCONTROLLER, PQFP44
封装: 10 X 10 MM, 1 MM HEIGHT, PLASTIC, TQFP-44
文件页数: 81/136页
文件大小: 634K
代理商: PIC16C662T-04E/TQ
1996 Microchip Technology Inc.
Preliminary
DS30559A-page 49
PIC16C64X & PIC16C66X
The code example in Example 7-1 depicts the steps
required to congure the comparator module. RA3 and
RA4 are congured as digital outputs. RA0 and RA1
are congured as the V- inputs and RA2 as the V+ input
to both comparators.
EXAMPLE 7-1:
INITIALIZING THE
COMPARATOR MODULE
FLAG_REG
EQU 0x20
CLRF
FLAG_REG
;Init Flag Register
CLRF
PORTA
;Init PORTA
ANDLW
0xC0
;Mask Comp bits
IORWF
FLAG_REG,F
;Bits to Flag_Reg
MOVLW
0x03
;Init Comp Mode
MOVWF
CMCON
;CM2:CM0 = 011
BSF
STATUS,RP0
;Select Bank 1
MOVLW
0x07
;Init Data direction
MOVWF
TRISA
;RA<2:0> to inputs
;RA<4:3> to outputs
;TRISA<7:5> read '0'
BCF
STATUS,RP0
;Select Bank 0
CALL
DELAY_10
s
;10
s delay
MOVF
CMCON,F
;Read CMCON to end
;change condition
BCF
PIR1,CMIF
;Clear Pending Ints
BSF
STATUS,RP0
;Select Bank 1
BSF
PIE1,CMIE
;Enable Comp Ints
BCF
STATUS,RP0
;Select Bank 0
BSF
INTCON,PEIE
;Enable Periph Ints
BSF
INTCON,GIE
;Global Int enable
7.2
Comparator Operation
A single comparator is shown in Figure 7-3 along with
the relationship between the analog input levels and
the digital output. When the analog input at VIN+ is less
than the analog input VIN–, the output of the comparator
is a digital low level. When the analog input at VIN+ is
greater than the analog input VIN–, the output of the
comparator is a digital high level. The shaded areas of
the output of the comparator in Figure 7-3 represents
the uncertainty due to input offsets and response time.
7.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 VIN– is compared to the
signal at VIN+, and the digital output of the comparator
is adjusted accordingly (Figure 7-3).
FIGURE 7-3:
SINGLE COMPARATOR
7.3.1
EXTERNAL REFERENCE SIGNAL
When external voltage references are used, the
comparator module can be congured to have the com-
parators operate from the same or different reference
sources. However, threshold detector applications may
require the same reference. The reference signal must
be between VSS and VDD, and can be applied to either
pin of the comparator(s).
7.3.2
INTERNAL REFERENCE SIGNAL
The comparator module also allows the selection of an
internally
generated
voltage
reference
for
the
comparators. Section 8.0, contains a detailed descrip-
tion of the Voltage Reference Module that provides this
signal. The internal reference signal is used when the
comparators
are
in
mode
CM2:CM0 = 010
(Figure 7-2). In this mode, the internal voltage refer-
ence is applied to the VIN+ pin of both comparators.
VIN-
VIN+
Output
VIN-
VIN+
Output
相关PDF资料
PDF描述
PIC16LC715T-04/SS 8-BIT, OTPROM, 4 MHz, RISC MICROCONTROLLER, PDSO20
PIC16LC77-20I/TQ 8-BIT, OTPROM, 20 MHz, RISC MICROCONTROLLER, PQFP44
PIC16LF1828-E/ML 8-BIT, FLASH, 32 MHz, RISC MICROCONTROLLER, PQCC20
PIC16LF818T-I/SS 8-BIT, FLASH, 10 MHz, RISC MICROCONTROLLER, PDSO20
PIC16LF877T-20/PT 8-BIT, FLASH, 20 MHz, RISC MICROCONTROLLER, PQFP44
相关代理商/技术参数
参数描述
PIC16C662T-04I/L 功能描述:8位微控制器 -MCU 7KB 176 RAM 33 I/O RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC16C662T-04I/PQ 功能描述:8位微控制器 -MCU 7KB 176 RAM 33 I/O RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC16C662T-04I/PT 功能描述:8位微控制器 -MCU 7KB 176 RAM 33 I/O RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC16C662T-10/L 功能描述:8位微控制器 -MCU 7KB 176 RAM 33 I/O RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC16C662T-10/PQ 功能描述:8位微控制器 -MCU 7KB 176 RAM 33 I/O RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT