Philips Semiconductors Preliminary data
P87LPC769
Low power, low price, low pin count (20 pin)
microcontroller with 4 kB OTP 8-bit A/D, and DAC
2002 Mar 12
13
Digital to Analog Converter (DAC) Outputs
The P87LPC769 provides a two channel, 8-bit DAC function. DAC0
is also a part of the A/D Converter and it should not be enabled
while the A/D is active. Digital outputs must be disabled on the DAC
output pins while the corresponding DAC is enabled, as described in
the section Analog Functions.
The DACs use the power supply as the references: V
DD
as the
upper reference and V
SS
as the lower reference. The DAC output is
generated by a tap from a resistor ladder and is not buffered. The
maximum resistance to V
DD
or V
SS
from a DAC output is 10k.
Care must be taken with the loading of the DAC outputs in order to
avoid distortion of the output voltage. DAC accuracy is affected by
noise generated on-chip and elsewhere in the application. Since the
P87LPC769 power pins are used for the DAC references, the power
supply also affects the accuracy of the DAC outputs.
The ideal DAC output may be calculated as follows:
Result + (DAC Value ) 0.5)
V
DD
* V
SS
256
where DAC value is the contents of the relevant DAC register:
DAC0 or DAC1.
SU01371
D/A CONVERTER
ENDACn
V
REF
+ = V
DD
DACn pin
V
REF
– = V
ss
ADCON DACn
Figure 4. DAC Block Diagram
Philips Semiconductors Preliminary data
P87LPC769
Low power, low price, low pin count (20 pin)
microcontroller with 4 kB OTP 8-bit A/D, and DAC
2002 Mar 12
14
Analog Comparators
Two analog comparators are provided on the P87LPC769. Input and
output options allow use of the comparators in a number of different
configurations. Comparator operation is such that the output is a
logical one (which may be read in a register and/or routed to a pin)
when the positive input (one of two selectable pins) is greater than
the negative input (selectable from a pin or an internal reference
voltage). Otherwise the output is a zero. Each comparator may be
configured to cause an interrupt when the output value changes.
Comparator Configuration
Each comparator has a control register, CMP1 for comparator 1 and
CMP2 for comparator 2. The control registers are identical and are
shown in Figure 5.
The overall connections to both comparators are shown in Figure 6.
There are eight possible configurations for each comparator, as
determined by the control bits in the corresponding CMPn register:
CPn, CNn, and OEn. These configurations are shown in Figure 7.
When each comparator is first enabled, the comparator output and
interrupt flag are not guaranteed to be stable for 10 microseconds.
The corresponding 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.
BIT SYMBOL FUNCTION
CMPn.7, 6 Reserved for future use. Should not be set to 1 by user programs.
CMPn.5 CEn Comparator enable. When set by software, the corresponding comparator function is enabled.
Comparator output is stable 10 microseconds after CEn is first set.
CMPn.4 CPn Comparator positive input select. When 0, CINnA is selected as the positive comparator input. When
1, CINnB is selected as the positive comparator input.
CMPn.3 CNn Comparator negative input select. When 0, the comparator reference pin CMPREF is selected as
the negative comparator input. When 1, the internal comparator reference V
ref
is selected as the
negative comparator input.
CMPn.2 OEn Output enable. When 1, the comparator output is connected to the CMPn pin if the comparator is
enabled (CEn = 1). This output is asynchronous to the CPU clock.
CMPn.1 COn Comparator output, synchronized to the CPU clock to allow reading by software. Cleared when the
comparator is disabled (CEn = 0).
CMPn.0 CMFn Comparator interrupt flag. This bit is set by hardware whenever the comparator output COn changes
state. This bit will cause a hardware interrupt if enabled and of sufficient priority. Cleared by
software and when the comparator is disabled (CEn = 0).
CMFn
SU01152
COnOEnCNnCPnCEn
01234567
CMPn
Reset Value: 00h
Not Bit Addressable
Address: ACh for CMP1, ADh for CMP2
Figure 5. Comparator Control Registers (CMP1 and CMP2)
Philips Semiconductors Preliminary data
P87LPC769
Low power, low price, low pin count (20 pin)
microcontroller with 4 kB OTP 8-bit A/D, and DAC
2002 Mar 12
15
SU01153
+
(P0.4) CIN1A
COMPARATOR 1
(P0.3) CIN1B
CO1
OE1
(P0.5) CMPREF
+
(P0.2) CIN2A
COMPARATOR 2
(P0.1) CIN2B
CO2
OE2
CP1
CN1
CP2
CN2
CMP2 (P0.0)
CMP1 (P0.6)
CHANGE DETECT
CMF1
INTERRUPT
CHANGE DETECT
CMF2
INTERRUPT
V
ref
Figure 6. Comparator Input and Output Connections
V
ref
(1.23V) V
ref
(1.23V)
V
ref
(1.23V)
SU01154
+
CINnA
CMPREF
COn
CPn, CNn, OEn = 0 0 0
+
CINnA
CMPREF
CMPn
COn
CPn, CNn, OEn = 0 0 1
+
CINnA
CMPn
COn
CPn, CNn, OEn = 0 1 1
+
CINnB
CMPREF
CMPn
COn
CPn, CNn, OEn = 1 0 1
+
CINnB
CMPn
COn
CPn, CNn, OEn = 1 1 1
CPn, CNn, OEn = 0 1 0
CPn, CNn, OEn = 1 0 0
CPn, CNn, OEn = 1 1 0
+
CINnA
Vref (1.23V)
COn
+
CINnB
CMPREF
COn
+
CINnB
COn
Figure 7. Comparator Configurations

P87LPC769HD,512

Mfr. #:
Manufacturer:
NXP Semiconductors
Description:
Microcontrollers - MCU 8-bit Microcontrollers - MCU 80C51 4K/128 OTP ADC
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet