English
Language : 

MC68HC705JJ7 Datasheet, PDF (92/164 Pages) Freescale Semiconductor, Inc – Microcontrollers
Analog Subsystem
8.7 Voltage Comparator Features
The two internal comparators can be used as simple voltage comparators if set up as described in
Table 8-8. Both comparators can be active in the wait mode and can directly restart the part by means of
the analog interrupt. Both comparators can also be active in the stop mode, but cannot directly restart the
part. However, the comparators can directly drive PB4 which can then be connected externally to activate
either a port interrupt on the PA0:3 pins or the IRQ/VPP pin.
Table 8-8. Voltage Comparator Setup Conditions
Comparator
1
2
Current
Source
Enable
Not
affected
ISEN = 0
Discharge
Device
Disable
Not
affected
ISEN = 0
Port B Pin
as Inputs
DDRB2 = 0
DDRB3 = 0
DDRB0 = 0
DDRB1 = 0
Port B Pin
Pulldowns
Disabled
Prog. Timer Input
Capture
Source
PDIB2 = 1
PDIB3 = 1
Not
affected
PDIB0 = 1
PDIB1 = 1
ICEN = 0
IEDG = 1
8.7.1 Voltage Comparator 1
Voltage comparator 1 is always connected to two of the port B I/O pins. These pins should be configured
as inputs and have their software programmable pulldowns disabled. Also, the negative input of voltage
comparator 1 is connected to the PB3/AN3/TCAP and shared with the input capture function of the 16-bit
programmable timer. Therefore, the timer input capture interrupt should be disabled so that changes in
the voltage on the PB3/AN3/TCAP pin do not cause unwanted input capture interrupts.
The output of comparator 1 can be connected to the port logic driving the PB4/AN4/TCMP/CMP1 pin such
that the output of the comparator is ORed with the PB4 data bit and the OLVL bit from the 16-bit timer.
This capability requires that the OPT bit is set in the COPR at location $1FF0 as in Figure 8-12, and the
COE1 bit is set in the ASR at location $001E.
Address:
Read:
Write:
Reset:
$1FF0
Bit 7
6
5
4
3
2
1
EPMSEC OPT
U
U
U
U
U
U
U
= Unimplemented
U = Unaffected
Figure 8-12. COP and Security Register (COPR)
Bit 0
COPC
U
OPT — Optional Features Bit
The OPT bit enables two additional features: direct drive by comparator 1 output to PB4 and voltage
offset capability to sample capacitor in analog subsystem.
1 = Optional features enabled
0 = Optional features disabled
MC68HC705JJ7 • MC68HC705JP7 Advance Information Data Sheet, Rev. 4.1
92
Freescale Semiconductor