Philips P89LPC932A1FHN User manual

Type
User manual

This manual is also suitable for

UM10109
P89LPC932A1
8-bit microcontroller with two-clock 80C51 core
Rev. 02 — 23 May 2005 User manual
Document information
Info Content
Keywords P89LPC932, P89LPC932A1
Abstract Technical information for the P89LPC932A1 device.
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual Rev. 02 — 23 May 2005 2 of 133
Philips Semiconductors
UM10109
P89LPC932A1 User manual
Contact information
For additional information, please visit: http://www.semiconductors.philips.com
For sales office addresses, please send an email to: sales.addresses@www.semiconductors.philips.com
Revision history
Rev Date Description
2 20050523
Corrected typographical error in Table 35 “Capture compare control register (CCRx -
address Exh) bit description.
Corrected Table 92 “Data EEPROM control register (DEECON address F1h) bit
allocation and Table 93 Data EEPROM control register (DEECON address F1h) bit
description.
Removed “with 8-bit A/D” from title.
Revised Table 37 “Output compare pin behavior for OCMx1:0 =10.
1 20040802 Initial version
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual Rev. 02 — 23 May 2005 3 of 133
Philips Semiconductors
UM10109
P89LPC932A1 User manual
1. Introduction
The P89LPC932A1 is a single-chip microcontroller designed for applications demanding
high-integration, low cost solutions over a wide range of performance requirements. The
P89LPC932A1 is based on a high performance processor architecture that executes
instructions in two to four clocks, six times the rate of standard 80C51 devices. Many
system-level functions have been incorporated into the P89LPC932A1 in order to reduce
component count, board space, and system cost.
1.1 Comparison to the P89LPC932 device
The P89LPC932A1 includes several improvements compared to the P89LPC932. These
improvements are described below.
1.1.1 Byte-erasability (IAP-Lite)
The original P89LPC932 allowed from 1 byte to 64 bytes of user code memory, in a single
page, to be programmed using an IAP function call. The bytes to be programmed needed
to have been previously erased using either a page erase, sector erase, or chip erase (in a
parallel programmer) command. Thus code memory was erased in 64 byte, 1 kB, or 8 kB
groups. The P89LPC932A1 allows from 1 byte to 64 bytes of a page of user code memory
to be erased and reprogrammed in a single operation. The bytes to be erased and
reprogrammed may be randomly addressed within a single page. Only the bytes so
addressed will be affected. See Section 18.4 “
Using Flash as data storage: IAP-Lite” on
page 109.
1.1.2 Serial in-circuit programming (ICP)
In-Circuit Programming is a method intended to allow low cost commercial programmers
to program and erase these devices without removing the microcontroller from the
system. The In-Circuit Programming facility consists of a series of internal hardware
resources to facilitate remote programming of the P89LPC932A1 through a two-wire serial
interface. Philips has made in-circuit programming in an embedded application possible
with a minimum of additional expense in components and circuit board area. The ICP
function uses five pins (V
DD
, V
SS
, P0.5, P0.4, and RST). Only a small connector needs to
be available to interface your application to an external programmer in order to use this
feature. This function was not available on the P89LPC932 device.
1.1.3 ‘On-the-fly’ clock selection
The RC Oscillator can be selected as the source for the CPU clock (CCLK) by using the
RCCLK bit in the TRIM register (TRIM.7). This bit allows for fast ‘on-the-fly’ switching
between the RC Oscillator and the clock source selected by the oscillator type select bits,
FOSC[2:0], in UCFG1, without the need to reset the device. This functionality was not
available on the P89LPC932. See Table 5 “
On-chip RC oscillator trim register (TRIM -
address 96h) bit description” on page 22.
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual Rev. 02 — 23 May 2005 4 of 133
Philips Semiconductors
UM10109
P89LPC932A1 User manual
1.1.4 Increased ISP/IAP functionality
1.1.4.1 Support for the watchdog timer
The ISP code has been modified to set the WDT prescaler (in WDCON) and WDL register
to their maximum values. Other WDCON bits are unchanged and the ISP code does not
explicitly enable or disable the WDT. Periodic feeds are provided within the ISP code to
support applications that entered the ISP code with an enabled WDT. This functionality
was not provided in the ISP code on the P89LPC932.
1.1.4.2 XDATA data buffer option added for programming code memory
The “program user code page” function on the P89LPC932 used IDATA as the 64 byte
data buffer. An option is provided to allow the user to specify that XDATA is to be used
instead as the buffer source. If the F1 flag (PSW.1) is set, then XDATA is used. If the F1
flag (PSW.1) is cleared, then IDATA is used.
1.1.4.3 Port 0 initialization
On the P89LPC932 the ISP code during initialization programmed all bits of Port 0 to the
quasi-bidirectional mode and set these port pins HIGH. This has been changed such that
only the TxD and RxD pins have their port mode programmed during ISP initialization. All
other Port 0 pins remain in their previous state (for example, input-only mode following a
reset).
1.1.4.4 Direct load of UART baud rate fix
A bug identified in the “direct load of baud rate” ISP function has been fixed. The baud rate
source for this function has been changed from Timer 1 to the BRG.
1.1.4.5 Boot Vector and IAP entry points modified
To protect against errant code execution incrementing into the ISP or IAP routines,
software reset instructions have been added to the beginning of these code blocks. This
required that the ISP and IAP entry points be changed. The ISP entry point has changed
to 1F00H resulting in a default Boot Vector of 1FH. The IAP entry point has changed to
FF03H.
1.1.4.6 IAP authorization key
IAP functions which write or erase code memory require an authorization key be set by
the calling routine prior to performing the IAP function call. This authorization key is set by
writing 96H to RAM location FFH. See Section 18.13 “
IAP authorization key” on page 118
After the function call is processed by the IAP routine, the authorization key will be
cleared. Thus it is necessary for the authorization key to be set prior to EACH call to
PGM_MTP that requires a key. If an IAP routine that requires an authorization key is
called without a valid authorization key present, the MCU will perform a reset.
1.1.4.7 Hardware write enable (WE) key
This device has hardware write enable protection. This protection applies to both ISP and
IAP modes and applies to both the user code memory space and the user configuration
bytes (UCFG1, BOOTVEC, and BOOTSTAT). This protection does not apply to
commercial programmer modes. When enabled, user code requesting a write function via
IAP or IAP-Lite will need to explicitly set a Write Enable flag prior to requesting the write
function. See Section 18.14 “
Flash write enable” on page 119
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual Rev. 02 — 23 May 2005 5 of 133
Philips Semiconductors
UM10109
P89LPC932A1 User manual
1.1.4.8 Configuration byte protection
A separate write protection bit has been provided for the “configuration bytes”. These
bytes include UCFG1, BootStat, Boot Vector, and the sector security bytes. This write
protection applies for ISP and IAP modes. It does not apply to commercial programmer
modes. See Section 18.15 “
Configuration byte protection on page 119
1.1.5 Previous errata fix
Most known errata on the P89LPC932 devices has been fixed on the P89LPC932A1
device. For current errata information on the P89LPC932A1, if any, please see the
P89LPC932A1 errata sheet.
1.2 Pin configuration
Fig 1. P89LPC932A1 TSSOP28 pin configuration.
P89LPC932A1FDH
002aaa886
1
2
3
4
5
6
7
8
9
10
11
12
13
14
16
15
18
17
20
19
22
21
24
23
26
25
28
27
ICB/P2.0
OCD/P2.1
KBI0/CMP2/P0.0
OCC/P1.7
OCB/P1.6
RST/P1.5
V
SS
XTAL1/P3.1
CLKOUT/XTAL2/P3.0
INT1/P1.4
SDA/INT0/P1.3
SCL/T0/P1.2
MOSI/P2.2
MISO/P2.3
P2.7/ICA
P2.6/OCA
P0.1/CIN2B/KBI1
P0.2/CIN2A/KBI2
P0.3/CIN1B/KBI3
P0.4/CIN1A/KBI4
P0.5/CMPREF/KBI5
V
DD
P0.6/CMP1/KBI6
P0.7/T1/KBI7
P1.0/TXD
P1.1/RXD
P2.5/SPICLK
P2.4/SS
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual Rev. 02 — 23 May 2005 6 of 133
Philips Semiconductors
UM10109
P89LPC932A1 User manual
Fig 2. P89LPC932A1 PLCC28 pin configuration.
Fig 3. P89LPC932A1 HVQFN28 pin configuration.
P89LPC932A1FA
002aaa887
5
6
7
8
9
10
11
25
24
23
22
21
20
19
12
13
14
15
16
17
18
4
3
2
1
28
27
26
P1.6/OCB
P1.5/RST
V
SS
P3.1/XTAL1
P3.0/XTAL2/CLKOUT
P1.4/INT1
P1.3/INT0/SDA
P1.7/OCC
P0.0/CMP2/KBI0
P2.1/OCD
P2.0/ICB
P2.7/ICA
P2.6/OCA
P0.1/CIN2B/KBI1
P0.2/CIN2A/KBI2
P0.3/CIN1B/KBI3
P0.4/CIN1A/KBI4
P0.5/CMPREF/KBI5
V
DD
P0.6/CMP1/KBI6
P0.7/T1/KBI7
P1.2/T0/SCL
P2.2/MOSI
P2.3/MISO
P2.4/SS
P2.5/SPICLK
P1.1/RXD
P1.0/TXD
002aaa889
P89LPC932A1FHN
Transparent top view
7 15
6 16
5 17
4 18
3
19
2 20
1 21
8
9
10
11
12
13
14
28
27
26
25
24
23
22
terminal 1
index area
P1.7/OCC
P2.7/ICA
P2.1/OCD
P2.0/ICB
P0.0/CMP2/KBI0
P2.6/OCA
P0.1/CIN2B/KBI1
P2.4/SS
P2.2/MOSI
P2.3/MISO
P1.2/T0/SCL
P2.5/SPICLK
P1.0/TXD
P1.1/RXD
P1.4/INT1
P1.3/INT0/SDA
P3.0/XTAL2/CLKOUT
P3.1/XTAL1
V
SS
P1.5/RST
P1.6/OCB
P0.6/CMP1/KBI6
P0.7/T1/KBI7
P0.5/CMPREF/KBI5
V
DD
P0.4/CIN1A/KBI4
P0.3/CIN1B/KBI3
P0.2/CIN2A/KBI2
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual Rev. 02 — 23 May 2005 7 of 133
Philips Semiconductors
UM10109
P89LPC932A1 User manual
1.3 Pin description
Table 1: Pin description
Symbol Pin Type Description
TSSOP28,
PLCC28
HVQFN28
P0.0 to P0.7 3, 26, 25,
24, 23, 22,
20, 19
27, 22, 21,
20, 19, 18,
16, 15
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 4.1 “Port configurations and
the P89LPC932A1 data sheet, Static characteristics for details.
The Keypad Interrupt feature operates with Port 0 pins.
All pins have Schmitt triggered inputs.
Port 0 also provides various special functions as described below:
327I/OP0.0 — Port 0 bit 0.
O CMP2 — Comparator 2 output.
I KBI0 — Keyboard input 0.
26 22 I/O P0.1 — Port 0 bit 1.
I CIN2B — Comparator 2 positive input B.
I KBI1 — Keyboard input 1.
25 21 I/O P0.2 — Port 0 bit 2.
I CIN2A — Comparator 2 positive input A.
I KBI2 — Keyboard input 2.
24 20 I/O P0.3 — Port 0 bit 3.
I CIN1B — Comparator 1 positive input B.
I KBI3 — Keyboard input 3.
23 19 I/O P0.4 — Port 0 bit 4.
I CIN1A — Comparator 1 positive input A.
I KBI4 — Keyboard input 4.
22 18 I/O P0.5 — Port 0 bit 5.
I CMPREF — Comparator reference (negative) input.
I KBI5 — Keyboard input 5.
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual Rev. 02 — 23 May 2005 8 of 133
Philips Semiconductors
UM10109
P89LPC932A1 User manual
P0.0 to P0.7
(continued)
20 16 I/O P0.6 — Port 0 bit 6.
O CMP1 — Comparator 1 output.
I KBI6 — Keyboard input 6.
19 15 I/O P0.7 — Port 0 bit 7.
I/O T1 — Timer/counter 1 external count input or overflow output.
I KBI7 — Keyboard input 7.
Table 1: Pin description
…continued
Symbol Pin Type Description
TSSOP28,
PLCC28
HVQFN28
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual Rev. 02 — 23 May 2005 9 of 133
Philips Semiconductors
UM10109
P89LPC932A1 User manual
P1.0 to P1.7 18, 17, 12,
11, 10, 6,
5, 4
14, 13, 8,
7, 6, 2, 1,
28
I/O, I
[1]
Port 1: Port 1 is an 8-bit I/O port with a user-configurable output type,
except for three 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 4.1 “
Port configurations
and the P89LPC932A1 data sheet, Static characteristics for details.
P1.2 to P1.3 are open drain when used as outputs. P1.5 is input only.
All pins have Schmitt triggered inputs.
Port 1 also provides various special functions as described below:
18 14 I/O P1.0 — Port 1 bit 0.
O TXD — Transmitter output for the serial port.
17 13 I/O P1.1 — Port 1 bit 1.
I RXD — Receiver input for the serial port.
12 8 I/O P1.2 — Port 1 bit 2 (open-drain when used as output).
I/O T0 — Timer/counter 0 external count input or overflow output (open-drain
when used as output).
I/O SCL — I
2
C serial clock input/output.
11 7 I/O P1.3 — Port 1 bit 3 (open-drain when used as output).
I INT0
External interrupt 0 input.
I/O SDA — I
2
C serial data input/output.
10 6 I P1.4 — Port 1 bit 4.
I INT1
External interrupt 1 input.
62 IP1.5 — Port 1 bit 5 (input only).
I 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 In-System Programming 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 powerup until V
DD
has reached its
specified level. When system power is removed V
DD
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 V
DD
falls below the minimum specified operating voltage.
51 I/OP1.6 — Port 1 bit 6.
O OCB — Output Compare B
428I/OP1.7 — Port 1 bit 7.
O OCC — Output Compare C
Table 1: Pin description
…continued
Symbol Pin Type Description
TSSOP28,
PLCC28
HVQFN28
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual Rev. 02 — 23 May 2005 10 of 133
Philips Semiconductors
UM10109
P89LPC932A1 User manual
P2.0 to P2.7 1, 2, 13,
14, 15, 16,
27, 28
25, 26, 9,
10, 11, 12,
23, 24
I/O Port 2: Port 2 is an 8-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 4.1 “
Port configurations and
the P89LPC932A1 data sheet, Static characteristics for details.
All pins have Schmitt triggered inputs.
Port 2 also provides various special functions as described below:
125I/OP2.0 — Port 2 bit 0.
I ICB — Input Capture B
226I/OP2.1 — Port 2 bit 1.
O OCD — Output Compare D
13 9 I/O P2.2 — Port 2 bit 2.
I/O MOSI — SPI master out slave in. When configured as master, this pin is
output; when configured as slave, this pin is input.
14 10 I/O P2.3 — Port 2 bit 3.
I/O MISO — When configured as master, this pin is input, when configured
as slave, this pin is output.
15 11 I/O P2.4 — Port 2 bit 4.
I SS
SPI Slave select.
16 12 I/O P2.5 — Port 2 bit 5.
I/O SPICLK — SPI clock. When configured as master, this pin is output;
when configured as slave, this pin is input.
27 23 I/O P2.6 — Port 2 bit 6.
O OCA — Output Compare A
28 24 I/O P2.7 — Port 2 bit 7.
I ICA — Input Capture A
Table 1: Pin description
…continued
Symbol Pin Type Description
TSSOP28,
PLCC28
HVQFN28
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual Rev. 02 — 23 May 2005 11 of 133
Philips Semiconductors
UM10109
P89LPC932A1 User manual
[1] Input/Output for P1.0 to P1.4, P1.6, P1.7. Input for P1.5.
P3.0 to P3.1 9, 8 5, 4 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 4.1
and the P89LPC932A1
data sheet, Static characteristics for details.
All pins have Schmitt triggered inputs.
Port 3 also provides various special functions as described below:
95 I/OP3.0 — Port 3 bit 0.
O XTAL2 — Output from the oscillator amplifier (when a crystal oscillator
option is selected via the FLASH configuration.
O 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 Real-Time clock/system timer.
84 I/OP3.1 — Port 3 bit 1.
I 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
Real-Time clock/system timer.
V
SS
73 IGround: 0 V reference.
V
DD
21 17 I Power Supply: This is the power supply voltage for normal operation as
well as Idle and Power-down modes.
Table 1: Pin description
…continued
Symbol Pin Type Description
TSSOP28,
PLCC28
HVQFN28
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual Rev. 02 — 23 May 2005 12 of 133
Philips Semiconductors
UM10109
P89LPC932A1 User manual
Fig 4. P89LPC932A1 block diagram.
ACCELERATED 2-CLOCK 80C51 CPU
8 kB
CODE FLASH
256-BYTE
DATA RAM
PORT 2
CONFIGURABLE I/Os
PORT 1
CONFIGURABLE I/Os
PORT 0
CONFIGURABLE I/Os
KEYPAD
INTERRUPT
PROGRAMMABLE
OSCILLATOR DIVIDER
CPU
clock
CONFIGURABLE
OSCILLATOR
ON-CHIP
RC
OSCILLATOR
internal
bus
CRYSTAL
OR
RESONATOR
POWER MONITOR
(POWER-ON RESET,
BROWNOUT RESET)
002aaa885
UART
ANALOG
COMPARATORS
512-BYTE
AUXILIARY RAM
I
2
C-BUS
512-BYTE
DATA EEPROM
PORT 3
CONFIGURABLE I/Os
CCU (CAPTURE/
COMPARE UNIT)
P89LPC932A1
WATCHDOG TIMER
AND OSCILLATOR
TIMER 0
TIMER 1
REAL-TIME CLOCK/
SYSTEM TIMER
SPI
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual Rev. 02 — 23 May 2005 13 of 133
Philips Semiconductors
UM10109
P89LPC932A1 User manual
1.4 Special function registers
Remark: Special Function Registers (SFRs) accesses are restricted in the following ways:
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 ‘-’, ‘0’ or ‘1’ can only be written and read as follows:
‘-’ Unless otherwise specified, must be written with ‘0’, but can return any value
when read (even if it was written with ‘0’). It is a reserved bit and may be used in
future derivatives.
‘0’ must be written with ‘0’, and will return a ‘0’ when read.
‘1’ must be written with ‘1’, and will return a ‘1’ when read.
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual Rev. 02 — 23 May 2005 14 of 133
Philips Semiconductors
UM10109
P89LPC932A1 User manual
Table 2: P89LPC932A1 Special function registers
* indicates SFRs that are bit addressable.
Name Description SFR
addr.
Bit functions and addresses Reset value
MSB LSB Hex Binary
Bit address E7 E6 E5 E4 E3 E2 E1 E0
ACC* Accumulator E0H 00 0000 0000
AUXR1 Auxiliary function register A2H CLKLP EBRR ENT1 ENT0 SRST 0 - DPS 00 0000 00x0
Bit address F7 F6 F5 F4 F3 F2 F1 F0
B* B register F0H 00 0000 0000
BRGR0
[2]
Baud rate generator rate
low
BEH 00 0000 0000
BRGR1
[2]
Baud rate generator rate
high
BFH 00 0000 0000
BRGCON Baud rate generator
control
BDH------SBRGSBRGEN00
[2]
xxxx xx00
CCCRA Capture compare A control
register
EAH ICECA2 ICECA1 ICECA0 ICESA ICNFA FCOA OCMA1 OCMA0 00 0000 0000
CCCRB Capture compare B control
register
EBH ICECB2 ICECB1 ICECB0 ICESB ICNFB FCOB OCMB1 OCMB0 00 0000 0000
CCCRC Capture compare C control
register
ECH-----FCOCOCMC1OCMC000xxxxx000
CCCRD Capture compare D control
register
EDH-----FCODOCMD1OCMD000xxxxx000
CMP1 Comparator 1 control
register
ACH - - CE1 CP1 CN1 OE1 CO1 CMF1 00
[1]
xx00 0000
CMP2 Comparator 2 control
register
ADH - - CE2 CP2 CN2 OE2 CO2 CMF2 00
[1]
xx00 0000
DEECON Data EEPROM control
register
F1H EEIF HVERR ECTL1 ECTL0 - - - EADR8 0E 0000 1110
DEEDAT Data EEPROM data
register
F2H 00 0000 0000
DEEADR Data EEPROM address
register
F3H 00 0000 0000
DIVM CPU clock divide-by-M
control
95H 00 0000 0000
DPTR Data pointer (2 bytes)
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual Rev. 02 — 23 May 2005 15 of 133
Philips Semiconductors
UM10109
P89LPC932A1 User manual
DPH Data pointer high 83H 00 0000 0000
DPL Data pointer low 82H 00 0000 0000
I2ADR I
2
C slave address register DBH I2ADR.6 I2ADR.5 I2ADR.4 I2ADR.3 I2ADR.2 I2ADR.1 I2ADR.0 GC 00 0000 0000
Bit address DF DE DD DC DB DA D9 D8
I2CON* I
2
C control register D8H - I2EN STA STO SI AA - CRSEL 00 x000 00x0
I2DAT I
2
C data register DAH
I2SCLH Serial clock generator/SCL
duty cycle register high
DDH 00 0000 0000
I2SCLL Serial clock generator/SCL
duty cycle register low
DCH 00 0000 0000
I2STAT I
2
C status register D9H STA.4 STA.3 STA.2 STA.1 STA.0 0 0 0 F8 1111 1000
ICRAH Input capture A register
high
ABH 00 0000 0000
ICRAL Input capture A register
low
AAH 00 0000 0000
ICRBH Input capture B register
high
AFH 00 0000 0000
ICRBL Input capture B register
low
AEH 00 0000 0000
Bit address AF AE AD AC AB AA A9 A8
IEN0* Interrupt enable 0 A8H EA EWDRT EBO ES/ESR ET1 EX1 ET0 EX0 00 0000 0000
Bit address EF EE ED EC EB EA E9 E8
IEN1* Interrupt enable 1 E8H EIEE EST - ECCU ESPI EC EKBI EI2C 00
[1]
00x0 0000
Bit address BF BE BD BC BB BA B9 B8
IP0* Interrupt priority 0 B8H - PWDRT PBO PS/PSR PT1 PX1 PT0 PX0 00
[1]
x000 0000
IP0H Interrupt priority 0 high B7H - PWDRT
H
PBOH PSH/
PSRH
PT1H PX1H PT0H PX0H 00
[1]
x000 0000
Bit address FF FE FD FC FB FA F9 F8
IP1* Interrupt priority 1 F8H PIEE PST - PCCU PSPI PC PKBI PI2C 00
[1]
00x0 0000
IP1H Interrupt priority 1 high F7H PIEEH PSTH - PCCUH PSPIH PCH PKBIH PI2CH 00
[1]
00x0 0000
Table 2: P89LPC932A1 Special function registers
…continued
* indicates SFRs that are bit addressable.
Name Description SFR
addr.
Bit functions and addresses Reset value
MSB LSB Hex Binary
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual Rev. 02 — 23 May 2005 16 of 133
Philips Semiconductors
UM10109
P89LPC932A1 User manual
KBCON Keypad control register 94H ------PATN
_SEL
KBIF 00
[1]
xxxx xx00
KBMASK Keypad interrupt mask
register
86H 00 0000 0000
KBPATN Keypad pattern register 93H FF 1111 1111
OCRAH Output compare A register
high
EFH 00 0000 0000
OCRAL Output compare A register
low
EEH 00 0000 0000
OCRBH Output compare B register
high
FBH 00 0000 0000
OCRBL Output compare B register
low
FAH 00 0000 0000
OCRCH Output compare C register
high
FDH 00 0000 0000
OCRCL Output compare C register
low
FCH 00 0000 0000
OCRDH Output compare D register
high
FFH 00 0000 0000
OCRDL Output compare D register
low
FEH 00 0000 0000
Bit address 87 86 85 84 83 82 81 80
P0* Port 0 80H T1/KB7 CMP1
/KB6
CMPREF
/KB5
CIN1A
/KB4
CIN1B
/KB3
CIN2A
/KB2
CIN2B
/KB1
CMP2
/KB0
[1]
Bit address 97 96 95 94 93 92 91 90
P1* Port 1 90H OCC OCB RST
INT1 INT0/
SDA
T0/SCL RXD TXD
[1]
Bit address 97 96 95 94 93 92 91 90
P2* Port 2 A0H ICA OCA SPICLK SS
MISO MOSI OCD ICB
[1]
Bit address B7 B6 B5 B4 B3 B2 B1 B0
P3*Port3 B0H------XTAL1XTAL2
[1]
P0M1 Port 0 output mode 1 84H (P0M1.7) (P0M1.6) (P0M1.5) (P0M1.4) (P0M1.3) (P0M1.2) (P0M1.1) (P0M1.0) FF
[1]
1111 1111
Table 2: P89LPC932A1 Special function registers
…continued
* indicates SFRs that are bit addressable.
Name Description SFR
addr.
Bit functions and addresses Reset value
MSB LSB Hex Binary
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual Rev. 02 — 23 May 2005 17 of 133
Philips Semiconductors
UM10109
P89LPC932A1 User manual
P0M2 Port 0 output mode 2 85H (P0M2.7) (P0M2.6) (P0M2.5) (P0M2.4) (P0M2.3) (P0M2.2) (P0M2.1) (P0M2.0) 00
[1]
0000 0000
P1M1 Port 1 output mode 1 91H (P1M1.7) (P1M1.6) - (P1M1.4) (P1M1.3) (P1M1.2) (P1M1.1) (P1M1.0) D3
[1]
11x1 xx11
P1M2 Port 1 output mode 2 92H (P1M2.7) (P1M2.6) - (P1M2.4) (P1M2.3) (P1M2.2) (P1M2.1) (P1M2.0) 00
[1]
00x0 xx00
P2M1 Port 2 output mode 1 A4H (P2M1.7) (P2M1.6) (P2M1.5) (P2M1.4) (P2M1.3) (P2M1.2) (P2M1.1) (P2M1.0) FF
[1]
1111 1111
P2M2 Port 2 output mode 2 A5H (P2M2.7) (P2M2.6) (P2M2.5) (P2M2.4) (P2M2.3) (P2M2.2) (P2M2.1) (P2M2.0) 00
[1]
0000 0000
P3M1Port3 output mode1B1H------(P3M1.1)(P3M1.0)03
[1]
xxxx xx11
P3M2Port3 output mode2B2H------(P3M2.1)(P3M2.0)00
[1]
xxxx xx00
PCON Power control register 87H SMOD1 SMOD0 BOPD BOI GF1 GF0 PMOD1 PMOD0 00 0000 0000
PCONA Power control register A B5H RTCPD DEEPD VCPD - I2PD SPPD SPD CCUPD 00
[1]
0000 0000
Bit address D7 D6 D5 D4 D3 D2 D1 D0
PSW* Program status word D0H CY AC F0 RS1 RS0 OV F1 P 00 0000 0000
PT0AD Port 0 digital input disable F6H - - PT0AD.5 PT0AD.4 PT0AD.3 PT0AD.2 PT0AD.1 - 00 xx00 000x
RSTSRC Reset source register DFH - - BOF POF R_BK R_WD R_SF R_EX
[3]
RTCCON Real-time clock control D1H RTCF RTCS1 RTCS0 - - - ERTC RTCEN 60
[1][6]
011x xx00
RTCH Real-time clock register
high
D2H 00
[6]
0000 0000
RTCL Real-time clock register
low
D3H 00
[6]
0000 0000
SADDR Serial port address
register
A9H 00 0000 0000
SADEN Serial port address enable B9H 00 0000 0000
SBUF Serial Port data buffer
register
99H xx xxxx xxxx
Table 2: P89LPC932A1 Special function registers
…continued
* indicates SFRs that are bit addressable.
Name Description SFR
addr.
Bit functions and addresses Reset value
MSB LSB Hex Binary
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual Rev. 02 — 23 May 2005 18 of 133
Philips Semiconductors
UM10109
P89LPC932A1 User manual
Bit address 9F 9E 9D 9C 9B 9A 99 98
SCON* Serial port control 98H SM0/FE SM1 SM2 REN TB8 RB8 TI RI 00 0000 0000
SSTAT Serial port extended status
register
BAH DBMOD INTLO CIDIS DBISEL FE BR OE STINT 00 0000 0000
SP Stack pointer 81H 07 0000 0111
SPCTL SPI control register E2H SSIG SPEN DORD MSTR CPOL CPHA SPR1 SPR0 04 0000 0100
SPSTAT SPI status register E1H SPIF WCOL - - ----0000xxxxxx
SPDAT SPI data register E3H 00 0000 0000
TAMOD Timer 0 and 1 auxiliary
mode
8FH - - - T1M2 - - - T0M2 00 xxx0 xxx0
Bit address 8F 8E 8D 8C 8B 8A 89 88
TCON* Timer 0 and 1 control 88H TF1 TR1 TF0 TR0 IE1 IT1 IE0 IT0 00 0000 0000
TCR20* CCU control register 0 C8H PLEEN HLTRN HLTEN ALTCD ALTAB TDIR2 TMOD21 TMOD20 00 0000 0000
TCR21 CCU control register 1 F9H TCOU2 - - - PLLDV.3 PLLDV.2 PLLDV.1 PLLDV.0 00 0xxx 0000
TH0 Timer 0 high 8CH 00 0000 0000
TH1 Timer 1 high 8DH 00 0000 0000
TH2 CCU timer high CDH 00 0000 0000
TICR2 CCU interrupt control
register
C9H TOIE2 TOCIE2D TOCIE2C TOCIE2B TOCIE2A - TICIE2B TICIE2A 00 0000 0x00
TIFR2 CCU interrupt flag register E9H TOIF2 TOCF2D TOCF2C TOCF2B TOCF2A - TICF2B TICF2A 00 0000 0x00
TISE2 CCU interrupt status
encode register
DEH-----ENCINT.
2
ENCINT.
1
ENCINT.
0
00 xxxx x000
TL0 Timer 0 low 8AH 00 0000 0000
TL1 Timer 1 low 8BH 00 0000 0000
TL2 CCU timer low CCH 00 0000 0000
TMOD Timer 0 and 1 mode 89H T1GATE T1C/T
T1M1 T1M0 T0GATE T0C/T T0M1 T0M0 00 0000 0000
TOR2H CCU reload register high CFH 00 0000 0000
TOR2L CCU reload register low CEH 00 0000 0000
TPCR2H Prescaler control register
high
CBH------TPCR2H.
1
TPCR2H.
0
00 xxxx xx00
Table 2: P89LPC932A1 Special function registers
…continued
* indicates SFRs that are bit addressable.
Name Description SFR
addr.
Bit functions and addresses Reset value
MSB LSB Hex Binary
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual Rev. 02 — 23 May 2005 19 of 133
Philips Semiconductors
UM10109
P89LPC932A1 User manual
[1] All ports are in input only (high-impedance) state after power-up.
[2] 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.
[3] The RSTSRC register reflects the cause of the P89LPC932A1 reset. Upon a power-up reset, all reset source flags are cleared except POF and BOF; the power-on reset value is
xx110000.
[4] After reset, the value is 111001x1, i.e., PRE2-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.
[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] The only reset source that affects these SFRs is power-on reset.
TPCR2L Prescaler control register
low
CAH TPCR2L.
7
TPCR2L.
6
TPCR2L.
5
TPCR2L.
4
TPCR2L.
3
TPCR2L.
2
TPCR2L.
1
TPCR2L.
0
00 0000 0000
TRIM Internal oscillator trim
register
96H RCCLK ENCLK TRIM.5 TRIM.4 TRIM.3 TRIM.2 TRIM.1 TRIM.0
[5]
[6]
WDCON Watchdog control register A7H PRE2 PRE1 PRE0 - - WDRUN WDTOF WDCLK
[4]
[6]
WDL Watchdog load C1H FF 1111 1111
WFEED1 Watchdog feed 1 C2H
WFEED2 Watchdog feed 2 C3H
Table 2: P89LPC932A1 Special function registers
…continued
* indicates SFRs that are bit addressable.
Name Description SFR
addr.
Bit functions and addresses Reset value
MSB LSB Hex Binary
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual Rev. 02 — 23 May 2005 20 of 133
Philips Semiconductors
UM10109
P89LPC932A1 User manual
1.5 Memory organization
The various P89LPC932A1 memory spaces are as follows:
DATA 128 bytes of internal data memory space (00h:7Fh) accessed via direct or
indirect addressing, using instruction 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.
CODE — 64 kB of Code memory space, accessed as part of program execution and via
the MOVC instruction. The P89LPC932A1 has 8 kB of on-chip Code memory.
Fig 5. P89LPC932A1 memory map.
002aaa948
0000h
03FFh
0400h
07FFh
0800h
0BFFh
0C00h
0FFFh
SECTOR 0
SECTOR 1
SECTOR 2
SECTOR 3
1000h
13FFh
1400h
17FFh
1800h
1BFFh
1C00h
1E00h
1FFFh
SECTOR 4
SECTOR 5
SECTOR 6
FFEFh
FF00h
IAP entry-
points
SECTOR 7
ISP CODE
(512B)*
SPECIAL FUNCTION
REGISTERS
(DIRECTLY ADDRESSABLE)
128 BYTES ON-CHIP
DATA MEMORY (STACK,
DIRECT AND INDIR. ADDR.)
4 REG. BANKS R[7:0]
data memory
(DATA, IDATA)
DATA
128 BYTES ON-CHIP
DATA MEMORY (STACK
AND INDIR. ADDR.)
IDATA (incl. DATA)
FFEFh
FF1Fh
FF00h
entry points for:
-51 ASM. code
-C code
IDATA routines
1FFFh
1E00h
entry points for:
-UART (auto-baud)
-I2C, SPI, etc.*
flexible choices:
-as supplied (UART)
-Philips libraries*
-user-defined
ISP serial loader
entry
points
read-protected
IAP calls only
Table 3: Data RAM arrangement
Type Data RAM Size (bytes)
DATA Directly and indirectly addressable memory 128
IDATA Indirectly addressable memory 256
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65
  • Page 66 66
  • Page 67 67
  • Page 68 68
  • Page 69 69
  • Page 70 70
  • Page 71 71
  • Page 72 72
  • Page 73 73
  • Page 74 74
  • Page 75 75
  • Page 76 76
  • Page 77 77
  • Page 78 78
  • Page 79 79
  • Page 80 80
  • Page 81 81
  • Page 82 82
  • Page 83 83
  • Page 84 84
  • Page 85 85
  • Page 86 86
  • Page 87 87
  • Page 88 88
  • Page 89 89
  • Page 90 90
  • Page 91 91
  • Page 92 92
  • Page 93 93
  • Page 94 94
  • Page 95 95
  • Page 96 96
  • Page 97 97
  • Page 98 98
  • Page 99 99
  • Page 100 100
  • Page 101 101
  • Page 102 102
  • Page 103 103
  • Page 104 104
  • Page 105 105
  • Page 106 106
  • Page 107 107
  • Page 108 108
  • Page 109 109
  • Page 110 110
  • Page 111 111
  • Page 112 112
  • Page 113 113
  • Page 114 114
  • Page 115 115
  • Page 116 116
  • Page 117 117
  • Page 118 118
  • Page 119 119
  • Page 120 120
  • Page 121 121
  • Page 122 122
  • Page 123 123
  • Page 124 124
  • Page 125 125
  • Page 126 126
  • Page 127 127
  • Page 128 128
  • Page 129 129
  • Page 130 130
  • Page 131 131
  • Page 132 132
  • Page 133 133

Philips P89LPC932A1FHN User manual

Type
User manual
This manual is also suitable for

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI