PIC16CE625 Datasheet

  • PIC16CE625

  • OTP 8-Bit CMOS MCU with EEPROM Data Memory

  • 1208.41KB

  • 113页

  • Microchip

扫码查看芯片数据手册

上传产品规格书

PDF预览

PIC16CE62X
The code example in Example 8-1 depicts the steps
required to con铿乬ure the comparator module. RA3 and
RA4 are con铿乬ured as digital output. RA0 and RA1 are
con铿乬ured as the V- inputs and RA2 as the V+ input to
both comparators.
8.3
Comparator Reference
EXAMPLE 8-1:
FLAG_REG
CLRF
CLRF
MOVF
ANDLW
IORWF
MOVLW
MOVWF
BSF
MOVLW
MOVWF
INITIALIZING
COMPARATOR MODULE
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 8-3).
FIGURE 8-3:
SINGLE COMPARATOR
BCF
CALL
MOVF
BCF
BSF
BSF
BCF
BSF
BSF
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 鈥?鈥?/div>
STATUS,RP0 ;Select Bank 0
DELAY 10
;10碌s delay
CMCON,F
;Read CMCON to end change condition
PIR1,CMIF
;Clear pending interrupts
STATUS,RP0 ;Select Bank 1
PIE1,CMIE
;Enable comparator interrupts
STATUS,RP0 ;Select Bank 0
INTCON,PEIE ;Enable peripheral interrupts
INTCON,GIE ;Global interrupt enable
EQU
FLAG_REG
PORTA
CMCON,W
0xC0
FLAG_REG,F
0x03
CMCON
STATUS,RP0
0x07
TRISA
V
IN
+
V
IN
鈥?/div>
+
鈥?/div>
Output
V
IN鈥?/div>
V
IN+
Output
8.2
Comparator Operation
8.3.1
EXTERNAL REFERENCE SIGNAL
A single comparator is shown in Figure 8-3 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 8-3
represent the uncertainty due to input offsets and
response time.
When external voltage references are used, the
comparator module can be con铿乬ured 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 V
SS
and V
DD
, and can be applied to either
pin of the comparator(s).
8.3.2
INTERNAL REFERENCE SIGNAL
The comparator module also allows the selection of an
internally generated voltage reference for the
comparators. Section 13, Instruction Sets, 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 8-2). In this mode, the internal
voltage reference is applied to the V
IN
+ pin of both com-
parators.
1998 Microchip Technology Inc.
Preliminary
DS40182A-page 43

PIC16CE625相关型号PDF文件下载

  • 型号
    版本
    描述
    厂商
    下载
  • 英文版
    8-Pin FLASH-Based 8-Bit CMOS Microcontrollers
    MICROCHIP
  • 英文版
    8-Pin, 8-Bit CMOS Microcontroller with EEPROM Data Memory
    MICROCHIP ...
  • 英文版
    8-Pin, 8-Bit CMOS Microcontroller with A/D Converter and EEP...
    MICROCHIP ...
  • 英文版
    8-Pin, 8-Bit CMOS Microcontrollers
    MICROCHIP ...
  • 英文版
    EPROM Memory Programming Specification
    MICROCHIP ...
  • 英文版
    8-Pin FLASH-Based 8-Bit CMOS Microcontrollers
    MICROCHIP ...
  • 英文版
    Microcontroller
    MICROCHIP
  • 英文版
    Microcontroller 
    Microchip
  • 英文版
    Microcontroller
    ETC
  • 英文版
    EPROM-Based 8-Bit CMOS Microcontroller
    MICROCHIP
  • 英文版
    8-Pin, 8-Bit CMOS Microcontrollers
    MICROCHIP
  • 英文版
    8-Pin, 8-Bit CMOS Microcontrollers
    MICROCHIP ...
  • 英文版
    ETC
  • 英文版
    EPROM Memory Programming Specification
    MICROCHIP
  • 英文版
    EPROM Memory Programming Specification
    MICROCHIP ...
  • 英文版
    28-Pin Programmable Mixed Signal Controller
    Microchip
  • 英文版
    EPROM Memory Programming Specification
    Microchip
  • 英文版
    Microcontroller
    ETC
  • 英文版
    Microcontroller
    ETC
  • 英文版
    EPROM/ROM-Based 8-Bit CMOS Microcontroller Series
    MICROCHIP

扫码下载APP,
一键连接广大的电子世界。

在线人工客服

买家服务:
卖家服务:

0571-85317607

客服在线时间周一至周五
9:00-17:30

关注官方微信号,
第一时间获取资讯。

建议反馈

联系人:

联系方式:

按住滑块,拖拽到最右边
>>
感谢您向阿库提出的宝贵意见,您的参与是维库提升服务的动力!意见一经采纳,将有感恩红包奉上哦!