mpc89l58a Megawin Technology, mpc89l58a Datasheet

no-image

mpc89l58a

Manufacturer Part Number
mpc89l58a
Description
8-bit Micro-controller
Manufacturer
Megawin Technology
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
mpc89l58aP
Manufacturer:
MEGAWIN
Quantity:
20 000
Company:
Part Number:
mpc89l58aP
Quantity:
1 304
Features .................................................................................................................................. 2
General Description ............................................................................................................... 3
Order Information: ................................................................................................................. 3
Pin Description....................................................................................................................... 4
Block Diagram ....................................................................................................................... 6
Special Function Register ...................................................................................................... 8
Memory.................................................................................................................................. 9
Functional Description......................................................................................................... 13
Absolute Maximum Rating (MPC89E58A) ........................................................................ 33
DC Characteristics (MPC89E58A)...................................................................................... 33
Absolute Maximum Rating (MPC89L58A) ........................................................................ 34
DC Characteristics (MPC89L58A)...................................................................................... 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.
Pin Definition................................................................................................................. 4
Pin Configuration........................................................................................................... 6
Organization................................................................................................................... 9
Nonvolatile Registers:.................................................................................................. 10
RAM ............................................................................................................................ 11
Embedded Flash........................................................................................................... 12
TIMERS/COUNTERS................................................................................................. 13
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
TIMER0 (T0) AND TIMER1 (T1) ...................................................................... 15
TIMER2 ............................................................................................................... 16
8-bit micro-controller
MEGAWIN
MPC89x58A
2008/12 version A12

Related parts for mpc89l58a

mpc89l58a Summary of contents

Page 1

... In-Application Program ............................................................................................... 31 Note for Other SFR...................................................................................................... 32 Absolute Maximum Rating (MPC89E58A) ........................................................................ 33 DC Characteristics (MPC89E58A)...................................................................................... 33 Absolute Maximum Rating (MPC89L58A) ........................................................................ 34 DC Characteristics (MPC89L58A)...................................................................................... 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. © ...

Page 2

... 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 MPC89E58A - 2.4V~3.6V for MPC89L58A, minimum 2.7V requirement in flash write operation (ISP/ICP/…...) - Built-in Low-Voltage-Reset circuit. Operating Temperature - Industrial (-40°C to +85°C)* ...

Page 3

General Description MPC89x58A is a single-chip 8-bit microcontroller with the instruction sets fully compatible with industrial-standard 80C51 series microcontroller. There bytes flash memory embedded for application program bytes data flash is shared by both ...

Page 4

