Philips UM10109 Microscope & Magnifier User Manual


 
Philips Semiconductors
UM10109
P89LPC932A1 User manual
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual Rev. 02 — 23 May 2005 132 of 133
continued >>
22. Contents
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1 Comparison to the P89LPC932 device. . . . . . . 3
1.1.1 Byte-erasability (IAP-Lite) . . . . . . . . . . . . . . . . . 3
1.1.2 Serial in-circuit programming (ICP). . . . . . . . . . 3
1.1.3 ‘On-the-fly’ clock selection . . . . . . . . . . . . . . . . 3
1.1.4 Increased ISP/IAP functionality . . . . . . . . . . . . 4
1.1.4.1 Support for the watchdog timer. . . . . . . . . . . . . 4
1.1.4.2 XDATA data buffer option added for programming
code memory . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1.4.3 Port 0 initialization. . . . . . . . . . . . . . . . . . . . . . . 4
1.1.4.4 Direct load of UART baud rate fix . . . . . . . . . . . 4
1.1.4.5 Boot Vector and IAP entry points modified . . . . 4
1.1.4.6 IAP authorization key . . . . . . . . . . . . . . . . . . . . 4
1.1.4.7 Hardware write enable (WE) key . . . . . . . . . . . 4
1.1.4.8 Configuration byte protection . . . . . . . . . . . . . . 5
1.1.5 Previous errata fix. . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Pin configuration. . . . . . . . . . . . . . . . . . . . . . . . 5
1.3 Pin description . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 Special function registers . . . . . . . . . . . . . . . . 13
1.5 Memory organization . . . . . . . . . . . . . . . . . . . 20
2 Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.1 Enhanced CPU. . . . . . . . . . . . . . . . . . . . . . . . 21
2.2 Clock definitions . . . . . . . . . . . . . . . . . . . . . . . 21
2.2.1 Oscillator Clock (OSCCLK). . . . . . . . . . . . . . . 21
2.2.2 Low speed oscillator option . . . . . . . . . . . . . . 21
2.2.3 Medium speed oscillator option . . . . . . . . . . . 21
2.2.4 High speed oscillator option . . . . . . . . . . . . . . 21
2.3 Clock output . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.4 On-chip RC oscillator option. . . . . . . . . . . . . . 22
2.5 Watchdog oscillator option . . . . . . . . . . . . . . . 22
2.6 External clock input option . . . . . . . . . . . . . . . 22
2.7 Oscillator Clock (OSCCLK) wake-up delay. . . 23
2.8 CPU Clock (CCLK) modification: DIVM
register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.9 Low power select . . . . . . . . . . . . . . . . . . . . . . 24
3 Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.1 Interrupt priority structure . . . . . . . . . . . . . . . . 25
3.2 External Interrupt pin glitch suppression . . . . 25
4 I/O ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.1 Port configurations . . . . . . . . . . . . . . . . . . . . . 28
4.2 Quasi-bidirectional output configuration . . . . . 28
4.3 Open drain output configuration . . . . . . . . . . . 29
4.4 Input-only configuration . . . . . . . . . . . . . . . . . 30
4.5 Push-pull output configuration . . . . . . . . . . . . 30
4.6 Port 0 and Analog Comparator functions . . . . 31
4.7 Additional port features. . . . . . . . . . . . . . . . . . 31
5 Power monitoring functions . . . . . . . . . . . . . . 32
5.1 Brownout detection . . . . . . . . . . . . . . . . . . . . 32
5.2 Power-on detection . . . . . . . . . . . . . . . . . . . . 33
5.3 Power reduction modes . . . . . . . . . . . . . . . . . 33
6 Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
6.1 Reset vector. . . . . . . . . . . . . . . . . . . . . . . . . . 38
7 Timers 0 and 1 . . . . . . . . . . . . . . . . . . . . . . . . . 38
7.1 Mode 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
7.2 Mode 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
7.3 Mode 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
7.4 Mode 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
7.5 Mode 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
7.6 Timer overflow toggle output . . . . . . . . . . . . . 42
8 Real-time clock system timer. . . . . . . . . . . . . 43
8.1 Real-time clock source. . . . . . . . . . . . . . . . . . 44
8.2 Changing RTCS1/RTCS0 . . . . . . . . . . . . . . . 44
8.3 Real-time clock interrupt/wake-up . . . . . . . . . 44
8.4 Reset sources affecting the Real-time clock . 44
9 Capture/Compare Unit (CCU). . . . . . . . . . . . . 46
9.1 CCU Clock (CCUCLK) . . . . . . . . . . . . . . . . . . 47
9.2 CCU Clock prescaling . . . . . . . . . . . . . . . . . . 47
9.3 Basic timer operation . . . . . . . . . . . . . . . . . . . 47
9.4 Output compare . . . . . . . . . . . . . . . . . . . . . . . 49
9.5 Input capture . . . . . . . . . . . . . . . . . . . . . . . . . 51
9.6 PWM operation . . . . . . . . . . . . . . . . . . . . . . . 52
9.7 Alternating output mode. . . . . . . . . . . . . . . . . 53
9.8 Synchronized PWM register update . . . . . . . 54
9.9 HALT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
9.10 PLL operation. . . . . . . . . . . . . . . . . . . . . . . . . 54
9.11 CCU interrupt structure . . . . . . . . . . . . . . . . . 55
10 UART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
10.1 Mode 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
10.2 Mode 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
10.3 Mode 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
10.4 Mode 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
10.5 SFR space . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
10.6 Baud Rate generator and selection . . . . . . . . 59
10.7 Updating the BRGR1 and BRGR0 SFRs. . . . 60
10.8 Framing error . . . . . . . . . . . . . . . . . . . . . . . . . 60
10.9 Break detect. . . . . . . . . . . . . . . . . . . . . . . . . . 61
10.10 More about UART Mode 0 . . . . . . . . . . . . . . . 62
10.11 More about UART Mode 1 . . . . . . . . . . . . . . . 63
10.12 More about UART Modes 2 and 3 . . . . . . . . . 64
10.13 Framing error and RI in Modes 2 and 3 with
SM2 = 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
10.14 Break detect. . . . . . . . . . . . . . . . . . . . . . . . . . 65
10.15 Double buffering. . . . . . . . . . . . . . . . . . . . . . . 65
10.16 Double buffering in different modes . . . . . . . . 65