English
Language : 

MC68HC05JJ6 Datasheet, PDF (133/216 Pages) Freescale Semiconductor, Inc – General Release Specification Microcontrollers
Analog Subsystem
8.8 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 stop mode,
but cannot directly restart the part. However, the comparators can
directly drive a PA4 or PA5 pin, which can then be connected externally
to activate either a port interrupt on the PA0:PA3 pins or the IRQ pin.
Table 8-8. Voltage Comparator Setup Conditions
Comparator
Current
Source
Enable
Discharge
Device
Disable
Port B Pin
as Inputs
1
Not Affected Not Affected
DDRB2 = 0
DDRB3 = 0
2
ISEN = 0
ISEN = 0
DDRB0 = 0
DDRB1 = 0
Port B Pin
Pulldowns
Disabled
PDIB2 = 1
PDIB3 = 1
PDIB0 = 1
PDIB1 = 1
Prog. Timer
Input
Capture
Source
Not
Affected
ICEN = 0
IEDG = 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 proper mask option and the COE1 bit
set in the ASR at location $001E.
Voltage Comparator 2
Voltage comparator 2 can be used as a simple comparator if its
charge current source and discharge device are disabled by clearing
the ISEN bit in the ACR. If the ISEN bit is set, the internal ramp
discharge device connected to PB0/AN0 may become active and try
MC68HC05JJ6/MC68HC05JP6 — Rev. 3.2
Freescale Semiconductor
Analog Subsystem
General Release Specification
133