Philips P89LPC901 Light Therapy Device User Manual


 
Philips Semiconductors
User’s Manual - Preliminary -
P89LPC901/902/903
ANALOG COMPARATORS
2003 Dec 8 77
Figure 10-4: Comparator Input and Output Connections - P89LPC903
Figure 10-5: 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 CMFn 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
+
-
(P0.4) CIN1A
Comparator 1
CO1
(P0.5) CMPREF
Vref
+
-
(P0.2) CIN2A
Comparator 2
CO2
CN1
Change Detect
CMF1
Change Detect
CMF2
Interrupt
CN2
EC
+
-
CINnA
CMPREF
COn
CN, OE = 0 0
+
-
CINnA
CMPREF
CMPn
COn
CN, OE = 0 1
+
-
CINnA
Vref (1.23V)
CMPn
COn
CN, OE = 1 1
CN, OE = 1 0
+
-
CINnA
Vref (1.23V)
COn