PIC14000-04 Microchip Technology, PIC14000-04 Datasheet - Page 67
![no-image](/images/manufacturer_photos/0/4/439/microchip_technology_sml.jpg)
PIC14000-04
Manufacturer Part Number
PIC14000-04
Description
28-Pin Programmable Mixed Signal Controller
Manufacturer
Microchip Technology
Datasheet
1.PIC14000-04.pdf
(152 pages)
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
PIC14000-04/SO
Manufacturer:
Microchip Technology
Quantity:
135
Company:
Part Number:
PIC14000-04/SO
Manufacturer:
Maxim
Quantity:
103
Company:
Part Number:
PIC14000-04/SP
Manufacturer:
Microchip
Quantity:
482
Part Number:
PIC14000-04/SP
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Company:
Part Number:
PIC14000-04/SS
Manufacturer:
Microchip Technology
Quantity:
135
Part Number:
PIC14000-04/SS
Manufacturer:
MICROCHI
Quantity:
20 000
FIGURE 9-2:
9.5
9.5.1
The PIC14000 includes two independent low-power
comparators for comparing the programmable refer-
ence outputs to either the RA1/AN1 or RA5/AN5 pins.
The negative input of each comparator is tied to one of
the reference outputs as shown in Figure 9-3. The
comparator positive inputs are connected to the output
of the RA1/AN1 and RA5/AN5 level-shift networks.
At reset, the RA1/AN1 level-shift output is connected to
the positive inputs of both comparators. This allows a
window comparison of the RA1/AN1 voltage using the
two programmable references and comparators. Set-
ting CMBOE (CMCON<5>) changes the configuration
so that RA1/AN1 and RA5/AN5 may be independently
monitored.
The comparator outputs can be read by the CMAOUT
(CMCON<2>) and CMBOUT (CMCON<6>) bits. These
are read-only bits and writes to these locations have no
effect.
Either a rising or falling comparator output can gener-
ate an interrupt to the CPU as controlled by the polarity
bits CPOLA (CMCON<0>) and CPOLB (CMCON<4>).
The CMIF bit (PIR1<7>) interrupt flag is set whenever
the exclusive-OR of the comparator output CMxOUT
and the CPOLx bits equal a logic one. As with other
peripheral interrupts, the corresponding enable bit
CMIE (PIE1<7>) must also be set to enable the com-
parator interrupt. In addition, the global interrupt enable
and peripheral interrupt enable bits INTCON<7:6>
must also be set. This comparator interrupt is level sen-
sitive.
1996 Microchip Technology Inc.
REFOFF (SLPCON<5>)
Comparator and Programmable
Reference Modules
COMPARATORS
SREFLO
K
REF
Reference
Bandgap
SLOPE REFERENCE DIVIDER
=
~
SREFHI
SREFHI - SREFLO
9
SREFLO
V
REF
ADOFF (SLPCON<0>)
Preliminary
+
_
The
RC1/CMPA or RD2/CMPB pins by setting the CMAOE
(CMCON<1>) or CMBOE (CMCON<5>) bits. Setting
CMxOE does not affect the comparator operation. It
only enables the pin function regardless of the port
TRIS register setting.
Both the references and the comparators are enabled
by clearing the CMOFF (SLPCON<2>) bit.
9.5.2
The PIC14000 includes two independent, programma-
ble voltage references. Each reference is built using
two resistor ladders, bandgap-referenced current
source, and analog multiplexers. The first ladder con-
tains 32 taps, and is divided into three ranges (upper,
middle, and lower) to provide a coarse voltage adjust-
ment. The coarse ladder includes 1k and 10k resistors
yielding a step size of either 5 or 50 mV (nominal)
depending on the selected range. Figure 9-8 shows the
comparator and reference architecture.
across the selected coarse ladder resistor to increase
resolution. This subdivides the coarse ladder step by
approximately 1/8. Thus, resolutions approaching 5/8
mV are obtainable.
A second ladder contains eight taps, and is connected
comparator
PROGRAMMABLE REFERENCES
outputs
SREFHI
SREFLO
PIC14000
are
visible
DS40122B-page 67
To A/D
MUX
at
either