MPC89x54A
8-bit micro-controller
Features .................................................................................................................................. 2
General Description ............................................................................................................... 3
Order Information: ................................................................................................................. 3
Pin Description....................................................................................................................... 4
Pin Definition................................................................................................................. 4
Pin Configuration........................................................................................................... 6
Block Diagram ....................................................................................................................... 6
Special Function Register ...................................................................................................... 8
Memory.................................................................................................................................. 9
Organization................................................................................................................... 9
Nonvolatile Registers:.................................................................................................. 10
RAM ............................................................................................................................ 11
Embedded Flash........................................................................................................... 12
Functional Description......................................................................................................... 13
TIMERS/COUNTERS................................................................................................. 13
TIMER0 (T0) AND TIMER1 (T1) ...................................................................... 15
TIMER2 ............................................................................................................... 16
Interrupt........................................................................................................................ 20
Watchdog Timer........................................................................................................... 22
Serial IO Port (UART) ................................................................................................. 23
Reset............................................................................................................................. 26
Power Saving Mode and POF...................................................................................... 26
In System Programming (ISP) ..................................................................................... 27
In-Application Program ............................................................................................... 31
Note for Other SFR...................................................................................................... 32
Absolute Maximum Rating (MPC89E54A) ........................................................................ 33
DC Characteristics (MPC89E54A)...................................................................................... 33
Absolute Maximum Rating (MPC89L54A) ........................................................................ 34
DC Characteristics (MPC89L54A)...................................................................................... 34
Package Dimension.............................................................................................................. 35
Revision History .................................................................................................................. 38
This document contains information on a new product under development by Megawin. Megawin reserves the right to change or discontinue this
product without notice.
©
Megawin Technology Co., Ltd. 2008 All rights reserved.
2008/12 version A12
MEGAWIN
Features
80C51 Central Processing Unit
16KB on-chip program memory
ISP capability; optional 1KB/2KB/4KB ISP memory shared with
data flash
memory.
IAP capability; up to 47 K bytes programmable
data flash
available shared with ISP memory.
On-Chip 256 bytes scratch-pad RAM and 1024 bytes auxiliary RAM; Be capable of addressing up
to 64 K bytes external memory
MOVC-disabling, encrypting, and locking flash memory realize security mechanism.
Three 16-bits timer/counter, Timer2 is an up/down counter with programmable clock output on P1.0
Eight sources, four-level-priority interrupt capability
Enhanced UART, provides frame-error detection and hardware address-recognition
Dual DPTR for fast-accessing of data memory
15 bits Watch-Dog-Timer with 8-bit pre-scalar, one-time enabled
Power control: Idle mode and Power-Down mode; Power-Down can be woken-up by
P3.2/P3.3/P4.2/P4.3
Low EMI: inhibit ALE emission
Four 8-bits bi-directional ports; extra four-bit additional P4 are available for PLCC-44 and PQPF-44
On-Chip flash program/data memory:
-
The data endurance of the embedded flash gets over 20,000 times.
- Greater than 100 years data rentention under room temperature
Operating Voltage:
- 4.5V~5.5V for MPC89E54A
- 2.4V~3.6V for MPC89L54A, minimum 2.7V requirement in flash write operation (ISP/ICP/…...)
- Built-in Low-Voltage-Reset circuit.
Operating Temperature
- Industrial (-40°C to +85°C)*
Maximum Operating Frequency:
- Optional 12T or 6T mode
- Up to 48MHz@12T or 24MHz@6T, Industrial range
Three package types:
- PDIP 40: MPC89x54AE
- PLCC 44: MPC89x54AP
- PQFP 44: MPC89x54AF
*: Tested by sampling
2
MPC89x54A Data Sheet
MEGAWIN
General Description
PC89x54A is a single-chip 8-bit microcontroller with the instruction sets fully compatible with
industrial-standard 80C51 series microcontroller.
There is 16 Kbytes flash memory embedded for application program. A 47 Kbytes
data flash
is
shared by both In-System Programming code and In-Application-Programming code.
In-System-Programming and In-Application-Programming allow the users to download new code
or data while the microcontroller sits in the running state.
There are 1280 bytes on-chip RAM embedded that are provided to implement wide field
applications. The user can configure the device to run in 12 clocks per machine cycle, or 6 clocks
per machine cycle to achieve twice performance.
MPC89x54A is built with four 8-bit I/O ports, one 4-bit I/O ports, three 16-bit timer/counters, an
eight-source, four-priority-level interrupt structure, an enhanced UART, and on-chip crystal
oscillator. It was fabricated in advanced embedded flash CMOS technology.
Excellent flash-endurance, flash-retention, and code-protecting security make
MPC89x54A
as
an excellent microcontroller.
If the supply voltage of the device is lower than 3.7V/2.4V (Operate in the 5V/3V).The device can
automatically go to reset, and we have named the Low-Voltage-Reset
Order Information:
Part Number
Temperature
Range
MPC89x54AE
MPC89x54AP
MPC89x54AF
Industrial
Industrial
Industrial
PDIP-40
PLCC-44
PQFP-44
Tube
Tube
Tube
Package
Packing
Operation Voltage
x : (L/E)
L:3V / E:5V
L:3V / E:5V
L:3V / E:5V
MEGAWIN
MPC89x54A Data Sheet
3
Pin Description
Pin Definition
Pin Name
DIP-40
Pin Number
PLCC-44
PQFP-44
Type
Description
P0.0 (AD0)
P0.1 (AD1)
P0.2 (AD2)
P0.3 (AD3)
P0.4 (AD4)
P0.5 (AD5)
P0.6 (AD6)
P0.7 (AD7)
P1.0 (T2)
P1.1 (T2EX)
P1.2
P1.3
P1.4
P1.5
P1.6
P1.7
39
38
37
36
35
34
33
32
1
2
3
4
5
6
7
8
43
42
41
40
39
38
37
36
2
3
4
5
6
7
8
9
37
36
35
34
33
32
31
30
40
41
42
43
44
1
2
3
B
Port0 is an open-drain, bi-directional IO
port. When
1s
are written to Port0, they
become high-impedance inputs. Port0 is
also multiplexed with low-order address
or data bus during accesses to external
program and data memory.
BU General-purposed I/O with weak pull-up
resistance inside. When
1s
are written
into Port1, the strong output driving
PMOS only turn-on two clock periods
and then the weak pull-up resistance
keep the port high.
P1.0 is also used as one of event
sources for timer2, or output carrier of
timer2, alias T2.
P1.1
is
also
used
as
one
of
interrupt-controlling sources for time2,
alias T2EX.
P2.0 (A8)
P2.1 (A9)
P2.2 (A10)
P2.3 (A11)
P2.4 (A12)
P2.5 (A13)
P2.6 (A14)
P2.7 (A15)
P3.0 (RXD)
P3.1 (TXD)
P3.2 (INT0)
P3.3 (INT1)
P3.4 (T0)
4
21
22
23
24
25
26
27
28
10
11
12
13
14
24
25
26
27
28
29
30
31
11
13
14
15
16
18
19
20
21
22
23
24
25
5
7
8
9
10
BU Port2 is an 8-bit bi-directional I/O port
with pull-up resistance. Except being as
GPIO, Port2 emits the high-order
address byte during accessing to
external program and data memory.
BU General-purposed I/O with weak pull-up
resistance inside. When
1s
are written
into Port1, the strong output driving
PMOS only turn-on two clock periods
and then the weak pull-up resistance
MPC89x54A Data Sheet
MEGAWIN
P3.5 (T1)
P3.6 (/WR)
P3.7 (/RD)
15
16
17
17
18
19
11
12
13
keep the port high. Port3 also serves
other special functions of this device.
P3.0 and P3.1 act as receiver and
transceiver of the data for UART function
block,
Alias RXD and TXD.
P3.2 and P3.3 also act as external
interrupt sources, alias INT0 and INT1.
P3.4 and P3.5 also act as event sources
for timer0 and timer1 individually, alias
T0 and T1.
P3.6 also acts as write signal while
access to external memory, alias /WR.
P3.7 also acts as read signal while
access to external memory, alias /RD.
P4.0
P4.1
P4.2 (/INT3)
P4.3 (/INT2)
RESET
ALE
9
30
23
34
1
12
10
33
17
28
39
6
4
27
BU Port4 is extended I/O ports such like
Port1. It can be available only on
44L-PLCC and 44L-PQFP package.
IS
O
A high on this pin for at least two
machine cycles will reset the device.
Output pulse for latching the low byte of
address during accesses to external
memory.
/PSEN
/EA
29
31
32
35
26
29
O
I
The read strobe to external program
memory, low active.
EA must be kept at low to enable the
device to fetch program code from
external flash memory.
An internal pull-up resistance has been
embedded in this pin.
XTAL1
XTAL2
VDD
VSS
19
18
40
20
21
20
44
22
15
14
38
16
I
O
P
G
Input to the inverting oscillator amplifier.
Output from the inverting amplifier.
Power Supply
Ground
MEGAWIN
MPC89x54A Data Sheet
5