P89LPC9321FN NXP Semiconductors, P89LPC9321FN Datasheet - Page 69

no-image

P89LPC9321FN

Manufacturer Part Number
P89LPC9321FN
Description
MCU 8-Bit 89LP 80C51 CISC 8KB Flash 2.5V/3.3V 28-Pin PDIP Tube
Manufacturer
NXP Semiconductors
Datasheet
NXP Semiconductors
17. Contents
1
2
2.1
2.2
3
3.1
4
5
6
6.1
6.2
7
7.1
7.2
7.3
7.3.1
7.3.2
7.4
7.4.1
7.4.2
7.4.3
7.5
7.6
7.7
7.8
7.9
7.10
7.11
7.12
7.13
7.14
7.15
7.15.1
7.16
7.16.1
7.16.1.1
7.16.1.2
7.16.1.3
7.16.1.4
7.16.2
7.16.3
7.17
7.17.1
7.17.2
7.18
7.18.1
7.18.2
P89LPC9321_1
Product data sheet
General description . . . . . . . . . . . . . . . . . . . . . . 1
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Ordering information . . . . . . . . . . . . . . . . . . . . . 3
Block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Functional diagram . . . . . . . . . . . . . . . . . . . . . . 5
Pinning information . . . . . . . . . . . . . . . . . . . . . . 6
Functional description . . . . . . . . . . . . . . . . . . 11
Principal features . . . . . . . . . . . . . . . . . . . . . . . 1
Additional features . . . . . . . . . . . . . . . . . . . . . . 2
Ordering options . . . . . . . . . . . . . . . . . . . . . . . . 3
Pinning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Pin description . . . . . . . . . . . . . . . . . . . . . . . . . 8
Special function registers . . . . . . . . . . . . . . . . 11
Enhanced CPU . . . . . . . . . . . . . . . . . . . . . . . . 21
Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Clock definitions . . . . . . . . . . . . . . . . . . . . . . . 21
CPU clock (OSCCLK). . . . . . . . . . . . . . . . . . . 21
External crystal oscillator option . . . . . . . . . . . 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
Clock sources switch on the fly. . . . . . . . . . . . 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
Quasi-bidirectional output configuration . . . . . 27
Open-drain output configuration . . . . . . . . . . . 27
Input-only configuration . . . . . . . . . . . . . . . . . 28
Push-pull output configuration . . . . . . . . . . . . 28
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
Rev. 01 — 9 December 2008
8-bit microcontroller with accelerated two-clock 80C51 core
7.18.3
7.19
7.19.1
7.20
7.20.1
7.20.2
7.20.3
7.20.4
7.20.5
7.20.6
7.21
7.22
7.22.1
7.22.2
7.22.3
7.22.4
7.22.5
7.22.6
7.22.7
7.22.8
7.22.9
7.23
7.23.1
7.23.2
7.23.3
7.23.4
7.23.5
7.23.6
7.23.7
7.23.8
7.23.9
7.23.10
7.24
7.25
7.25.1
7.26
7.26.1
7.26.2
7.26.3
7.27
7.28
7.29
7.29.1
7.29.2
7.29.3
7.30
Total Power-down mode . . . . . . . . . . . . . . . . . 30
Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Reset vector . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Timers/counters 0 and 1 . . . . . . . . . . . . . . . . 31
Mode 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Mode 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Mode 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Mode 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Mode 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Timer overflow toggle output . . . . . . . . . . . . . 32
RTC/system timer. . . . . . . . . . . . . . . . . . . . . . 32
CCU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
CCU clock . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
CCUCLK prescaling . . . . . . . . . . . . . . . . . . . . 32
Basic timer operation . . . . . . . . . . . . . . . . . . . 32
Output compare . . . . . . . . . . . . . . . . . . . . . . . 33
Input capture . . . . . . . . . . . . . . . . . . . . . . . . . 33
PWM operation . . . . . . . . . . . . . . . . . . . . . . . 33
Alternating output mode . . . . . . . . . . . . . . . . . 34
PLL operation. . . . . . . . . . . . . . . . . . . . . . . . . 34
CCU interrupts . . . . . . . . . . . . . . . . . . . . . . . . 35
UART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Mode 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Mode 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Mode 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Mode 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Baud rate generator and selection . . . . . . . . . 36
Framing error . . . . . . . . . . . . . . . . . . . . . . . . . 36
Break detect . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Double buffering . . . . . . . . . . . . . . . . . . . . . . . 37
Transmit interrupts with double buffering
enabled (modes 1, 2 and 3) . . . . . . . . . . . . . . 37
The 9
(modes 1, 2 and 3) . . . . . . . . . . . . . . . . . . . . . 37
I
SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Typical SPI configurations . . . . . . . . . . . . . . . 41
Analog comparators . . . . . . . . . . . . . . . . . . . . 42
Internal reference voltage. . . . . . . . . . . . . . . . 43
Comparator interrupt . . . . . . . . . . . . . . . . . . . 43
Comparators and power reduction modes . . . 43
KBI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Watchdog timer . . . . . . . . . . . . . . . . . . . . . . . 44
Additional features . . . . . . . . . . . . . . . . . . . . . 45
Software reset . . . . . . . . . . . . . . . . . . . . . . . . 45
Dual data pointers . . . . . . . . . . . . . . . . . . . . . 45
Data EEPROM . . . . . . . . . . . . . . . . . . . . . . . . 45
Flash program memory . . . . . . . . . . . . . . . . . 46
2
C-bus serial interface. . . . . . . . . . . . . . . . . . 37
th
bit (bit 8) in double buffering
P89LPC9321
© NXP B.V. 2008. All rights reserved.
continued >>
69 of 70

Related parts for P89LPC9321FN