Comparator Peripheral Labs
? Fixed 0.6 reference option
? Output clamped to V SS
The CV REF has 2 ranges with 16 voltage levels in each range. Range selection is
controlled by the CV REF Range Selection (VRR) bit in the VRCON (Voltage Reference
Control Register) along with the CV REF Value Selection bits (VR<3:0>). The Value
Selection bits hold a value based upon some simple calculations to set the internal
reference voltage. The CV REF voltage is determined using Equation 4-1:
EQUATION 4-1:
CV REF OUTPUT VOLTAGE
VRR = 1 (Low-Range):
CV REF = (VR<3:0>/24) x V DD
VRR = 0 (High-Range):
CV REF = (V DD /4) + (VR<3:0> x V DD /32)
This lab will implement the low-range calculation by setting the VRR bit in VRCON
equal to 1. Equation 4-2 demonstrates how to calculate the VR<3:0> values, using the
low-range method, to obtain a 2.5V internal reference. If higher resolutions are
required, the high-range method should be used (see Section 8.10.2 in the PIC16F690
Data Sheet (DS-41262).
EQUATION 4-2:
CALCULATING A 2.5V INTERNAL REFERENCE
(LOW-RANGE METHOD)
VRR = 1 (Low-Range):
CV REF = (VR<3:0>/24) x V DD
Known: desired CV REF = 2.5V, V DD approximately 5V
Therefore:
2.5V = (VR<3:0>/24 x 5V
2.5V/5V = (VR<3:0>/24)
(2.5V/5V) x 24 = VR<3:0>
VR<3:0> = 12 10 or 1100 2
VR0 = 0
VR1 = 0
VR2 = 1
VR3 = 1
The Initialize() from the previous lab now must configure both the Comparator 1
peripheral and the CV REF as follows:
?
?
?
?
?
?
Turn on Comparator 1
Select CV REF the non-inverting reference for Comparator 1
Continue to use the C12IN0- pin as the inverting reference
Turn on CV REF
Select the low-range feature
Set the CV REF Value Selection bits as per the calculation in Equation 4-2.
Changes to the PICDEM? Development Board configuration schematic for this lab are
shown in Figure 4-3.
? 2009 Microchip Technology Inc.
DS41369A-page 65
相关PDF资料
DM164120-1 BOARD DEMO PICKIT 2 LP COUNT
DM164120-3 BOARD DEMO PICKIT2 28-PIN
DM164120-5 BOARD DEMO PICKIT 2 64/80-PIN
DM164123 KIT MANAGEMENT SYSTEM PICDEM
DM180021 KIT STARTER MPLAB FOR PIC18F MCU
DM183022 BOARD DEMO PIC18FXX22 64/80TQFP
DM183032 BOARD EXPLORER PICDEM PIC18
DM240001 BOARD DEMO PIC24/DSPIC33/PIC32
相关代理商/技术参数
DM163035+TEFLCST3 制造商:Microchip Technology Inc 功能描述:KIT PICDEMLAB+FLOWCODE-HOME BUNDLE/ 制造商:Microchip Technology Inc 功能描述:PICDEM, FLOW CODE, LAB, DEV KIT
DM163045 功能描述:开发板和工具包 - PIC / DSPIC PICDEM Lab Dev Kit (with PICkit 3) RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM1-63-C 功能描述:端子 Metric Fem Disc non-insulated RoHS:否 制造商:AVX 产品:Junction Box - Wire to Wire 系列:9826 线规:26-18 接线柱/接头大小: 绝缘: 颜色:Red 型式:Female 触点电镀:Tin over Nickel 触点材料:Beryllium Copper, Phosphor Bronze 端接类型:Crimp
DM1-63M-C 功能描述:端子 Metric Male Disc non-insulated, 0 RoHS:否 制造商:AVX 产品:Junction Box - Wire to Wire 系列:9826 线规:26-18 接线柱/接头大小: 绝缘: 颜色:Red 型式:Female 触点电镀:Tin over Nickel 触点材料:Beryllium Copper, Phosphor Bronze 端接类型:Crimp
DM164 制造商:SITI 制造商全称:SITI 功能描述:8x3-CHANNEL CONSTANT CURRENT LED DRIVER
DM1640 制造商:SANYO 制造商全称:Sanyo Semicon Device 功能描述:16 characters x 4 line Liquid Crystal Dot Matrix Display Module
DM1640-0AL1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Optoelectronic
DM1640-0BL1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Optoelectronic