Datasheet
PIC14000
DS40122B-page 68
Preliminary
1996 Microchip Technology Inc.
Two registers PREFA (9Bh) and PREFB (9Ch) are
used to select the reference output voltages. The
PREFx<7:3> bits select the output from the coarse lad-
der, while PREFx<2:0> bits are for the fine-tune adjust-
ment. Table 9-1 and Table 9-2 show the reference
decoding.
These voltages are visible at either RC0/REFA or
RD3/REFB pins by setting the CMAOE (CMCON<1>)
or CMBOE (CMCON<5>) bits. Setting CMxOE does
not affect the reference voltages. It only enables the pin
function regardless of the port TRIS register setting.
These outputs are not buffered, so they cannot directly
drive any DC loads.
The reference outputs are also connected to two inde-
pendent comparators, COMPA and COMPB. Thus, the
references can be used to set the comparator trip-
points. The A/D converter can also monitor the refer-
ence outputs via A/D channels 8 and 9. Refer to
Section 8 for the description of the A/D operation.
The programmable reference output is designed to
track the output from the level shift network. However,
there will always be some mismatch due to component
drift. For best accuracy, the A/D should be used to peri-
odically calibrate the references to the desired
set-point.
FIGURE 9-3: COMPARATOR AND PROGRAMMABLE REFERENCE BLOCK DIAGRAM
(ONE OF TWO SHOWN)
From AN1 Level
Shift Network
CMOFF
RC1/CMPA or
RC0/REFA or
~5 µA
PREFx<7:3>
PREFx<7:3>
CPOLx
To A/D
Converter
Analog
Mux
(1 of 32)
Analog
Mux
(1-of-8)
PREFx<2:0>
~0.15V
~0.85V
Fine Tune Adjust
Coarse Adjust
To CMxOUT bit,
CMCON register
_
+
Programmable
Analog
Mux
(1 of 32)
RD3/REFB
CMxOE
RD2/CMPB
From Other
Comparator
CMIF bit
PIR1<7>
Reference
From AN5 Level
Shift Network
CMBOE
Channel B only