Pin Description Pin Definition Pin Number Pin Name DIP-40 PLCC-44 P0.0 (AD0 P0.1 (AD1 P0.2 (AD2 P0.3 (AD3 P0.4 (AD4 P0.5 (AD5 P0.6 (AD6 P0.7 (AD7) ...

Page 5

P3.5 (T1 P3.6 (/WR P3.7 (/RD P4.0 23 P4.1 34 P4.2 (/INT3) 1 P4.3 (/INT2) 12 RESET 9 10 ALE 30 33 /PSEN XTAL1 19 21 XTAL2 18 20 ...

Page 6

Pin Configuration 1 (T2) P1.0 40 (T2EX P1.7 33 RESET 9 32 (RXD) P3 (TXD) P3 (INT0) ...

Page 7

RAM ADDR Register B Register ACC TMP2 PSW PSEN Control ALE EA Unit RESET XTAL 1 XTAL 2 MC89X58A Block Diagram MEGAWIN P2.0 ~ P2.7 P0.0 ~ P0.7 Port2 Driver Port0 Driver Port2 Latch Port0 Latch RAM 256 Stack Pointer ...

Page 8

Special Function Register ACC WDTCR D8 D0 PSW C8 T2CON T2MOD C0 XICON B8 IP SADEN SADDR SCON SBUF TCON TMOD ...

Page 9

Memory Organization Address Space for MPC89x58A RAM Address Space for MPC89x58A embedded Flash memory Bit-7 Bit-6 Bit-5 ISPAS1 FZWDTCR MEGAWIN 00-7F RAM, Access it via direct addressing 80-FF SFR, Access it via direct addressing 80-FF indirect on-chip ...

Page 10

Nonvolatile Registers: There are two Nonvolatile Registers named OR0 and OR1 individually. They are designed to configure the MPC89x58A options. Generally these two nonvolatile registers will be written via a popular NVM writer, say Hi-Lo System All-11, Leaper-48 and Megawin-Provided ...

Page 11

NVM register: OR1 (Option Register 1): Bit-7 Bit-6 Bit-5 FZWDTCR FZWDTCR: Used to freeze the WDT-controlling register Configure the SFR WDTCR to be reset only via power-up action, not by software reset nor reset from the Watch Dog ...

Page 12

Embedded Flash There is totally 63 K bytes flash embedded in the MPC89x58A. The leading 32 K bytes flash memory is designed for storage of the user program, followed 31 K bytes flash memory is shared with nonvolatile data flash ...

Page 13

Functional Description TIMERS/COUNTERS MPC89x58A has three 16-bit timers, and they are named T0, T1 and T2. Each of them can also be used as a general event counter, which counts the transition from While T0/T1/T2 is used ...

Page 14

SFR: TCON Bit-7 Bit-6 Bit-5 TF1 TR1 TF0 TF1: = Timer1 overflow flag. Set by hardware on Timer/Counter overflow. Cleared by hardware when the processor vectors to the interrupt routine, or clearing the bit in software. TR1: = Timer1 run ...

Page 15

C/T2: Timer or counter select for timer and 1 is for external event counter. CP/RL2: Capture/Reload flag. When set, captures will occurs on a negative transition at T2EX if EXEN2=1. When cleared, auto-reloads will occur either with Timer2 ...

Page 16

OSC/ pin 1 (Sampled) C//T TRx GATE /INTx Mode 3 Timer1 in Mode3 simply holds its count, the effect is the same as setting TR1 = 1. Timer0 in Mode 3 enables TL0 and TH0 as ...

Page 17

Timer2 is also can be configured as a periodical signal generator. The MPC89x58A is able to generate a programmable clock output on P1.0. When T2OE bit is set and C//T2 bit is cleared, Timer2 overflow pulse will generate a 50% ...

Page 18

Auto-Reload Up-Only Mode (ARUO) In ARUO mode, Timer2 can be configured to count up with a software-defined value to be reloaded. When reset is applied to the DCEN =0 and CP/RL2=0, Timer2 is at ARUO mode. An overflow on Timer2 ...

Page 19

Baud-Rate Generator Mode (BRG) Timer2 can be configured to generate various baud-rate. Bit TCLK and/or RCLK in T2CON allow the serial port transmit and receive baud rates to be derived from either Timer1 or Timer2. When TCLK=0, Timer1 is used ...

Page 20

Interrupt There are eight interrupt sources available in MPC89x58A. Each interrupt source can be individually enabled or disabled by setting or clearing a bit in the SFR named IE. This register also contains a global disable bit (EA), which can ...

Page 21

In other words, interrupts or pending interrupts can be generated or canceled in software. The following content describes several SFR related to interrupt mechanism. SFR: IE (Interrupt Enabling): Bit-7 Bit-6 Bit-5 EA ET2 ...

Page 22

IP (or XICON) and IPH are combined to form 4-level priority interrupt as the following table. {IPH.x , IP. SFR: XICON (External Interrupt Control): Bit-7 Bit-6 Bit-5 PX3 EX3 IE3 PX3 : If set, Set priority ...

Page 23

SFR: WDTCR (Watchdog Timer Control): Bit-7 Bit-6 Bit ENW ENW: Enable WDT while it is set. ENW cannot be cleared by firmware enable watchdog timer does not use watchdog timer CLRW: Clear WDT to ...

Page 24

Mode2 An 11-bit data is serially transmitted through TXD or received through RXD. The frame data includes a start bit (0), 8 data bits, a programmable 9th bit and a stop bit (1). On transmit, the 9th data bit comes ...

Page 25

SM2: Enable the automatic address recognition feature in mode 2 and 3. If SM2=1, RI will not be set unless the received 9th data bit is 1, indicating an address, and the received byte is a Given or Broadcast address. ...

Page 26

In other words, not all data reception will respond to RI, while specific data does. By setting the SADDR and the SADEN, the user can filter out those data byte that doesn’t like to care. This feature brings great help ...

Page 27

POWER-DOWN mode The user can set the bit PCON.1 to drive this chip entering POWER-DOWN mode. In the POWER-DOWN mode, the on-chip oscillator is stopped. The contents of on-chip RAM and SFRs are maintained. The power-down mode can be ...

Page 28

Furthermore quite complex timing procedure to erase/program flash. Fortunately, the MPC89x58A carried with convenient mechanism to help the user read/change the flash content. Just filling the target address and data into several SFR, and triggering the built-in ...

Page 29

Bit-7 Bit-6 Bit-5 SCMD is the command port for triggering ISP activity. If SCMD is filled with sequential 46h, B9h and if ISPCR ISP activity will be triggered. When this register is read, the device ID of MPC89x58A ...

Page 30

IFMT ← xxxxx010 ISPCR ← 100xx010 IFADRH ← (Address high byte) IFADRL ← (Address low byte) IFD ← (byte date to be written into flash) SCMD ← 46h SCMD ← B9h (CPU progressing will be hold here) (CPU continues) IFMT ...

Page 31

SWBS 0, and trigger a software reset. After that, the system will be reset (not powered-up), and the system will refer to SWBS to startup from AP program entrance. For power-up procedure, the HWBS will ...

Page 32

Note for Other SFR SFR: AUXR Bit-7 Bit-6 Bit ERAM: Define if hide the expanded RAM access to the external RAM 0: = The internal auxiliary RAM access is enabled 1: =The internal auxiliary RAM ...

Page 33

Absolute Maximum Rating Parameter Ambient temperature under bias Storage temperature Voltage on any Port I/O Pin or RST with respect to Ground Voltage on VCC with respect to Ground Maximum total current through VCC and Ground Maximum output current sunk ...

Page 34

... TL I Operating current @20MHz CC I Idle mode current @ 20MHz IDLE I Power down current PD Rrst Internal pull-down resistance in RESET 34 (MPC89L58A) -55 ~ +125 - 150 -0.3 ~ VCC + 0.3 -0.3 ~ +4.2 (MPC89L58A) Test Condition MPC89x58A Data Sheet Rating Unit °C ° 500 Specification Min. Typ. Max. 0.8 Vcc=3.3V 1.5 Vcc=3.3V 2 ...

Page 35

Package Dimension 40-pin PDIP (MPC89x58AE) MEGAWIN MPC89x58A Data Sheet 35 ...

Page 36

PLCC (MPC89x58AP) 36 MPC89x58A Data Sheet MEGAWIN ...

Page 37

PQFP (MPC89x58AF) MEGAWIN MPC89x58A Data Sheet 37 ...

Page 38

Revision History Version Date Page A3 2004/10 A4 2004/11 P27 A5 2005/01 A6 2005/01 A7 2005/3/ 2005/6/14 P5 2006/08 P33, 34 A10 2007/03 P33 A11 2007/12 P2 P34, 35 A12 2008/12 38 Description - reorganized ...

Related keywords