P89LPC9102_9103_9107_3 © NXP B.V. 2007. All rights reserved.
Product data sheet Rev. 03 — 10 July 2007 60 of 61
continued >>
NXP Semiconductors
P89LPC9102/9103/9107
8-bit microcontrollers with two-clock accelerated 80C51 core
19. Contents
1 General description . . . . . . . . . . . . . . . . . . . . . . 1
2 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2.1 Principal features . . . . . . . . . . . . . . . . . . . . . . . 1
2.2 Additional features . . . . . . . . . . . . . . . . . . . . . . 1
3 Product comparison overview . . . . . . . . . . . . . 2
4 Ordering information . . . . . . . . . . . . . . . . . . . . . 3
4.1 Ordering options . . . . . . . . . . . . . . . . . . . . . . . . 3
5 Block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 4
6 Functional diagram . . . . . . . . . . . . . . . . . . . . . . 6
7 Pinning information. . . . . . . . . . . . . . . . . . . . . . 8
7.1 Pinning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
7.2 Pin description . . . . . . . . . . . . . . . . . . . . . . . . 10
8 Functional description . . . . . . . . . . . . . . . . . . 15
8.1 Special function registers . . . . . . . . . . . . . . . . 15
8.2 Enhanced CPU. . . . . . . . . . . . . . . . . . . . . . . . 27
8.3 Clocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
8.3.1 Clock definitions . . . . . . . . . . . . . . . . . . . . . . . 27
8.3.2 CPU clock (CCLK) . . . . . . . . . . . . . . . . . . . . . 27
8.4 On-chip RC oscillator option. . . . . . . . . . . . . . 27
8.5 Watchdog oscillator option . . . . . . . . . . . . . . . 28
8.6 External clock input option . . . . . . . . . . . . . . . 28
8.7 CCLK wake-up delay . . . . . . . . . . . . . . . . . . . 29
8.8 CCLK modification: DIVM register . . . . . . . . . 29
8.9 Low power select . . . . . . . . . . . . . . . . . . . . . . 29
8.10 Memory organization . . . . . . . . . . . . . . . . . . . 29
8.11 Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
8.11.1 External interrupt inputs . . . . . . . . . . . . . . . . . 30
8.12 I/O ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
8.12.1 Port configurations . . . . . . . . . . . . . . . . . . . . . 31
8.12.2 Quasi-bidirectional output configuration . . . . . 32
8.12.3 Open-drain output configuration . . . . . . . . . . . 32
8.12.4 Input-only configuration . . . . . . . . . . . . . . . . . 32
8.12.5 Push-pull output configuration . . . . . . . . . . . . 32
8.12.6 Port 0 analog functions. . . . . . . . . . . . . . . . . . 32
8.12.7 Additional port features. . . . . . . . . . . . . . . . . . 32
8.13 Power monitoring functions. . . . . . . . . . . . . . . 33
8.13.1 Brownout detection. . . . . . . . . . . . . . . . . . . . . 33
8.13.2 Power-on detection. . . . . . . . . . . . . . . . . . . . . 33
8.14 Power reduction modes . . . . . . . . . . . . . . . . . 33
8.14.1 Idle mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
8.14.2 Slow-down mode using the DIVM register . . . 34
8.14.3 Power-down mode . . . . . . . . . . . . . . . . . . . . . 34
8.14.4 Total Power-down mode . . . . . . . . . . . . . . . . . 34
8.15 Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
8.16 Timers 0 and 1 . . . . . . . . . . . . . . . . . . . . . . . . 35
8.16.1 Mode 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.16.2 Mode 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.16.3 Mode 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.16.4 Mode 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.16.5 Mode 6 (P89LPC9102/9107) . . . . . . . . . . . . . 35
8.16.6 Timer overflow toggle output
(P89LPC9102/9107) . . . . . . . . . . . . . . . . . . . 36
8.17 RTC/system timer. . . . . . . . . . . . . . . . . . . . . . 36
8.18 UART (P89LPC9103/9107) . . . . . . . . . . . . . . 36
8.18.1 Mode 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
8.18.2 Mode 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
8.18.3 Mode 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
8.18.4 Mode 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
8.18.5 Baud rate generator and selection . . . . . . . . . 37
8.18.6 Framing error . . . . . . . . . . . . . . . . . . . . . . . . . 37
8.18.7 Break detect. . . . . . . . . . . . . . . . . . . . . . . . . . 37
8.18.8 Double buffering. . . . . . . . . . . . . . . . . . . . . . . 37
8.18.9 Transmit interrupts with double buffering
enabled (Modes 1, 2 and 3) . . . . . . . . . . . . . . 38
8.18.10 The 9
th
bit (bit 8) in double buffering
(Modes 1, 2 and 3). . . . . . . . . . . . . . . . . . . . . 38
8.19 Analog comparators. . . . . . . . . . . . . . . . . . . . 38
8.20 Internal reference voltage. . . . . . . . . . . . . . . . 38
8.21 Comparator interrupt . . . . . . . . . . . . . . . . . . . 39
8.22 Comparator and power reduction modes. . . . 39
8.23 Keypad interrupt (KBI) . . . . . . . . . . . . . . . . . . 39
8.24 Watchdog timer . . . . . . . . . . . . . . . . . . . . . . . 39
8.25 Additional features . . . . . . . . . . . . . . . . . . . . . 40
8.25.1 Software reset . . . . . . . . . . . . . . . . . . . . . . . . 40
8.25.2 Dual data pointers . . . . . . . . . . . . . . . . . . . . . 40
8.26 Flash program memory . . . . . . . . . . . . . . . . . 41
8.26.1 General description . . . . . . . . . . . . . . . . . . . . 41
8.26.2 Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
8.26.3 Flash organization . . . . . . . . . . . . . . . . . . . . . 41
8.26.4 Flash programming and erasing. . . . . . . . . . . 41
8.26.5 In-circuit programming . . . . . . . . . . . . . . . . . . 42
8.26.6 In-application programming (IAP-Lite) . . . . . . 42
8.26.7 Using flash as data storage . . . . . . . . . . . . . . 42
8.26.8 User configuration bytes. . . . . . . . . . . . . . . . . 42
8.26.9 User sector security bytes . . . . . . . . . . . . . . . 42
9 A/D Converter . . . . . . . . . . . . . . . . . . . . . . . . . 43
9.1 General description . . . . . . . . . . . . . . . . . . . . 43
9.2 Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
9.3 Block diagram. . . . . . . . . . . . . . . . . . . . . . . . . 44
9.4 A/D operating modes . . . . . . . . . . . . . . . . . . . 44
9.4.1 Fixed channel, single conversion mode . . . . . 44
9.4.2 Fixed channel, continuous conversion mode . 44
9.4.3 Auto scan, single conversion mode . . . . . . . . 44
9.4.4 Auto scan, continuous conversion mode . . . . 44