p89lpc904 NXP Semiconductors, p89lpc904 Datasheet - Page 28

no-image

p89lpc904

Manufacturer Part Number
p89lpc904
Description
8-bit Microcontrollers With Two-clock Accelerated 80c51 Core 1 Kb 3 V Byte-erasable Flash With 8-bit A/d Converter
Manufacturer
NXP Semiconductors
Datasheet
Philips Semiconductors
9397 750 13521
Preliminary data
Fig 8. Comparator input and output connections.
(P0.5) CMPREF
(P0.4) CIN1A
(P0.2) CIN2A
V REF
8.20 Analog comparators
8.21 Internal reference voltage
Two analog comparators are provided on the P89LPC904. Comparator operation is
such that the output is a logic 1 (which may be read in a register) when the positive
input is greater than the negative input (selectable from a pin or an internal reference
voltage). Otherwise the output is a zero. The comparator may be configured to cause
an interrupt when the output value changes.
The connections to the comparator are shown in
to V
When the comparator is first enabled, the comparator’s interrupt flag is not
guaranteed to be stable for 10 microseconds. The comparator interrupt should not be
enabled during that time, and the comparator interrupt flag must be cleared before
the interrupt is enabled in order to prevent an immediate interrupt service.
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 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.
An internal reference voltage generator may supply a default reference when a single
comparator input pin is used. The value of the internal reference voltage, referred to
as V
DD
REF
= 2.4 V.
, is 1.23 V 10 %.
CN1
CN2
Comparator 1
Comparator 2
Rev. 02 — 25 June 2004
8-bit microcontrollers with two-clock accelerated 80C51 core
CO1
CO2
Change Detect
Change Detect
CMF1
CMF2
Figure
© Koninklijke Philips Electronics N.V. 2004. All rights reserved.
8. The comparator functions
002aaa785
P89LPC904
EC
Interrupt
28 of 41

Related parts for p89lpc904