P89LPC9401: 1. General Description
P89LPC9401: 1. General Description
1. General description
The P89LPC9401 is a multi-chip module consisting of a P89LPC931 single-chip
microcontroller combined with a PCF8576D universal LCD driver in a low-cost 64-pin
package. The LCD driver provides 32 segments and supports from 1 to 4 backplanes.
Display overhead is minimized by an on-chip display RAM with auto-increment
addressing.
2. Features
2.1 Principal features
8 kB byte-erasable flash code memory organized into 1 kB sectors and 64-byte pages.
Single-byte erasing allows any byte(s) to be used as non-volatile data storage.
256-byte RAM data memory.
32 segment 4 backplane LCD controller supports from 1 to 4 backplanes.
Two analog comparators with selectable inputs and reference source.
Two 16-bit counter/timers (each may be configured to toggle a port output upon timer
overflow or to become a PWM output) and a 23-bit system timer that can also be used
as a Real-Time Clock (RTC).
Enhanced UART with fractional baud rate generator, break detect, framing error
detection, and automatic address detection; 400 kHz byte-wide I2C-bus
communication port and SPI communication port.
High-accuracy internal RC oscillator option allows operation without external oscillator
components. The RC oscillator option is selectable and fine tunable.
2.4 V to 3.6 V VDD operating range. I/O pins are 5 V tolerant (may be pulled up or
driven to 5.5 V).
64-pin LQFP package with 20 microcontroller I/O pins minimum and up to 23
microcontroller I/O pins while using on-chip oscillator and reset options.
Serial flash In-Circuit Programming (ICP) allows simple production coding with
commercial EPROM programmers. Flash security bits prevent reading of sensitive
application programs.
P89LPC9401
Philips Semiconductors
Serial flash In-System Programming (ISP) allows coding while the device is mounted
in the end application.
In-Application Programming (IAP) of the flash code memory. This allows changing the
code in a running application.
Watchdog timer with separate on-chip oscillator, requiring no external components.
The watchdog prescaler is selectable from eight values.
Low voltage detect (brownout) allows a graceful system shutdown when power fails.
May optionally be configured as an interrupt.
Idle and two different power-down reduced power modes. Improved wake-up from
Power-down mode (a LOW interrupt input starts execution). Typical power-down
current is 9 A typical (total power-down with voltage comparators disabled).
Active-LOW reset. On-chip power-on reset allows operation without external reset
components. A reset counter and reset glitch suppression circuitry prevent spurious
and incomplete resets. A software reset function is also available.
Configurable on-chip oscillator with frequency range options selected by user
programmed flash configuration bits. Oscillator options support frequencies from
20 kHz to the maximum operating frequency of 18 MHz.
Oscillator fail detect. The watchdog timer has a separate fully on-chip oscillator
allowing it to perform an oscillator fail detect function.
Programmable port output configuration options: quasi-bidirectional, open drain,
push-pull, input-only.
Port input pattern match detect. Port 0 may generate an interrupt when the value of
the pins match or do not match a programmable pattern.
LED drive capability (20 mA) on all port pins. A maximum limit is specified for the
entire chip.
Controlled slew rate port outputs to reduce EMI. Outputs have approximately 10 ns
minimum ramp times.
Only power and ground connections are required to operate the P89LPC9401 when
internal reset option is selected.
Four interrupt priority levels.
Eight keypad interrupt inputs, plus two additional external interrupt inputs.
Schmitt trigger port inputs.
Second data pointer.
P89LPC9401_1
2 of 59
P89LPC9401
Philips Semiconductors
3. Ordering information
Table 1:
Ordering information
Type number
P89LPC9401FBD
Package
Name
Description
Version
LQFP64
SOT791-1
Part options
Type number
Flash memory
Temperature range
Frequency
P89LPC9401FBD
8 kB
40 C to +85 C
0 MHz to 18 MHz
P89LPC9401_1
3 of 59
P89LPC9401
Philips Semiconductors
4. Block diagram
P3[1:0]
S[31:0]
P2.5, P2[3:0]
BP[3:0]
PCF8576D
P89LPC931
LCD
CONTROLLER
MCU
P1[7:0]
OSC
P0[7:0]
SA0
A[2:0]
VLCD
SCL_LCD, SDA_LCD
SCL, SDA
002aab460
P89LPC9401_1
4 of 59
P89LPC9401
Philips Semiconductors
P89LPC931
ACCELERATED 2-CLOCK 80C51 CPU
UART
TXD
RXD
256-BYTE
DATA RAM
I2C-BUS
SCL
SDA
P3[1:0]
PORT 3
CONFIGURABLE I/Os
SPI
P2.5, P2[3:0]
PORT 2
CONFIGURABLE I/Os
REAL-TIME CLOCK/
SYSTEM TIMER
P1[7:0]
PORT 1
CONFIGURABLE I/Os
P0[7:0]
PORT 0
CONFIGURABLE I/Os
8 kB CODE FLASH
internal bus
SPICLK
MOSI
MISO
T0
T1
TIMER 0
TIMER 1
ANALOG
COMPARATORS
KEYPAD
INTERRUPT
CMP2
CIN2B
CIN2A
CMP1
CIN1A
CIN1B
WATCHDOG TIMER
AND OSCILLATOR
PROGRAMMABLE
OSCILLATOR DIVIDER
CRYSTAL
OR
RESONATOR
X1
X2
CONFIGURABLE
OSCILLATOR
CPU
clock
ON-CHIP
RC
OSCILLATOR
POWER MONITOR
(POWER-ON RESET,
BROWNOUT RESET)
002aab461
P89LPC9401_1
5 of 59
P89LPC9401
Philips Semiconductors
S0 TO S39
BACKPLANE
OUTPUTS
VDD
LCD
VOLTAGE
SELECTOR
DISPLAY LATCH
LCD BIAS
GENERATOR
VLCD
SHIFT REGISTER
CLK
TIMING
BLINKER
SYNC
DISPLAY
CONTROLLER
OSC
OSCILLATOR
POWERON
RESET
SCL
DISPLAY
RAM
40 4 BITS
OUTPUT
BANK
SELECTOR
DATA
POINTER
COMMAND
DECODER
VSS
SDA
INPUT
BANK
SELECTOR
INPUT
FILTERS
I2C-BUS
CONTROLLER
SUBADDRESS
COUNTER
SA0
A0 A1 A2
002aab470
5. Functional diagram
VDD
KBI0
KBI1
KBI2
KBI3
KBI4
KBI5
KBI6
KBI7
CMP2
CIN2B
CIN2A
CIN1B
CIN1A
CMPREF
CMP1
T1
CLKOUT
XTAL2
VSS
PORT 0
PORT 1
TXD
RXD
T0
INT0
INT1
RST
SCL
SDA
P89LPC9401
PORT 3
XTAL1
PORT 2
MOSI
MISO
SPICLK
SCL
SDA
BP[0:3]
S[0:31]
002aab462
6 of 59
P89LPC9401
Philips Semiconductors
6. Pinning information
49 S18
50 S19
51 S20
52 S21
53 S22
54 S23
55 S24
56 S25
57 S26
58 S27
59 S28
60 S29
61 S30
62 S31
63 SDA_LCD
64 SCL_LCD
6.1 Pinning
P0.5/CMPREF/KBI5
48 S17
P0.4/CIN1A/KBI4
47 S16
P0.3/CIN1B/KBI3
46 S15
P0.2/CIN2A/KBI2
45 S14
P0.1/CIN2B/KBI1
44 S13
P2.0
43 S12
P2.1
42 S11
P0.0/CMP2/KBI0
P1.7
41 S10
P89LPC9401
40 S9
S1 32
S0 31
BP3 30
BP1 29
BP2 28
BP0 27
VLCD 26
VDD 25
P0.6/CMP1/KBI6 24
33 S2
P0.7/T1/KBI7 23
34 S3
P1.3/INT0/SDA 16
P1.0/TXD 22
35 S4
P1.4/INT1 15
P1.1/RXD 21
36 S5
P3.0/XTAL2/CLKOUT 14
P2.5/SPICLK 20
37 S6
P3.1/XTAL1 13
P2.3/MISO 19
38 S7
VSS 12
P2.2/MOSI 18
39 S8
P1.5/RST 11
P1.2/T0/SCL 17
P1.6 10
002aab469
Pin description
Symbol
Pin
P0.0 to P0.7
Type Description
I/O
Port 0: Port 0 is an 8-bit I/O port with a user-configurable output type. During reset
Port 0 latches are configured in the input only mode with the internal pull-up disabled.
The operation of Port 0 pins as inputs and outputs depends upon the port configuration
selected. Each port pin is configured independently. Refer to Section 7.13.1 Port
configurations and Table 11 Static electrical characteristics for details.
The Keypad Interrupt feature operates with Port 0 pins.
All pins have Schmitt trigger inputs.
Port 0 also provides various special functions as described below:
P0.0/CMP2/
KBI0
I/O
P89LPC9401_1
7 of 59
P89LPC9401
Philips Semiconductors
Table 3:
Symbol
Pin
Type Description
P0.1/CIN2B/
KBI1
I/O
P0.2/CIN2A/
KBI2
P0.3/CIN1B/
KBI3
P0.4/ CIN1A/
KBI4
P0.5/
CMPREF/
KBI5
P0.6/CMP1/
KBI6
24
P0.7/T1/KBI7
23
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O, I Port 1: Port 1 is an 8-bit I/O port with a user-configurable output type, except for three
[1]
pins as noted below. During reset Port 1 latches are configured in the input only mode
with the internal pull-up disabled. The operation of the configurable Port 1 pins as
inputs and outputs depends upon the port configuration selected. Each of the
configurable port pins are programmed independently. Refer to Section 7.13.1 Port
configurations and Table 11 Static electrical characteristics for details. P1.2 and P1.3
are open drain when used as outputs. P1.5 is input only.
P1.0 to P1.7
22
I/O
P1.1/RXD
21
I/O
I
P1.2/T0/SCL
17
I/O
I/O
I/O
I/O
I/O
P1.3/INTO/
SDA
P1.4/INT1
16
15
P89LPC9401_1
8 of 59
P89LPC9401
Philips Semiconductors
Table 3:
Symbol
Pin
Type Description
P1.5/RST
11
RST External Reset input during power-on or if selected via UCFG1. When
functioning as a reset input, a LOW on this pin resets the microcontroller, causing I/O
ports and peripherals to take on their default states, and the processor begins
execution at address 0. Also used during a power-on sequence to force ISP mode.
When using an oscillator frequency above 12 MHz, the reset input function of
P1.5 must be enabled. An external circuit is required to hold the device in reset at
power-up until VDD has reached its specified level. When system power is
removed VDD will fall below the minimum specified operating voltage. When
using an oscillator frequency above 12 MHz, in some applications, an external
brownout detect circuit may be required to hold the device in reset when VDD falls
below the minimum specified operating range.
P1.6
10
I/O
P1.7
I/O
I/O
Port 2: Port 2 is an 5-bit I/O port with a user-configurable output type. During reset
Port 2 latches are configured in the input only mode with the internal pull-up disabled.
The operation of Port 2 pins as inputs and outputs depends upon the port configuration
selected. Each port pin is configured independently. Refer to Section 7.13.1 Port
configurations and Table 11 Static electrical characteristics for details.
P2.0 to P2.3,
P2.5
I/O
P2.1
I/O
P2.2/MOSI
18
I/O
I/O
MOSI SPI master out slave in. When configured as master, this pin is output; when
configured as slave, this pin is input.
I/O
I/O
MISO When configured as master, this pin is input, when configured as slave, this
pin is output.
P2.3/MISO
P2.5/SPICLK
19
20
P3.0 to P3.1
I/O
I/O
SPICLK SPI clock. When configured as master, this pin is output; when configured
as slave, this pin is input.
I/O
Port 3: Port 3 is a 2-bit I/O port with a user-configurable output type. During reset
Port 3 latches are configured in the input only mode with the internal pull-up disabled.
The operation of Port 3 pins as inputs and outputs depends upon the port configuration
selected. Each port pin is configured independently. Refer to Section 7.13.1 Port
configurations and Table 11 Static electrical characteristics for details.
All pins have Schmitt triggered inputs.
Port 3 also provides various special functions as described below:
P3.0/XTAL2/
CLKOUT
14
I/O
XTAL2 Output from the oscillator amplifier (when a crystal oscillator option is
selected via the flash configuration.
CLKOUT CPU clock divided by 2 when enabled via SFR bit (ENCLK - TRIM.6). It
can be used if the CPU clock is the internal RC oscillator, watchdog oscillator or
external clock input, except when XTAL1/XTAL2 are used to generate clock source for
the RTC/system timer.
P89LPC9401_1
9 of 59
P89LPC9401
Philips Semiconductors
Table 3:
Symbol
Pin
Type Description
P3.1/XTAL1
13
I/O
XTAL1 Input to the oscillator circuit and internal clock generator circuits (when
selected via the flash configuration). It can be a port pin if internal RC oscillator or
watchdog oscillator is used as the CPU clock source, and if XTAL1/XTAL2 are not used
to generate the clock for the RTC/system timer.
SDA_LCD
63
I/O
SCL_LCD
64
I/O
BP0 to BP3
27 to 30
S0 to S31
31 to 62
VSS
12
Ground: 0 V reference.
VDD
25
Power supply: This is the power supply voltage for normal operation as well as Idle
and Power-down modes.
VLCD
26
[1]
P89LPC9401_1
10 of 59
P89LPC9401
Philips Semiconductors
7. Functional description
Remark: Please refer to the P89LPC9401 User manual for a more detailed functional
description.
User must not attempt to access any SFR locations not defined.
Accesses to any defined SFR locations must be strictly for the functions for the SFRs.
SFR bits labeled -, logic 0 or logic 1 can only be written and read as follows:
- Unless otherwise specified, must be written with logic 0, but can return any
value when read (even if it was written with logic 0). It is a reserved bit and may be
used in future derivatives.
Logic 0 must be written with logic 0, and will return a logic 0 when read.
Logic 1 must be written with logic 1, and will return a logic 1 when read.
P89LPC9401_1
11 of 59
Philips Semiconductors
P89LPC9401_1
Table 4:
Special function registers
* indicates SFRs that are bit addressable.
Name
Description
ACC*
Accumulator
AUXR1
E7
E6
E5
Reset value
LSB
E4
E3
E2
E1
A2H
Binary
00
0000 0000
00
0000 00x0
E0
E0H
Bit address
Hex
CLKLP
EBRR
ENT1
ENT0
SRST
DPS
F7
F6
F5
F4
F3
F2
F1
F0
B register
F0H
00
0000 0000
BRGR0 [1]
00
0000 0000
BRGR1 [1]
BFH
00
0000 0000
BRGCON
BDH
BRGEN
00 [1]
xxxx xx00
xx00 0000
SBRGS
CMP1
Comparator 1 control
register
ACH
CE1
CP1
CN1
OE1
CO1
CMF1
00 [2]
CMP2
Comparator 2 control
register
ADH
CE2
CP2
CN2
OE2
CO2
CMF2
00 [2]
xx00 0000
DIVM
95H
00
0000 0000
DPTR
DPH
83H
00
0000 0000
DPL
82H
00
0000 0000
E7H
00
0000 0000
FMADRL
E6H
00
0000 0000
FMCON
E4H
BUSY
HVA
HVE
SV
OI
70
0111 0000
E4H
FMCMD.
7
FMCMD.
6
FMCMD.
5
FMCMD.
4
FMCMD.
3
FMCMD.
2
FMCMD.
1
FMCMD.
0
FMDATA
E5H
00
0000 0000
I2ADR
I2C-bus
DBH
00
0000 0000
00
x000 00x0
slave address
I2ADR.6
I2ADR.5
I2ADR.4
I2ADR.3
I2ADR.2
I2ADR.1
I2ADR.0
GC
DF
DE
DD
DC
DB
DA
D9
D8
I2EN
STA
STO
SI
AA
CRSEL
register
Bit address
I2CON*
I2C-bus
control register
D8H
I2DAT
I2C-bus
data register
DAH
P89LPC9401
12 of 59
FMADRH
B*
Name
Description
Reset value
LSB
Hex
Binary
DDH
00
0000 0000
I2SCLL
DCH
00
0000 0000
I2STAT
D9H
F8
1111 1000
00
0000 0000
00 [2]
00x0 0000
IEN0*
Interrupt enable 0
A8H
Bit address
IEN1*
Interrupt enable 1
E8H
Bit address
IP0*
IP0H
Interrupt priority 0
Interrupt priority 0 high
B8H
B7H
Bit address
IP1*
IP1H
Interrupt priority 1
Interrupt priority 1 high
F8H
F7H
KBCON
94H
KBMASK
86H
KBPATN
P1*
Port 1
80H
Bit address
90H
Bit address
P2*
Port 2
A0H
Bit address
P3*
Port 3
STA.2
STA.1
STA.0
AE
AD
AC
AB
AA
A9
A8
EA
EWDRT
EBO
ES/ESR
ET1
EX1
ET0
EX0
EF
EE
ED
EC
EB
EA
E9
E8
EST
ESPI
EC
EKBI
EI2C
BF
BE
BD
BC
BB
BA
B9
B8
PWDRT
PBO
PS/PSR
PT1
PX1
PT0
PX0
00 [2]
x000 0000
00 [2]
x000 0000
PWDRT
H
PBOH
PSH/
PSRH
PT1H
PX1H
PT0H
PX0H
FF
FE
FD
FC
FB
FA
F9
F8
PST
PSPI
PC
PKBI
PI2C
00 [2]
00x0 0000
PI2CH
00 [2]
00x0 0000
KBIF
00 [2]
xxxx xx00
00
0000 0000
FF
1111 1111
PSTH
-
PSPIH
-
PCH
-
PKBIH
PATN
_SEL
B0H
87
86
85
84
83
82
81
80
T1/KB7
CMP1
/KB6
CMPREF
/KB5
CIN1A
/KB4
CIN1B
/KB3
CIN2A
/KB2
CIN2B
/KB1
CMP2
/KB0
97
96
95
94
93
92
91
90
RST
INT1
INT0/
SDA
T0/SCL
RXD
TXD
97
96
95
94
93
92
91
90
SPICLK
SS
MISO
MOSI
B7
B6
B5
B4
B3
B2
B1
B0
XTAL1
XTAL2
[2]
[2]
[2]
[2]
P89LPC9401
13 of 59
Port 0
STA.3
AF
93H
Bit address
P0*
STA.4
I2SCLH
Bit address
Philips Semiconductors
P89LPC9401_1
Table 4:
Special function registers continued
* indicates SFRs that are bit addressable.
Name
Description
Reset value
LSB
Hex
Binary
FF [2]
1111 1111
P0M1
84H
P0M2
85H
0000 0000
91H
D3 [2]
11x1 xx11
00 [2]
00x0 xx00
FF [2]
1111 1111
0000 0000
P1M1
P1M2
92H
(P1M1.7) (P1M1.6)
(P1M2.7) (P1M2.6)
A4H
P2M2
A5H
B1H
(P3M1.1) (P3M1.0)
03 [2]
xxxx xx11
(P3M2.1) (P3M2.0)
00 [2]
xxxx xx00
00
0000 0000
00 [2]
0000 0000
P3M2
PCON
PCONA
B2H
87H
SMOD1
SMOD0
BOPD
BOI
GF1
GF0
PMOD1
PMOD0
B5H
RTCPD
VCPD
I2PD
SPPD
SPD
D7
D6
D5
D4
D3
D2
D1
D0
CY
AC
F0
RS1
RS0
OV
F1
00
0000 0000
00
xx00 000x
Bit address
PSW*
D0H
PT0AD
F6H
RSTSRC
DFH
POF
R_BK
R_WD
R_SF
[3]
R_EX
60 [2] [4]
011x xx00
00 [4]
0000 0000
RTCL
D3H
00 [4]
0000 0000
SADDR
A9H
00
0000 0000
SADEN
B9H
00
0000 0000
SBUF
99H
xx
xxxx xxxx
RTCCON
RTCH
D1H
RTCS1
RTCS0
ERTC
RTCEN
9F
9E
9D
9C
9B
9A
99
98
SCON*
98H
SM0/FE
SM1
SM2
REN
TB8
RB8
TI
RI
00
0000 0000
SSTAT
BAH
DBMOD
INTLO
CIDIS
DBISEL
FE
BR
OE
STINT
00
0000 0000
SP
Stack pointer
81H
07
0000 0111
SPCTL
E2H
SSIG
SPEN
DORD
MSTR
CPOL
CPHA
SPR1
SPR0
04
0000 0100
SPSTAT
E1H
SPIF
WCOL
00
00xx xxxx
SPDAT
E3H
00
0000 0000
P89LPC9401
14 of 59
Bit address
RTCF
P2M1
P3M1
Philips Semiconductors
P89LPC9401_1
Table 4:
Special function registers continued
* indicates SFRs that are bit addressable.
Name
TAMOD
Description
8FH
Bit address
Reset value
LSB
Hex
Binary
00
xxx0 xxx0
00
0000 0000
T1M2
T0M2
8F
8E
8D
8C
8B
8A
89
88
TF1
TR1
TF0
TR0
IE1
IT1
IE0
IT0
88H
TH0
Timer 0 high
8CH
00
0000 0000
TH1
Timer 1 high
8DH
00
0000 0000
TL0
Timer 0 low
8AH
00
0000 0000
TL1
Timer 1 low
8BH
00
0000 0000
TL2
CCH
00
0000 0000
TMOD
89H
T1C/T
T1M1
T1M0
T0GATE
T0C/T
T0M1
T0M0
00
0000 0000
TRIM
96H
ENCLK
TRIM.5
TRIM.4
TRIM.3
TRIM.2
TRIM.1
TRIM.0
[5] [4]
WDCON
A7H
PRE2
PRE1
PRE0
WDRUN
WDTOF
WDCLK
[6] [4]
WDL
Watchdog load
C1H
WFEED1
Watchdog feed 1
C2H
WFEED2
Watchdog feed 2
C3H
FF
1111 1111
BRGR1 and BRGR0 must only be written if BRGEN in BRGCON SFR is logic 0. If any are written while BRGEN = 1, the result is unpredictable.
[2]
[3]
The RSTSRC register reflects the cause of the P89LPC9401 reset. Upon a power-up reset, all reset source flags are cleared except POF and BOF; the power-on reset value is
xx11 0000.
[4]
The only reset source that affects these SFRs is power-on reset.
[5]
On power-on reset, the TRIM SFR is initialized with a factory preprogrammed value. Other resets will not cause initialization of the TRIM register.
[6]
After reset, the value is 1110 01x1, i.e., PRE2 to PRE0 are all logic 1, WDRUN = 1 and WDCLK = 1. WDTOF bit is logic 1 after watchdog reset and is logic 0 after power-on reset.
Other resets will not affect WDTOF.
P89LPC9401
15 of 59
[1]
TCON*
T1GATE
Philips Semiconductors
P89LPC9401_1
Table 4:
Special function registers continued
* indicates SFRs that are bit addressable.
P89LPC9401
Philips Semiconductors
7.3 Clocks
7.3.1 Clock definitions
The P89LPC9401 device has several internal clocks as defined below:
OSCCLK Input to the DIVM clock divider. OSCCLK is selected from one of four clock
sources (see Figure 6) and can also be optionally divided to a slower frequency (see
Section 7.8 CCLK modification: DIVM register).
Note: fosc is defined as the OSCCLK frequency.
CCLK CPU clock; output of the clock divider. There are two CCLK cycles per machine
cycle, and most instructions are executed in one to two machine cycles (two or four CCLK
cycles).
RCCLK The internal 7.373 MHz RC oscillator output.
PCLK Clock for the various peripheral devices and is CCLK2.
P89LPC9401_1
16 of 59
P89LPC9401
Philips Semiconductors
P89LPC9401_1
17 of 59
P89LPC9401
Philips Semiconductors
XTAL1
XTAL2
HIGH FREQUENCY
MEDIUM FREQUENCY
LOW FREQUENCY
RTC
OSCCLK
RC
OSCILLATOR
CCLK
DIVM
CPU
RCCLK
2
(7.3728 MHz 1 %)
PCLK
WDT
WATCHDOG
OSCILLATOR
PCLK
I2C-BUS
SPI
UART
002aab463
P89LPC9401_1
18 of 59
P89LPC9401
Philips Semiconductors
DATA
128 bytes of internal data memory space (00H:7FH) accessed via direct or indirect
addressing, using instructions other than MOVX and MOVC. All or part of the Stack
may be in this area.
IDATA
Indirect Data. 256 bytes of internal data memory space (00H:FFH) accessed via
indirect addressing using instructions other than MOVX and MOVC. All or part of the
Stack may be in this area. This area includes the DATA area and the 128 bytes
immediately above it.
SFR
Special Function Registers. Selected CPU registers and peripheral control and status
registers, accessible only via direct addressing.
P89LPC9401_1
19 of 59
P89LPC9401
Philips Semiconductors
CODE
64 kB of Code memory space, accessed as part of program execution and via the
MOVC instruction. The P89LPC9401 has 8 kB of on-chip Code memory.
Type
Data RAM
Size (bytes)
DATA
128
IDATA
256
7.12 Interrupts
The P89LPC9401 uses a four priority level interrupt structure. This allows great flexibility
in controlling the handling of the many interrupt sources. The P89LPC9401 supports
13 interrupt sources: external interrupts 0 and 1, timers 0 and 1, serial port TX, serial port
RX, combined serial port RX/TX, brownout detect, watchdog/RTC, I2C-bus, keyboard,
comparators 1 and 2, and SPI.
Each interrupt source can be individually enabled or disabled by setting or clearing a bit in
the interrupt enable registers IEN0 or IEN1. The IEN0 register also contains a global
disable bit, EA, which disables all interrupts.
Each interrupt source can be individually programmed to one of four priority levels by
setting or clearing bits in the interrupt priority registers IP0, IP0H, IP1, and IP1H. An
interrupt service routine in progress can be interrupted by a higher priority interrupt, but
not by another interrupt of the same or lower priority. The highest priority interrupt service
cannot be interrupted by any other interrupt source. If two requests of different priority
levels are pending at the start of an instruction, the request of higher priority level is
serviced.
If requests of the same priority level are pending at the start of an instruction, an internal
polling sequence determines which request is serviced. This is called the arbitration
ranking. Note that the arbitration ranking is only used to resolve pending requests of the
same priority level.
20 of 59
P89LPC9401
Philips Semiconductors
IE0
EX0
IE1
EX1
BOF
EBO
RTCF
ERTC
(RTCCON.1)
WDOVF
wake-up
(if in power-down)
KBIF
EKBI
EWDRT
CMF2
CMF1
EC
EA (IE0.7)
TF0
ET0
TF1
ET1
TI and RI/RI
ES/ESR
TI
EST
interrupt
to CPU
SI
EI2C
SPIF
ESPI
002aab464
Clock source
Reset option
23
22
22
supported [1]
21
21
20
21 of 59
P89LPC9401
Philips Semiconductors
7.13.1.2
7.13.1.3
Input-only configuration
The input-only port configuration has no output drivers. It is a Schmitt trigger input that
also has a glitch suppression circuit.
7.13.1.4
P89LPC9401_1
22 of 59
P89LPC9401
Philips Semiconductors
After power-up, all I/O pins except P1.5, may be configured by software.
Pin P1.5 is input only. Pins P1.2 and P1.3 and are configurable for either input-only or
open-drain.
Every output on the P89LPC9401 has been designed to sink typical LED drive current.
However, there is a maximum total output current for all ports which must not be
exceeded. Please refer to Table 11 Static electrical characteristics for detailed
specifications.
All ports pins that can function as an output have slew rate controlled outputs to limit noise
generated by quickly switching output signals. The slew rate is factory-set to
approximately 10 ns rise and fall times.
P89LPC9401_1
23 of 59
P89LPC9401
Philips Semiconductors
7.16 Reset
The P1.5/RST pin can function as either an active-LOW reset input or as a digital input,
P1.5. The RPE (Reset Pin Enable) bit in UCFG1, when set to logic 1, enables the external
reset input function on P1.5. When cleared, P1.5 may be used as an input pin.
Remark: During a power-up sequence, The RPE selection is overridden and this pin will
always functions as a reset input. An external circuit connected to this pin should not
hold this pin LOW during a power-on sequence as this will keep the device in reset.
After power-up this input will function either as an external reset input or as a digital input
as defined by the RPE bit. Only a power-up reset will temporarily override the selection
defined by RPE bit. Other sources of reset will not override the RPE bit.
Reset can be triggered from the following sources:
P89LPC9401_1
24 of 59
P89LPC9401
Philips Semiconductors
For every reset source, there is a flag in the Reset Register, RSTSRC. The user can read
this register to determine the most recent reset source. These flag bits can be cleared in
software by writing a logic 0 to the corresponding bit. More than one flag bit may be set:
During a power-on reset, both POF and BOF are set but the other flag bits are
cleared.
For any other reset, previously set flag bits that have not been cleared will remain set.
7.16.1 Reset vector
Following reset, the P89LPC9401 will fetch instructions from either address 0000H or the
Boot address. The Boot address is formed by using the Boot Vector as the high byte of the
address and the low byte of the address = 00H.
The Boot address will be used if a UART break reset occurs, or the non-volatile Boot
Status bit (BOOTSTAT.0) = 1, or the device is forced into ISP mode during power-on (see
P89LPC9401 User manual). Otherwise, instructions will be fetched from address 0000H.
7.17.1 Mode 0
Putting either Timer into Mode 0 makes it look like an 8048 Timer, which is an 8-bit
Counter with a divide-by-32 prescaler. In this mode, the Timer register is configured as a
13-bit register. Mode 0 operation is the same for Timer 0 and Timer 1.
7.17.2 Mode 1
Mode 1 is the same as Mode 0, except that all 16 bits of the timer register are used.
7.17.3 Mode 2
Mode 2 configures the Timer register as an 8-bit Counter with automatic reload. Mode 2
operation is the same for Timer 0 and Timer 1.
7.17.4 Mode 3
When Timer 1 is in Mode 3 it is stopped. Timer 0 in Mode 3 forms two separate 8-bit
counters and is provided for applications that require an extra 8-bit timer. When Timer 1 is
in Mode 3 it can still be used by the serial port as a baud rate generator.
P89LPC9401_1
25 of 59
P89LPC9401
Philips Semiconductors
7.17.5 Mode 6
In this mode, the corresponding timer can be changed to a PWM with a full period of
256 timer clocks.
7.19 UART
The P89LPC9401 has an enhanced UART that is compatible with the conventional 80C51
UART except that Timer 2 overflow cannot be used as a baud rate source. The
P89LPC9401 does include an independent Baud Rate Generator. The baud rate can be
selected from the oscillator (divided by a constant), Timer 1 overflow, or the independent
Baud Rate Generator. In addition to the baud rate generation, enhancements over the
standard 80C51 UART include Framing Error detection, automatic address recognition,
selectable double buffering and several interrupt options. The UART can be operated in
four modes: shift register, 8-bit UART, 9-bit UART, and CPU clock/32 or CPU clock/16.
7.19.1 Mode 0
Serial data enters and exits through RXD. TXD outputs the shift clock. 8 bits are
transmitted or received, LSB first. The baud rate is fixed at 116 of the CPU clock
frequency.
7.19.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 7.19.5
Baud rate generator and selection).
7.19.3 Mode 2
11 bits are transmitted (through TXD) or received (through RXD): start bit (logic 0), 8 data
bits (LSB first), a programmable 9th data bit, and a stop bit (logic 1). When data is
transmitted, the 9th 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
P89LPC9401_1
26 of 59
P89LPC9401
Philips Semiconductors
received, the 9th data bit goes into RB8 in Special Function Register SCON, while the stop
bit is not saved. The baud rate is programmable to either 116 or 132 of the CPU clock
frequency, as determined by the SMOD1 bit in PCON.
7.19.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 9th 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 7.19.5 Baud rate generator and selection).
timer 1 overflow
(PCLK-based)
SMOD1 = 1
SBRGS = 0
SBRGS = 1
002aaa897
P89LPC9401_1
27 of 59
P89LPC9401
Philips Semiconductors
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).
P89LPC9401_1
28 of 59
P89LPC9401
Philips Semiconductors
Serial clock synchronization allows devices with different bit rates to communicate via
one serial bus
RP
RP
SDA
I2C-bus
SCL
P1.3/SDA
P1.2/SCL
P89LPC9401
OTHER DEVICE
WITH I2C-BUS
INTERFACE
OTHER DEVICE
WITH I2C-BUS
INTERFACE
002aab465
P89LPC9401_1
29 of 59
P89LPC9401
Philips Semiconductors
I2ADR
ADDRESS REGISTER
P1.3
COMPARATOR
INPUT
FILTER
P1.3/SDA
ACK
SHIFT REGISTER
OUTPUT
STAGE
I2DAT
BIT COUNTER /
ARBITRATION &
SYNC LOGIC
INPUT
FILTER
P1.2/SCL
SERIAL CLOCK
GENERATOR
OUTPUT
STAGE
CCLK
TIMING
AND
CONTROL
LOGIC
interrupt
INTERNAL BUS
timer 1
overflow
P1.2
I2CON
I2SCLH
I2SCLL
status bus
I2STAT
STATUS
DECODER
STATUS REGISTER
002aaa899
P89LPC9401_1
30 of 59
P89LPC9401
Philips Semiconductors
7.21 SPI
The P89LPC9401 provides another high-speed serial communication interfacethe 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 up to 3 Mbit/s in Slave mode. It has a transfer completion flag and write
collision flag protection.
S
M
CPU clock
8-BIT SHIFT REGISTER
READ DATA BUFFER
DIVIDER
BY 4, 16, 64, 128
MOSI
P2.2
SPICLK
P2.5
SPEN
MSTR
SPR0
SPR1
CPOL
CPHA
MSTR
DORD
SPEN
MSTR
SPEN
SSIG
SPIF
PIN
CONTROL
LOGIC
S
M
CLOCK LOGIC
SPR0
SPR1
SELECT
WCOL
MISO
P2.3
clock
SPI CONTROL
M
S
SPI
interrupt
request
internal
data
bus
002aab466
The SPI interface has three pins: SPICLK, MOSI, MISO and SS:
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.
Typical connections are shown in Figure 12 through Figure 14.
P89LPC9401_1
31 of 59
P89LPC9401
Philips Semiconductors
master
8-BIT SHIFT
REGISTER
slave
MISO
MISO
MOSI
MOSI
SPICLK
SPI CLOCK
GENERATOR
SS/PORT
8-BIT SHIFT
REGISTER
SPICLK
SS/PORT
002aab467
master
8-BIT SHIFT
REGISTER
slave
MISO
MISO
MOSI
MOSI
SPICLK
SPI CLOCK
GENERATOR
SS/PORT
8-BIT SHIFT
REGISTER
SPICLK
SS/PORT
SPI CLOCK
GENERATOR
002aab468
Fig 13. SPI dual device configuration, where either can be a master or a slave
P89LPC9401_1
32 of 59
P89LPC9401
Philips Semiconductors
master
slave
8-BIT SHIFT
REGISTER
MISO
MISO
MOSI
MOSI
SPICLK
SPI CLOCK
GENERATOR
port
8-BIT SHIFT
REGISTER
SPICLK
SS
slave
MISO
MOSI
8-BIT SHIFT
REGISTER
SPICLK
port
SS
002aaa903
P89LPC9401_1
33 of 59
P89LPC9401
Philips Semiconductors
CP1
OE1
comparator 1
(P0.4) CIN1A
(P0.3) CIN1B
CO1
CMP1 (P0.6)
(P0.5) CMPREF
change detect
Vref(bg)
CMF1
CN1
interrupt
change detect
EC
CP2
CMF2
comparator 2
(P0.2) CIN2A
(P0.1) CIN2B
CMP2 (P0.0)
CO2
OE2
CN2
002aaa904
34 of 59
P89LPC9401
Philips Semiconductors
P89LPC9401_1
35 of 59
P89LPC9401
Philips Semiconductors
WDL (C1H)
32
8-BIT DOWN
COUNTER
PRESCALER
reset(1)
SHADOW REGISTER
WDCON (A7H)
PRE2
PRE1
PRE0
WDRUN
WDTOF
WDCLK
002aaa905
(1) Watchdog reset can also be caused by an invalid feed sequence, or by writing to WDCON not immediately followed by a
feed sequence.
P89LPC9401_1
36 of 59
P89LPC9401
Philips Semiconductors
Number of
7-segments numeric
Digits
Characters
Indicator
symbols
Dot matrix
Backplanes
Segments
Indicator
symbols
128
16
16
16
128
96
12
12
12
96
64
64
32
32
P89LPC9401_1
37 of 59
P89LPC9401
Philips Semiconductors
7.26.4 Oscillator
7.26.4.1
Internal clock
An internal oscillator provides the clock signals for the internal logic of the LCD controller
and its LCD drive signals. After power-up, pin SDA must be HIGH to guarantee that the
clock starts.
7.26.5 Timing
The LCD controller timing controls the internal data flow of the device. This includes the
transfer of display data from the display RAM to the display segment outputs. The timing
also generates the LCD frame signal whose frequency is derived from the clock
frequency. The frame signal frequency is a fixed division of the clock frequency from either
the internal or an external clock.
Frame frequency = fosc(LCD) / 24.
38 of 59
P89LPC9401
Philips Semiconductors
7.26.13 Blinker
The LCD controller has a very versatile display blinking capability. The whole display can
blink at a frequency selected by the BLINK command. Each blink frequency is a multiple
integer value of the clock frequency; the ratio between the clock frequency and blink
frequency depends on the blink mode selected, as shown in Table 8.
An additional feature allows an arbitrary selection of LCD segments to be blinked in the
static and 1 : 2 drive modes. This is implemented without any communication overheads
by the output bank selector which alternates the displayed data between the data in the
display RAM bank and the data in an alternative RAM bank at the blink frequency. This
mode can also be implemented by the BLINK command.
The entire display can be blinked at a frequency other than the nominal blink frequency by
sequentially resetting and setting the display enable bit E at the required rate using the
MODE SET command.
Table 8:
Blinking frequencies
Blink mode
Off
Blinking off
2 Hz
fosc(LCD) / 768
2 Hz
1 Hz
fosc(LCD) / 1536
1 Hz
0.5 Hz
fosc(LCD) / 3072
0.5 Hz
Blink modes 0.5 Hz, 1 Hz and 2 Hz, and nominal blink frequencies 0.5 Hz, 1 Hz and 2 Hz
correspond to an oscillator frequency (fosc(LCD)) of 1536 Hz at pin CLK. The oscillator
frequency range is 397 Hz to 3046 Hz.
7.26.13.1
I2C-bus controller
The LCD controller acts as an I2C-bus slave receiver. In the P89LPC9401 the hardware
subaddress inputs A0, A,1 and A2 are tied to VSS setting the hardware subaddress = 0.
P89LPC9401_1
39 of 59
P89LPC9401
Philips Semiconductors
7.27.2 Features
Boot vector allows user-provided flash loader code to reside anywhere in the flash
memory space, providing flexibility to the user.
40 of 59
P89LPC9401
Philips Semiconductors
P89LPC9401_1
41 of 59
P89LPC9401
Philips Semiconductors
Device
Default
Boot Vector
Default
boot loader
entry point
P89LPC9401
1FH
1F00H
1E00H to 1FFFH
1C00H to 1FFFH
P89LPC9401_1
42 of 59
P89LPC9401
Philips Semiconductors
8. Limiting values
Table 10: Limiting values
In accordance with the Absolute Maximum Rating System (IEC 60134). [1]
Symbol
Parameter
Tamb(bias)
Min
Max
Unit
55
+125
Tstg
storage temperature
65
+150
IOH(I/O)
20
mA
IOL(I/O)
20
mA
II/O(tot)(max)
100
mA
Vn
3.5
Ptot(pack)
1.5
[1]
Conditions
P89LPC9401_1
43 of 59
P89LPC9401
Philips Semiconductors
9. Static characteristics
Table 11: Static electrical characteristics
VDD = 2.4 V to 3.6 V unless otherwise specified.
Tamb = 40 C to +85 C for industrial applications, unless otherwise specified.
Symbol
IDD(oper)
IDD(idle)
Parameter
operating supply current
Idle mode supply current
Min
Typ [1]
Max
Unit
[2]
11
15
mA
[2]
17
23
mA
[2]
3.7
mA
[2]
mA
[2]
60
85
[3]
25
Conditions
IDD(pd)
IDD(tpd)
(dV/dt)r
rise rate
of VDD
mV/s
(dV/dt)f
fall rate
of VDD
50
mV/s
VDDR
1.5
Vth(HL)
0.22VDD
0.4VDD
VIL
0.5
0.3VDD
Vth(LH)
0.6VDD
0.7VDD
VIH
0.7VDD
5.5
Vhys
hysteresis voltage
port 1
0.2VDD
VOL
IOL = 20 mA;
VDD = 2.4 V to 3.6 V,
all ports, all modes except
high-Z
[4]
0.6
1.0
[4]
0.2
0.3
IOH = 20 A;
VDD = 2.4 V to 3.6 V;
all ports;
quasi-bidirectional mode
VDD 0.3
VDD 0.2
VDD 0.7
VDD 0.4
VOH
Vxtal
crystal voltage
0.5
+4.0
Vn
0.5
+5.5
Ciss
input capacitance
[5]
15
pF
VI = 0.4 V
[6]
80
10
30
450
10
30
IIL
ILI
[7]
ITHL
[8]
RRST_N(int)
pin RST
P89LPC9401_1
44 of 59
P89LPC9401
Philips Semiconductors
Parameter
Conditions
Min
Typ [1]
Max
Unit
Vbo
2.40
2.70
Vref(bg)
1.11
1.23
1.34
TCbg
10
20
ppm/
C
[1]
Typical ratings are not guaranteed. The values listed are at room temperature, VDD = 3 V.
[2]
The IDD(oper), IDD(idle), and IDD(pd) specifications are measured using an external clock with the following functions disabled: comparators,
real-time clock, and watchdog timer.
[3]
The IDD(tpd) specification is measured using an external clock with the following functions disabled: comparators, real-time clock,
brownout detect, and watchdog timer.
[4]
See Section 8 Limiting values on page 43 for steady state (non-transient) limits on IOL or IOH. If IOL/IOH exceeds the test condition,
VOL/VOH may exceed the related specification.
[5]
[6]
[7]
[8]
Port pins source a transition current when used in quasi-bidirectional mode and externally driven from logic 1 to logic 0. This current is
highest when VI is approximately 2 V.
P89LPC9401_1
45 of 59
P89LPC9401
Philips Semiconductors
Parameter
fosc(RC)
fosc(WD)
fosc
oscillator frequency
Tcy(CLK)
fCLKLP
Conditions
Variable clock
fosc = 12 MHz
Min
Max
Min
7.189
7.557
7.189
320
520
320
see Figure 18
Unit
Max
7.557 MHz
520
kHz
12
MHz
83
ns
MHz
Glitch filter
tgr
tsa
glitch rejection
P1.5/RST pin
50
50
ns
15
15
ns
P1.5/RST pin
125
125
ns
50
50
ns
ns
External clock
tCHCX
see Figure 18
33
Tcy(CLK) tCLCX
33
tCLCX
see Figure 18
33
Tcy(CLK) tCHCX
33
ns
tCLCH
see Figure 18
ns
tCHCL
see Figure 18
ns
see Figure 17
16Tcy(CLK)
1333
ns
tQVXH
see Figure 17
13Tcy(CLK)
1083
ns
tXHQX
see Figure 17
Tcy(CLK) + 20
103
ns
tXHDX
ns
tXHDV
150
150
ns
CCLK
6
2.0
MHz
CCLK
4
3.0
MHz
see Figure 17
SPI interface
fSPI
TSPICYC
master
CCLK
500
ns
CCLK
333
ns
tSPILEAD
250
250
ns
tSPILAG
250
250
ns
P89LPC9401_1
46 of 59
P89LPC9401
Philips Semiconductors
Parameter
Conditions
Variable clock
Min
tSPICLKH
master
slave
tSPICLKL
master
Max
Min
Max
Unit
CCLK
165
ns
CCLK
250
ns
CCLK
165
ns
CCLK
250
ns
slave
fosc = 12 MHz
tSPIDSU
100
100
ns
tSPIDH
100
100
ns
tSPIA
120
120
ns
tSPIDIS
240
240
ns
tSPIDV
240
240
ns
slave
master
tSPIOH
tSPIR
SPI outputs
(SPICLK, MOSI, MISO)
SPI inputs
(SPICLK, MOSI, MISO, SS)
tSPIF
SPI inputs
(SPICLK, MOSI, MISO, SS)
167
167
ns
ns
100
100
ns
2000
2000
ns
100
100
ns
2000
2000
ns
[1]
Parameters are valid over operating temperature range unless otherwise specified.
[2]
Parts are tested to 2 MHz, but are guaranteed to operate down to 0 Hz.
P89LPC9401_1
47 of 59
P89LPC9401
Philips Semiconductors
Parameter
Conditions
fosc(RC)
fosc(WD)
fosc
oscillator frequency
Tcy(CLK)
fCLKLP
see Figure 18
Variable clock
fosc = 18 MHz
Min
Max
Min
7.189
7.557
7.189
320
520
320
Unit
Max
7.557 MHz
520
kHz
18
MHz
55
ns
MHz
Glitch filter
tgr
tsa
signal acceptance
P1.5/RST pin
50
50
ns
125
125
ns
P1.5/RST pin
15
15
ns
50
50
ns
ns
External clock
tCHCX
see Figure 18
22
Tcy(CLK) tCLCX
22
tCLCX
see Figure 18
22
Tcy(CLK) tCHCX
22
ns
tCLCH
see Figure 18
ns
tCHCL
see Figure 18
ns
see Figure 17
16Tcy(CLK)
888
ns
tQVXH
13Tcy(CLK)
722
ns
tXHQX
see Figure 17
Tcy(CLK) + 20
75
ns
tXHDX
ns
tXHDV
150
150
ns
CCLK
3.0
MHz
CCLK
4.5
MHz
6
CCLK
333
ns
4
CCLK
222
ns
see Figure 17
SPI interface
fSPI
TSPICYC
master
tSPILEAD
250
250
ns
tSPILAG
250
250
ns
P89LPC9401_1
48 of 59
P89LPC9401
Philips Semiconductors
Parameter
Conditions
master
slave
tSPICLKL
master
slave
Variable clock
fosc = 18 MHz
Unit
Min
Max
Min
Max
2
CCLK
111
ns
3
CCLK
167
ns
2
CCLK
111
ns
3
CCLK
167
ns
tSPIDSU
100
100
ns
tSPIDH
100
100
ns
tSPIA
80
80
ns
tSPIDIS
160
160
ns
tSPIDV
160
160
ns
111
111
ns
ns
slave
master
tSPIOH
tSPIR
tSPIF
100
100
ns
2000
2000
ns
SPI inputs
(SPICLK, MOSI, MISO, SS)
100
100
ns
2000
2000
ns
[1]
Parameters are valid over operating temperature range unless otherwise specified.
[2]
Parts are tested to 2 MHz, but are guaranteed to operate down to 0 Hz.
P89LPC9401_1
49 of 59
P89LPC9401
Philips Semiconductors
10.1 Waveforms
TXLXL
clock
tXHQX
tQVXH
output data
0
write to SBUF
input data
tXHDX
set TI
tXHDV
valid
valid
valid
valid
valid
valid
valid
valid
clear RI
set RI
002aaa906
VDD 0.5 V
0.45 V
0.2VDD + 0.9 V
0.2VDD 0.1 V
tCHCX
tCHCL
tCLCX
tCLCH
Tcy(CLK)
002aaa907
P89LPC9401_1
50 of 59
P89LPC9401
Philips Semiconductors
SS
TSPICYC
tSPIF
tSPICLKH
tSPICLKL
tSPIR
SPICLK
(CPOL = 0)
(output)
tSPIF
tSPIR
tSPICLKL
tSPICLKH
SPICLK
(CPOL = 1)
(output)
tSPIDSU
MISO
(input)
tSPIDH
LSB/MSB in
MSB/LSB in
tSPIDV
MOSI
(output)
tSPIOH
tSPIDV
tSPIR
tSPIF
master MSB/LSB out
SS
TSPICYC
tSPIF
tSPICLKL
tSPIR
tSPICLKH
SPICLK
(CPOL = 0)
(output)
tSPIF
tSPIR
tSPICLKH
SPICLK
(CPOL = 1)
(output)
tSPIDSU
MISO
(input)
tSPIDH
LSB/MSB in
MSB/LSB in
tSPIDV
MOSI
(output)
tSPICLKL
tSPIOH
tSPIDV
tSPIF
tSPIDV
tSPIR
002aaa909
P89LPC9401_1
51 of 59
P89LPC9401
Philips Semiconductors
SS
tSPIR
tSPIR
TSPICYC
tSPILEAD
tSPIF
tSPICLKL
tSPICLKH
tSPIR
tSPILAG
SPICLK
(CPOL = 0)
(input)
tSPIF
tSPIR
tSPICLKL
tSPICLKH
SPICLK
(CPOL = 1)
(input)
tSPIA
MISO
(output)
tSPIOH
tSPIDV
tSPIDV
tSPIDSU
MOSI
(input)
tSPIOH
tSPIDH
tSPIOH
tSPIDIS
tSPIDSU
tSPIDSU
MSB/LSB in
not defined
tSPIDH
LSB/MSB in
002aaa910
SS
tSPIR
tSPILEAD
tSPIR
TSPICYC
tSPIF
tSPICLKL
tSPIR
tSPILAG
tSPICLKH
SPICLK
(CPOL = 0)
(input)
tSPIF
tSPIR
tSPICLKL
SPICLK
(CPOL = 1)
(input)
tSPICLKH
tSPIOH
tSPIOH
tSPIDV
tSPIDV
tSPIOH
tSPIDV
tSPIDIS
tSPIA
MISO
(output)
not defined
tSPIDSU
MOSI
(input)
tSPIDH
tSPIDSU
MSB/LSB in
tSPIDSU
tSPIDH
LSB/MSB in
002aaa911
52 of 59
P89LPC9401
Philips Semiconductors
Parameter
Conditions
Min
Typ
Max
Unit
tVR
pin RST
50
tRH
pin RST
32
tRL
pin RST
VDD
tVR
tRH
RST
tRL
002aaa912
Parameter
VIO
VIC
Conditions
Min
Typ
Max
Unit
20
mV
VDD 0.3
CMRR
50
dB
tres(tot)
250
500
ns
t(CE-OV)
10
ILI
10
[1]
[1]
P89LPC9401_1
53 of 59
P89LPC9401
Philips Semiconductors
SOT791-1
y
X
A
33
48
49
32
ZE
e
E HE
A2
(A 3)
A1
w M
bp
Lp
L
pin 1 index
64
detail X
17
16
1
ZD
v M A
w M
bp
D
HD
v M B
10 mm
scale
DIMENSIONS (mm are the original dimensions)
UNIT
A
max.
A1
A2
A3
bp
D (1)
E (1)
mm
1.6
0.15
0.05
1.45
1.35
0.25
0.45
0.30
0.20
0.09
14.1
13.9
14.1
13.9
0.8
HD
HE
16.15 16.15
15.85 15.85
Lp
0.75
0.45
0.2
0.2
0.1
Z D (1) Z E (1)
1.2
0.8
1.2
0.8
7o
o
0
Note
1. Plastic or metal protrusions of 0.25 mm maximum per side are not included.
REFERENCES
OUTLINE
VERSION
IEC
JEDEC
JEITA
SOT791-1
136E18
MS-026
ED-7311EC
EUROPEAN
PROJECTION
ISSUE DATE
02-10-22
54 of 59
P89LPC9401
Philips Semiconductors
13. Abbreviations
Table 16:
Acronym list
Acronym
Description
CPU
EPROM
EMI
Electro-Magnetic Interference
LCD
LED
PWM
RAM
RC
Resistance-Capacitance
SFR
SPI
UART
P89LPC9401_1
55 of 59
P89LPC9401
Philips Semiconductors
Revision history
Document ID
Release date
Change notice
Doc. number
Supersedes
P89LPC9401_1
20050905
P89LPC9401_1
56 of 59
P89LPC9401
Philips Semiconductors
Definition
Objective data
Development
This data sheet contains data from the objective specification for product development. Philips
Semiconductors reserves the right to change the specification in any manner without notice.
II
Preliminary data
Qualification
This data sheet contains data from the preliminary specification. Supplementary data will be published
at a later date. Philips Semiconductors reserves the right to change the specification without notice, in
order to improve the design and supply the best possible product.
III
Product data
Production
This data sheet contains data from the product specification. Philips Semiconductors reserves the
right to make changes at any time in order to improve the design, manufacturing and supply. Relevant
changes will be communicated via a Customer Product/Process Change Notification (CPCN).
[1]
Please consult the most recently issued data sheet before initiating or completing a design.
[2]
The product status of the device(s) described in this data sheet may have changed since this data sheet was published. The latest information is available on the Internet at
URL http://www.semiconductors.philips.com.
[3]
For data sheets describing multiple type numbers, the highest-level product status determines the data sheet status.
16. Definitions
17. Disclaimers
Life support These products are not designed for use in life support
appliances, devices, or systems where malfunction of these products can
reasonably be expected to result in personal injury. Philips Semiconductors
18. Trademarks
Notice All referenced brands, product names, service names and
trademarks are the property of their respective owners.
I2C-bus wordmark and logo are trademarks of Koninklijke Philips
Electronics N.V.
P89LPC9401_1
57 of 59
P89LPC9401
Philips Semiconductors
20. Contents
1
General description . . . . . . . . . . . . . . . . . . . . . . 1
2
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2.1
Principal features . . . . . . . . . . . . . . . . . . . . . . . 1
2.2
Additional features . . . . . . . . . . . . . . . . . . . . . . 1
3
Ordering information . . . . . . . . . . . . . . . . . . . . . 3
3.1
Ordering options . . . . . . . . . . . . . . . . . . . . . . . . 3
4
Block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 4
5
Functional diagram . . . . . . . . . . . . . . . . . . . . . . 6
6
Pinning information . . . . . . . . . . . . . . . . . . . . . . 7
6.1
Pinning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
6.2
Pin description . . . . . . . . . . . . . . . . . . . . . . . . . 7
7
Functional description . . . . . . . . . . . . . . . . . . 11
7.1
Special function registers . . . . . . . . . . . . . . . . 11
7.2
Enhanced CPU . . . . . . . . . . . . . . . . . . . . . . . . 16
7.3
Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
7.3.1
Clock definitions . . . . . . . . . . . . . . . . . . . . . . . 16
7.3.2
CPU clock (OSCCLK). . . . . . . . . . . . . . . . . . . 16
7.3.3
Low speed oscillator option . . . . . . . . . . . . . . 16
7.3.4
Medium speed oscillator option . . . . . . . . . . . 16
7.3.5
High speed oscillator option . . . . . . . . . . . . . . 16
7.3.6
Clock output . . . . . . . . . . . . . . . . . . . . . . . . . . 17
7.4
On-chip RC oscillator option . . . . . . . . . . . . . . 17
7.5
Watchdog oscillator option . . . . . . . . . . . . . . . 17
7.6
External clock input option . . . . . . . . . . . . . . . 17
7.7
CPU Clock (CCLK) wake-up delay . . . . . . . . . 19
7.8
CCLK modification: DIVM register . . . . . . . . . 19
7.9
Low power select . . . . . . . . . . . . . . . . . . . . . . 19
7.10
Memory organization . . . . . . . . . . . . . . . . . . . 19
7.11
Data RAM arrangement . . . . . . . . . . . . . . . . . 20
7.12
Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
7.12.1
External interrupt inputs . . . . . . . . . . . . . . . . . 20
7.13
I/O ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
7.13.1
Port configurations . . . . . . . . . . . . . . . . . . . . . 21
7.13.1.1 Quasi-bidirectional output configuration . . . . . 22
7.13.1.2 Open-drain output configuration . . . . . . . . . . . 22
7.13.1.3 Input-only configuration . . . . . . . . . . . . . . . . . 22
7.13.1.4 Push-pull output configuration . . . . . . . . . . . . 22
7.13.2
Port 0 analog functions . . . . . . . . . . . . . . . . . . 22
7.13.3
Additional port features. . . . . . . . . . . . . . . . . . 23
7.14
Power monitoring functions. . . . . . . . . . . . . . . 23
7.14.1
Brownout detection . . . . . . . . . . . . . . . . . . . . . 23
7.14.2
Power-on detection . . . . . . . . . . . . . . . . . . . . . 23
7.15
Power reduction modes . . . . . . . . . . . . . . . . . 23
7.15.1
Idle mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.15.2
Power-down mode . . . . . . . . . . . . . . . . . . . . . 24
7.15.3
Total Power-down mode . . . . . . . . . . . . . . . . . 24
7.16
Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.16.1
7.17
7.17.1
7.17.2
7.17.3
7.17.4
7.17.5
7.17.6
7.18
7.19
7.19.1
7.19.2
7.19.3
7.19.4
7.19.5
7.19.6
7.19.7
7.19.8
7.19.9
7.19.10
7.20
7.21
7.21.1
7.22
7.22.1
7.22.2
7.22.3
7.23
7.24
7.25
7.25.1
7.25.2
7.26
7.26.1
7.26.2
7.26.3
7.26.4
7.26.4.1
7.26.5
7.26.6
7.26.7
7.26.8
7.26.9
7.26.10
7.26.11
7.26.12
Reset vector . . . . . . . . . . . . . . . . . . . . . . . . . .
Timers/counters 0 and 1 . . . . . . . . . . . . . . . .
Mode 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Mode 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Mode 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Mode 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Mode 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Timer overflow toggle output . . . . . . . . . . . . .
RTC/system timer. . . . . . . . . . . . . . . . . . . . . .
UART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Mode 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Mode 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Mode 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Mode 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Baud rate generator and selection . . . . . . . . .
Framing error . . . . . . . . . . . . . . . . . . . . . . . . .
Break detect . . . . . . . . . . . . . . . . . . . . . . . . . .
Double buffering . . . . . . . . . . . . . . . . . . . . . . .
Transmit interrupts with double buffering
enabled (modes 1, 2 and 3) . . . . . . . . . . . . . .
The 9th bit (bit 8) in double buffering
(modes 1, 2 and 3) . . . . . . . . . . . . . . . . . . . . .
I2C-bus serial interface. . . . . . . . . . . . . . . . . .
SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Typical SPI configurations . . . . . . . . . . . . . . .
Analog comparators . . . . . . . . . . . . . . . . . . . .
Internal reference voltage. . . . . . . . . . . . . . . .
Comparator interrupt . . . . . . . . . . . . . . . . . . .
Comparators and power reduction modes . . .
Keypad interrupt . . . . . . . . . . . . . . . . . . . . . . .
Watchdog timer . . . . . . . . . . . . . . . . . . . . . . .
Additional features . . . . . . . . . . . . . . . . . . . . .
Software reset . . . . . . . . . . . . . . . . . . . . . . . .
Dual data pointers . . . . . . . . . . . . . . . . . . . . .
LCD driver . . . . . . . . . . . . . . . . . . . . . . . . . . .
General description . . . . . . . . . . . . . . . . . . . .
Functional description . . . . . . . . . . . . . . . . . .
LCD bias voltages . . . . . . . . . . . . . . . . . . . . .
Oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Internal clock . . . . . . . . . . . . . . . . . . . . . . . . .
Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Display register. . . . . . . . . . . . . . . . . . . . . . . .
Segment outputs . . . . . . . . . . . . . . . . . . . . . .
Backplane outputs . . . . . . . . . . . . . . . . . . . . .
Display RAM. . . . . . . . . . . . . . . . . . . . . . . . . .
Data pointer . . . . . . . . . . . . . . . . . . . . . . . . . .
Output bank selector . . . . . . . . . . . . . . . . . . .
Input bank selector. . . . . . . . . . . . . . . . . . . . .
25
25
25
25
25
25
26
26
26
26
26
26
26
27
27
27
27
27
28
28
29
31
32
34
34
34
34
35
36
36
36
36
37
37
37
37
38
38
38
38
38
38
38
38
39
39
continued >>
P89LPC9401_1
58 of 59
P89LPC9401
Philips Semiconductors
7.26.13 Blinker. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.26.13.1 I2C-bus controller . . . . . . . . . . . . . . . . . . . . . .
7.26.14 Input filters . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.26.15 I2C-bus slave addresses . . . . . . . . . . . . . . . . .
7.27
Flash program memory. . . . . . . . . . . . . . . . . .
7.27.1
General description. . . . . . . . . . . . . . . . . . . . .
7.27.2
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.27.3
Flash organization . . . . . . . . . . . . . . . . . . . . .
7.27.4
Using flash as data storage . . . . . . . . . . . . . .
7.27.5
Flash programming and erasing . . . . . . . . . . .
7.27.6
In-circuit programming . . . . . . . . . . . . . . . . . .
7.27.7
In-application programming . . . . . . . . . . . . . .
7.27.8
In-system programming . . . . . . . . . . . . . . . . .
7.27.9
Power-on reset code execution. . . . . . . . . . . .
7.27.10 Hardware activation of the boot loader . . . . . .
7.28
User configuration bytes . . . . . . . . . . . . . . . . .
7.29
User sector security bytes . . . . . . . . . . . . . . .
8
Limiting values. . . . . . . . . . . . . . . . . . . . . . . . .
9
Static characteristics. . . . . . . . . . . . . . . . . . . .
10
Dynamic characteristics . . . . . . . . . . . . . . . . .
10.1
Waveforms . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.2
ISP entry mode. . . . . . . . . . . . . . . . . . . . . . . .
11
Other characteristics . . . . . . . . . . . . . . . . . . . .
11.1
Comparator electrical characteristics . . . . . . .
12
Package outline . . . . . . . . . . . . . . . . . . . . . . . .
13
Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . .
14
Revision history . . . . . . . . . . . . . . . . . . . . . . . .
15
Data sheet status . . . . . . . . . . . . . . . . . . . . . . .
16
Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17
Disclaimers . . . . . . . . . . . . . . . . . . . . . . . . . . . .
18
Trademarks. . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
Contact information . . . . . . . . . . . . . . . . . . . .
39
39
39
40
40
40
40
40
40
41
41
41
41
42
42
42
42
43
44
46
50
53
53
53
54
55
56
57
57
57
57
57