P89LPC912_913_914_5 © NXP B.V. 2007. All rights reserved.
Product data sheet Rev. 05 — 28 September 2007 43 of 66
NXP Semiconductors
P89LPC912/913/914
8-bit microcontrollers with two-clock 80C51 core
SPICLK, MOSI and MISO are typically tied together between two or more SPI
devices. Data flows from master to slave on MOSI (Master Out Slave In) pin and flows
from slave to master on MISO (Master In Slave Out) pin. The SPICLK signal is output
in the master mode and is input in the slave mode. If the SPI system is disabled, i.e.
SPEN (SPCTL.6) = 0 (reset value), these pins are configured for port functions.
SS is the optional slave select pin. In a typical configuration, an SPI master asserts
one of its port pins to select one SPI device as the current slave. An SPI slave device
uses its SS pin to determine whether it is selected.
Typical connections are shown in Figure 18, 19, and 20.
The P89LPC913 does not have the slave select pin, SS. The SPI interface is set to
Master mode and an I/O pin may be used to implement the SS function. Typical
connections are shown in Figure 18 and Figure 19.
8.19.1 Typical SPI configurations
Fig 18. SPI single master single slave configuration
002aaa901
master slave
8-BIT SHIFT
REGISTER
SPI CLOCK
GENERATOR
8-BIT SHIFT
REGISTER
MISO
MOSI
SPICLK
PORT
MISO
MOSI
SPICLK
SS
P89LPC912_913_914_5 © NXP B.V. 2007. All rights reserved.
Product data sheet Rev. 05 — 28 September 2007 44 of 66
NXP Semiconductors
P89LPC912/913/914
8-bit microcontrollers with two-clock 80C51 core
Fig 19. SPI single master multiple slaves configuration
Fig 20. SPI dual device configuration, where either can be a master or a slave
002aaa903
master slave
8-BIT SHIFT
REGISTER
SPI CLOCK
GENERATOR
8-BIT SHIFT
REGISTER
MISO
MOSI
SPICLK
port
port
MISO
MOSI
SPICLK
SS
slave
8-BIT SHIFT
REGISTER
MISO
MOSI
SPICLK
SS
002aaa902
master slave
8-BIT SHIFT
REGISTER
SPI CLOCK
GENERATOR
SPI CLOCK
GENERATOR
8-BIT SHIFT
REGISTER
MISO
MOSI
SPICLK
MISO
MOSI
SPICLK
SS
SS
P89LPC912_913_914_5 © NXP B.V. 2007. All rights reserved.
Product data sheet Rev. 05 — 28 September 2007 45 of 66
NXP Semiconductors
P89LPC912/913/914
8-bit microcontrollers with two-clock 80C51 core
8.20 Analog comparators
Two analog comparators are provided on the P89LPC912/913/914. Input and output
options allow use of the comparators in a number of different configurations. Comparator
operation is such that the output is a logic 1 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. Each comparator may be configured to cause an interrupt when the
output value changes. Comparator 1 may be output to a port pin.
The overall connections to both comparators are shown in Figure 21. The comparators
function to V
DD
= 2.4 V.
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.
8.21 Internal reference voltage
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
ref(bg)
, is 1.23 V ± 3%.
8.22 Comparator interrupt
Each comparator has an interrupt flag 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 two comparators use one common interrupt
vector. If both comparators enable interrupts, after entering the interrupt service routine,
the user needs to read the flags to determine which comparator caused the interrupt.
Possible comparator configurations are shown in Figure 22.
Fig 21. Comparator input and output connections
(P0.4) CIN1A
(P0.5) CMPREF
(P0.2) CIN2A
CMF1
CMF2
CN1
CN2
CO1
OE1
CMP1 (P0.6)
EC
002aaa496
V
ref(bg)
comparator 1
comparator 2
interrupt
change detect
change detect

P89LPC914FDH,129

Mfr. #:
Manufacturer:
NXP Semiconductors
Description:
IC MCU 8BIT 1KB FLASH 14TSSOP
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet