P89LPC92X1 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2012. All rights reserved.
Product data sheet Rev. 2.1 — 27 August 2012 74 of 75
continued >>
NXP Semiconductors
P89LPC9201/9211/922A1/9241/9251
8-bit microcontroller with 8-bit ADC
18. Contents
1 General description. . . . . . . . . . . . . . . . . . . . . . 1
2 Features and benefits . . . . . . . . . . . . . . . . . . . . 1
2.1 Principal features . . . . . . . . . . . . . . . . . . . . . . . 1
2.2 Additional features . . . . . . . . . . . . . . . . . . . . . . 2
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 . . . . . . . . . . . . . . . . . . . . . . . . . 9
7 Functional description . . . . . . . . . . . . . . . . . . 12
7.1 Special function registers . . . . . . . . . . . . . . . . 12
7.2 Enhanced CPU. . . . . . . . . . . . . . . . . . . . . . . . 26
7.3 Clocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
7.3.1 Clock definitions . . . . . . . . . . . . . . . . . . . . . . . 26
7.3.2 CPU clock (OSCCLK). . . . . . . . . . . . . . . . . . . 26
7.4 Crystal oscillator option. . . . . . . . . . . . . . . . . . 26
7.4.1 Low speed oscillator option . . . . . . . . . . . . . . 26
7.4.2 Medium speed oscillator option . . . . . . . . . . . 26
7.4.3 High speed oscillator option . . . . . . . . . . . . . . 26
7.5 Clock output . . . . . . . . . . . . . . . . . . . . . . . . . . 27
7.6 On-chip RC oscillator option. . . . . . . . . . . . . . 27
7.7 Watchdog oscillator option . . . . . . . . . . . . . . . 27
7.8 External clock input option . . . . . . . . . . . . . . . 27
7.9 Clock sources switch on the fly. . . . . . . . . . . . 27
7.10 CCLK wake-up delay . . . . . . . . . . . . . . . . . . . 28
7.11 CCLK modification: DIVM register . . . . . . . . . 28
7.12 Low power select . . . . . . . . . . . . . . . . . . . . . . 28
7.13 Memory organization . . . . . . . . . . . . . . . . . . . 29
7.14 Data RAM arrangement . . . . . . . . . . . . . . . . . 29
7.15 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
7.15.1 External interrupt inputs . . . . . . . . . . . . . . . . . 30
7.16 I/O ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
7.16.1 Port configurations . . . . . . . . . . . . . . . . . . . . . 32
7.16.1.1 Quasi-bidirectional output configuration . . . . . 32
7.16.1.2 Open-drain output configuration . . . . . . . . . . . 32
7.16.1.3 Input-only configuration . . . . . . . . . . . . . . . . . 33
7.16.1.4 Push-pull output configuration . . . . . . . . . . . . 33
7.16.2 Port 0 analog functions. . . . . . . . . . . . . . . . . . 33
7.16.3 Additional port features. . . . . . . . . . . . . . . . . . 33
7.17 Power monitoring functions . . . . . . . . . . . . . . 33
7.17.1 Brownout detection. . . . . . . . . . . . . . . . . . . . . 34
7.17.2 Power-on detection. . . . . . . . . . . . . . . . . . . . . 34
7.18 Power reduction modes . . . . . . . . . . . . . . . . . 34
7.18.1 Idle mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
7.18.2 Power-down mode . . . . . . . . . . . . . . . . . . . . . 34
7.18.3 Total Power-down mode . . . . . . . . . . . . . . . . 35
7.19 Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
7.19.1 Reset vector. . . . . . . . . . . . . . . . . . . . . . . . . . 36
7.20 Timers/counters 0 and 1 . . . . . . . . . . . . . . . . 36
7.20.1 Mode 0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
7.20.2 Mode 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
7.20.3 Mode 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
7.20.4 Mode 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
7.20.5 Mode 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
7.20.6 Timer overflow toggle output . . . . . . . . . . . . . 37
7.21 RTC/system timer . . . . . . . . . . . . . . . . . . . . . 37
7.22 UART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
7.22.1 Mode 0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
7.22.2 Mode 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
7.22.3 Mode 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
7.22.4 Mode 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
7.22.5 Baud rate generator and selection. . . . . . . . . 38
7.22.6 Framing error . . . . . . . . . . . . . . . . . . . . . . . . . 38
7.22.7 Break detect. . . . . . . . . . . . . . . . . . . . . . . . . . 38
7.22.8 Double buffering. . . . . . . . . . . . . . . . . . . . . . . 38
7.22.9 Transmit interrupts with double buffering
enabled (modes 1, 2 and 3). . . . . . . . . . . . . . 39
7.22.10 The 9
th
bit (bit 8) in double buffering
(modes 1, 2 and 3). . . . . . . . . . . . . . . . . . . . . 39
7.23 I
2
C-bus serial interface. . . . . . . . . . . . . . . . . . 39
7.24 Analog comparators. . . . . . . . . . . . . . . . . . . . 40
7.24.1 Internal reference voltage . . . . . . . . . . . . . . . 41
7.24.2 Comparator interrupt . . . . . . . . . . . . . . . . . . . 41
7.24.3 Comparators and power reduction modes. . . 41
7.25 KBI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
7.26 Watchdog timer . . . . . . . . . . . . . . . . . . . . . . . 42
7.27 Additional features . . . . . . . . . . . . . . . . . . . . . 43
7.27.1 Software reset . . . . . . . . . . . . . . . . . . . . . . . . 43
7.27.2 Dual data pointers . . . . . . . . . . . . . . . . . . . . . 43
7.28 Flash program memory . . . . . . . . . . . . . . . . . 43
7.28.1 General description . . . . . . . . . . . . . . . . . . . . 43
7.28.2 Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
7.28.3 Flash organization . . . . . . . . . . . . . . . . . . . . . 44
7.28.4 Using flash as data storage . . . . . . . . . . . . . . 44
7.28.5 Flash programming and erasing . . . . . . . . . . 44
7.28.6 ICP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
7.28.7 IAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
7.28.8 ISP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
7.28.9 Power-on reset code execution . . . . . . . . . . . 45
7.28.10 Hardware activation of the bootloader . . . . . . 46
7.29 User configuration bytes . . . . . . . . . . . . . . . . 46
7.30 User sector security bytes . . . . . . . . . . . . . . . 46
8 ADC (P89LPC9241/9251) . . . . . . . . . . . . . . . . 46