Philips P89LPC906 Computer Monitor User Manual


 
Philips Semiconductors
User’s Manual - Preliminary -
P89LPC906/907/908
ANALOG COMPARATORS
2003 Dec 8 74
Figure 10-2: Comparator Input and Output Connections
Figure 10-3: Comparator Configurations
INTERNAL REFERENCE VOLTAGE
An internal reference voltage, Vref, may supply a default reference when a single comparator input pin is used. Please refer to
the Datasheet for specifications.
COMPARATOR INTERRUPT
The comparator has an interrupt flag, CMF1, contained in its configuration register. This flag is set whenever the comparator
output changes state. The flag may be polled by software or may be used to generate an interrupt. The interrupt will be generated
when the interrupt enable bit EC in the IEN1 register is set and the interrupt system is enabled via the EA bit in the IEN0 register.
When a comparator is disabled the comparator’s output, COx, goes high. If the comparator output was low and then is disabled,
the resulting transition of the comparator output from a low to high state will set the the comparator flag, CMFx. This will cause
an interrupt if the comparator interrupt is enabled. The user should therefore disable the comparator interrupt prior to disabling
the comparator. Additionally, the user should clear the comparator flag, CMFx, after disabling the comparator.
COMPARATOR AND POWER REDUCTION MODES
The comparator(s) may remain enabled when Power down or Idle mode is activated, but the comparator(s) are disabled
automatically in Total Power down mode.
If the comparator interrupt is enabled (except in Total Power down mode), a change of the comparator output state will generate
an interrupt and wake up the processor.
+
-
(P0.4) CIN1A
Comparator 1
CO1
OE1
(P0.5) CMPREF
Vref
CN1
CMP1 (P0.6)
Change Detect
CMF1
Interrupt
EC
+
-
CIN1A
CMPREF
CO1
CN1, OE1 = 0 0
+
-
CIN1A
CMPREF
CMP1
CO1
CN1, OE1 = 0 1
+
-
CIN1A
Vref (1.23V)
CMP1
CO1
CN1, OE 1= 1 1CN1, OE1 = 1 0
+
-
CIN1A
Vref (1.23V)
CO1