P89LPC952
Philips Semiconductors
8-bit microcontroller with 10-bit ADC
21. Contents
1
General description . . . . . . . . . . . . . . . . . . . . . . 1
7.16.1
7.17
Reset vector . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Timers/counters 0 and 1 . . . . . . . . . . . . . . . . 30
Mode 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Mode 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Mode 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Mode 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Mode 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Timer overflow toggle output . . . . . . . . . . . . . 31
RTC/system timer. . . . . . . . . . . . . . . . . . . . . . 31
UARTs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Mode 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Mode 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Mode 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Mode 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Baud rate generator and selection. . . . . . . . . 32
Framing error . . . . . . . . . . . . . . . . . . . . . . . . . 33
Break detect. . . . . . . . . . . . . . . . . . . . . . . . . . 33
Double buffering. . . . . . . . . . . . . . . . . . . . . . . 33
Transmit interrupts with double buffering
2
2.1
2.2
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Principal features . . . . . . . . . . . . . . . . . . . . . . . 1
Additional features . . . . . . . . . . . . . . . . . . . . . . 2
7.17.1
7.17.2
7.17.3
7.17.4
7.17.5
7.17.6
7.18
3
3.1
4
Ordering information. . . . . . . . . . . . . . . . . . . . . 3
Ordering options. . . . . . . . . . . . . . . . . . . . . . . . 3
Block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Functional diagram . . . . . . . . . . . . . . . . . . . . . . 5
5
7.19
6
6.1
6.2
Pinning information. . . . . . . . . . . . . . . . . . . . . . 6
Pinning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Pin description . . . . . . . . . . . . . . . . . . . . . . . . . 8
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
7.1
7.2
7.3
7.3.1
7.3.2
7.3.3
7.3.4
7.3.5
7.3.6
7.4
Functional description . . . . . . . . . . . . . . . . . . 13
Special function registers . . . . . . . . . . . . . . . . 13
Enhanced CPU. . . . . . . . . . . . . . . . . . . . . . . . 21
Clocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Clock definitions . . . . . . . . . . . . . . . . . . . . . . . 21
CPU clock (OSCCLK). . . . . . . . . . . . . . . . . . . 21
Low speed oscillator option . . . . . . . . . . . . . . 21
Medium speed oscillator option . . . . . . . . . . . 21
High speed oscillator option . . . . . . . . . . . . . . 21
Clock output . . . . . . . . . . . . . . . . . . . . . . . . . . 22
On-chip RC oscillator option. . . . . . . . . . . . . . 22
Watchdog oscillator option . . . . . . . . . . . . . . . 22
External clock input option . . . . . . . . . . . . . . . 22
CCLK wake-up delay . . . . . . . . . . . . . . . . . . . 23
CCLK modification: DIVM register . . . . . . . . . 23
Low power select . . . . . . . . . . . . . . . . . . . . . . 23
Memory organization . . . . . . . . . . . . . . . . . . . 24
Data RAM arrangement . . . . . . . . . . . . . . . . . 24
Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
External interrupt inputs . . . . . . . . . . . . . . . . . 25
I/O ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Port configurations . . . . . . . . . . . . . . . . . . . . . 27
enabled (Modes 1, 2 and 3) . . . . . . . . . . . . . . 33
7.19.10 The 9th bit (bit 8) in double buffering
(Modes 1, 2 and 3). . . . . . . . . . . . . . . . . . . . . 33
7.20
7.21
7.21.1
7.22
7.22.1
7.22.2
7.22.3
7.23
7.24
7.25
I2C-bus serial interface. . . . . . . . . . . . . . . . . . 34
SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Typical SPI configurations . . . . . . . . . . . . . . . 37
Analog comparators. . . . . . . . . . . . . . . . . . . . 38
Internal reference voltage. . . . . . . . . . . . . . . . 39
Comparator interrupt . . . . . . . . . . . . . . . . . . . 39
Comparators and power reduction modes . . . 39
KBI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Watchdog timer . . . . . . . . . . . . . . . . . . . . . . . 40
Additional features . . . . . . . . . . . . . . . . . . . . . 41
Software reset . . . . . . . . . . . . . . . . . . . . . . . . 41
Dual data pointers . . . . . . . . . . . . . . . . . . . . . 41
Flash program memory . . . . . . . . . . . . . . . . . 41
General description . . . . . . . . . . . . . . . . . . . . 41
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Flash organization . . . . . . . . . . . . . . . . . . . . . 42
Using flash as data storage . . . . . . . . . . . . . . 42
Flash programming and erasing. . . . . . . . . . . 42
ICP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
IAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
ISP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Power-on reset code execution . . . . . . . . . . . 43
7.5
7.6
7.7
7.8
7.9
7.10
7.11
7.12
7.12.1
7.13
7.13.1
7.25.1
7.25.2
7.26
7.13.1.1 Quasi-bidirectional output configuration . . . . . 27
7.13.1.2 Open-drain output configuration . . . . . . . . . . . 28
7.13.1.3 Input-only configuration . . . . . . . . . . . . . . . . . 28
7.13.1.4 Push-pull output configuration . . . . . . . . . . . . 28
7.13.2
7.13.3
7.14
7.14.1
7.14.2
7.15
7.15.1
7.15.2
7.15.3
7.16
7.26.1
7.26.2
7.26.3
7.26.4
7.26.5
7.26.6
7.26.7
7.26.8
7.26.9
Port 0 analog functions. . . . . . . . . . . . . . . . . . 28
Additional port features. . . . . . . . . . . . . . . . . . 28
Power monitoring functions. . . . . . . . . . . . . . . 28
Brownout detection. . . . . . . . . . . . . . . . . . . . . 29
Power-on detection. . . . . . . . . . . . . . . . . . . . . 29
Power reduction modes . . . . . . . . . . . . . . . . . 29
Idle mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Power-down mode . . . . . . . . . . . . . . . . . . . . . 29
Total Power-down mode . . . . . . . . . . . . . . . . . 29
Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.26.10 Hardware activation of the boot loader. . . . . . 44
7.27
7.28
User configuration bytes. . . . . . . . . . . . . . . . . 44
User sector security bytes . . . . . . . . . . . . . . . 44
8
ADC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
continued >>
9397 750 14716
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
Preliminary data sheet
Rev. 01— 16 September 2005
65 of 66