P89LPC912_913_914_5 © NXP B.V. 2007. All rights reserved.
Product data sheet Rev. 05 — 28 September 2007 40 of 66
NXP Semiconductors
P89LPC912/913/914
8-bit microcontrollers with two-clock 80C51 core
8.18.2 Mode 1
10 bits are transmitted (through TXD) or received (through RXD): a start bit (logic 0),
8 data bits (LSB first), and a stop bit (logic 1). When data is received, the stop bit is stored
in RB8 in Special Function Register SCON. The baud rate is variable and is determined
by the Timer 1 overflow rate or the Baud Rate Generator (described in Section 8.18.5
“Baud rate generator and selection”).
8.18.3 Mode 2
11 bits are transmitted (through TXD) or received (through RXD): start bit (logic 0), 8 data
bits (LSB first), a programmable 9
th
data bit, and a stop bit (logic 1). When data is
transmitted, the 9
th
data bit (TB8 in SCON) can be assigned the value of logic 0 or logic 1.
Or, for example, the parity bit (P, in the PSW) could be moved into TB8. When data is
received, the 9
th
data bit goes into RB8 in Special Function Register SCON, while the stop
bit is not saved. The baud rate is programmable to either
1
16
or
1
32
of the CCLK
frequency, as determined by the SMOD1 bit in PCON.
8.18.4 Mode 3
11 bits are transmitted (through TXD) or received (through RXD): a start bit (logic 0), 8
data bits (LSB first), a programmable 9
th
data bit, and a stop bit (logic 1). In fact, Mode 3 is
the same as Mode 2 in all respects except baud rate. The baud rate in Mode 3 is variable
and is determined by the Timer 1 overflow rate or the Baud Rate Generator (described in
section Section 8.18.5 “Baud rate generator and selection”).
8.18.5 Baud rate generator and selection
The P89LPC913 and P89LPC914 devices have an independent Baud Rate Generator.
The baud rate is determined by a baud-rate preprogrammed into the BRGR1 and BRGR0
SFRs which together form a 16-bit baud rate divisor value that works in a similar manner
as Timer 1. If the baud rate generator is used, Timer 1 can be used for other timing
functions.
The UART can use either Timer 1 or the baud rate generator output (see Figure 15). Note
that Timer T1 is further divided by 2 if the SMOD1 bit (PCON.7) is cleared. The
independent Baud Rate Generator uses CCLK.
8.18.6 Framing error
Framing error is reported in the status register (SSTAT). In addition, if SMOD0 (PCON.6)
is logic 1, framing errors can be made available in SCON.7, respectively. If SMOD0 is
logic 0, SCON.7 is SM0. It is recommended that SM0 and SM1 (SCON[7:6]) are set up
when SMOD0 is logic 0.
Fig 15. Baud rate sources for UART (Modes 1, 3)
baud rate modes 1 and 3
SBRGS = 1
SBRGS = 0
SMOD1 = 0
SMOD1 = 1
timer 1 overflow
(PCLK-based)
baud rate generator
(CCLK-based)
002aaa419
÷2
P89LPC912_913_914_5 © NXP B.V. 2007. All rights reserved.
Product data sheet Rev. 05 — 28 September 2007 41 of 66
NXP Semiconductors
P89LPC912/913/914
8-bit microcontrollers with two-clock 80C51 core
8.18.7 Break detect
Break detect is reported in the status register (SSTAT). A break is detected when
11 consecutive bits are sensed LOW. The break detect can be used to reset the device.
8.18.8 Double buffering
The UART has a transmit double buffer that allows buffering of the next character to be
written to SBUF while the first character is being transmitted. Double buffering allows
transmission of a string of characters with only one stop bit between any two characters,
as long as the next character is written between the start bit and the stop bit of the
previous character.
Double buffering can be disabled. If disabled (DBMOD, i.e., SSTAT.7 = 0), the UART is
compatible with the conventional 80C51 UART. If enabled, the UART allows writing to
SnBUF while the previous data is being shifted out. Double buffering is only allowed in
Modes 1, 2 and 3. When operated in Mode 0, double buffering must be disabled
(DBMOD = 0).
8.18.9 Transmit interrupts with double buffering enabled (modes 1, 2 and 3)
Unlike the conventional UART, in double buffering mode, the TX interrupt is generated
when the double buffer is ready to receive new data.
8.18.10 The 9
th
bit (bit 8) in double buffering (modes 1, 2 and 3)
If double buffering is disabled TB8 can be written before or after SBUF is written, as long
as TB8 is updated some time before that bit is shifted out. TB8 must not be changed until
the bit is shifted out, as indicated by the TX interrupt.
If double buffering is enabled, TB8 must be updated before SBUF is written, as TB8 will
be double-buffered together with SBUF data.
8.19 Serial Peripheral Interface (SPI)
P89LPC912/913/914 provides another high-speed serial communication interface—the
SPI interface. SPI is a full-duplex, high-speed, synchronous communication bus with two
operation modes: Master mode and Slave mode. Up to 4.5 Mbit/s can be supported in
Master mode or 3 Mbit/s in Slave mode. It has a Transfer Completion Flag and Write
Collision Flag Protection.
P89LPC912_913_914_5 © NXP B.V. 2007. All rights reserved.
Product data sheet Rev. 05 — 28 September 2007 42 of 66
NXP Semiconductors
P89LPC912/913/914
8-bit microcontrollers with two-clock 80C51 core
The SPI interface has four pins: SPICLK, MOSI, MISO, and SS:
Fig 16. SPI block diagram (P89LPC912, P89LPC914)
8 BIT SHIFT REGISTER
MISO
P2.3
MOSI
P2.2
SPICLK
P2.5
SS
P2.4
S
S
S
M
M
M
CLOCK LOGIC
CPOL
SPR1
SPR0
CPHA
MSTR
SPR0
SPEN
DORD
SPR1
SSIG
SELECT
SPEN
MSTR
MSTR SPEN
WCOLSPIF
002aaa497
CPU clock
DIVIDER
BY 4, 16, 64, 128
SPI CONTROL
SPI STATUS
REGISTER
SPI
interrupt
request
SPI clock master
internal
data bus
SPI CONTROL REGISTER
READ DATA BUFFER
PIN
CONTROL
LOGIC
clock
Fig 17. SPI block diagram (P89LPC913)
8 BIT SHIFT REGISTER
MISO
P2.3
MOSI
P2.2
SPICLK
P2.5
S
S
S
M
M
M
CLOCK LOGIC
CPOL
SPR1
SPR0
CPHA
MSTR
SPR0
SPEN
DORD
SPR1
SSIG
SELECT
SPEN
MSTR
MSTR SPEN
WCOLSPIF
002aaa498
CPU clock
DIVIDER
BY 4, 16, 64, 128
SPI CONTROL
SPI STATUS
REGISTER
SPI
interrupt
request
SPI clock master
internal
data bus
SPI CONTROL REGISTER
READ DATA BUFFER
PIN
CONTROL
LOGIC
clock

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