W78E516D/W78E058D Data Sheet
8-BIT MICROCONTROLLER
Table of Contents-
1
2
3
4
5
6
7
GENERAL DESCRIPTION ......................................................................................................... 4
FEATURES ................................................................................................................................. 5
PARTS INFORMATION LIST ..................................................................................................... 6
3.1
Lead Free (RoHS) Parts information list......................................................................... 6
PIN CONFIGURATIONS............................................................................................................. 7
PIN DESCRIPTIONS .................................................................................................................. 9
BLOCK DIAGRAM .................................................................................................................... 10
FUNCTIONAL DESCRIPTION.................................................................................................. 11
7.1
On-Chip Flash EPROM ................................................................................................ 11
7.2
I/O Ports........................................................................................................................ 11
7.3
Serial I/O ....................................................................................................................... 11
7.4
Timers ........................................................................................................................... 11
7.4.1
Clock ..............................................................................................................................12
7.5
7.6
7.7
Interrupts....................................................................................................................... 12
Data Pointers ................................................................................................................ 12
Architecture................................................................................................................... 12
7.7.1
7.7.2
7.7.3
7.7.4
7.7.5
7.7.6
7.7.7
ALU ................................................................................................................................12
Accumulator ...................................................................................................................12
B Register.......................................................................................................................12
Program Status Word .....................................................................................................12
Stack Pointer ..................................................................................................................13
Scratch-pad RAM ...........................................................................................................13
AUX-RAM.......................................................................................................................13
8
MEMORY ORGANIZATION...................................................................................................... 14
8.1
Program Memory (on-chip Flash) ................................................................................. 14
8.2
Scratch-pad RAM and Register Map ............................................................................ 14
8.2.1
8.2.2
8.2.3
8.2.4
Working Registers ..........................................................................................................16
Bit addressable Locations ..............................................................................................16
Stack ..............................................................................................................................16
AUX-RAM.......................................................................................................................16
9
10
11
12
13
SPECIAL FUNCTION REGISTERS ......................................................................................... 17
9.1
SFR Detail Bit Descriptions .......................................................................................... 19
INSTRUCTION.......................................................................................................................... 37
INSTRUCTION TIMING ............................................................................................................ 45
POWER MANAGEMENT.......................................................................................................... 46
12.1 Idle Mode ...................................................................................................................... 46
12.2 Power Down Mode ....................................................................................................... 46
RESET CONDITIONS............................................................................................................... 47
Publication Release Date: Feb 15, 2011
Revision A09
-1-
W78E516D/W78E058D Data Sheet
13.1
Sources of reset............................................................................................................ 47
13.1.1
13.1.2
13.1.3
13.1.4
External Reset ..............................................................................................................47
Watchdog Timer Reset.................................................................................................47
Software Reset .............................................................................................................47
RESET STATE .............................................................................................................47
14
13.2 Interrupt Sources .......................................................................................................... 48
13.3 Priority Level Structure ................................................................................................. 48
13.4 Interrupt Response Time .............................................................................................. 50
13.5 Interrupt Inputs.............................................................................................................. 50
PROGRAMMABLE TIMERS/COUNTERS ............................................................................... 52
14.1 Timer/Counters 0 & 1.................................................................................................... 52
14.2 Time-Base Selection..................................................................................................... 52
14.2.1
14.2.2
14.2.3
14.2.4
Mode 0 .........................................................................................................................52
Mode 1 .........................................................................................................................52
Mode 2 .........................................................................................................................53
Mode 3 .........................................................................................................................54
Capture Mode...............................................................................................................54
Auto-Reload Mode, Counting up ..................................................................................55
Baud Rate Generator Mode .........................................................................................56
14.3
Timer/Counter 2 ............................................................................................................ 54
14.3.1
14.3.2
14.3.3
15
16
17
18
19
20
21
WATCHDOG TIMER................................................................................................................. 57
SERIAL PORT .......................................................................................................................... 59
16.1 MODE 0 ........................................................................................................................ 59
16.2 MODE 1 ........................................................................................................................ 60
16.3 MODE 2 ........................................................................................................................ 61
F04KBOOT MODE (BOOT FROM 4K BYTES OF LDROM )................................................... 65
ISP(IN-SYSTEM PROGRAMMING) ......................................................................................... 67
CONFIG BITS ........................................................................................................................... 70
TYPICAL APPLICATION CIRCUITS ........................................................................................ 72
ELECTRICAL CHARACTERISTICS......................................................................................... 73
21.1 Absolute Maximum Ratings .......................................................................................... 73
21.2 D.C. ELECTRICAL CHARACTERISTICS .................................................................... 74
21.3 AC CHARACTERISTICS.............................................................................................. 75
21.4 TIMING waveforms....................................................................................................... 77
21.4.1
21.4.2
21.4.3
21.4.4
21.4.5
Program Fetch Cycle....................................................................................................77
Data Read Cycle ..........................................................................................................78
Data Write Cycle...........................................................................................................78
Port Access Cycle ........................................................................................................79
Reset Pin Access Cycle ...............................................................................................79
22
PACKAGE DIMENSIONS ......................................................................................................... 80
22.1 40-pin DIP ..................................................................................................................... 80
22.2 44-pin PLCC ................................................................................................................. 81
22.3 44-pin PQFP ................................................................................................................. 82
-2-
W78E516D/W78E058D Data Sheet
23
22.4 48-pin LQFP.................................................................................................................. 83
REVISION HISTORY ................................................................................................................ 89
-3-
Publication Release Date: Feb 15, 2011
Revision A09
W78E516D/W78E058D Data Sheet
1
GENERAL DESCRIPTION
The W78E516D/W78E058D series is an 8-bit microcontroller which has an in-system programmable
Flash EPROM for on-chip firmware updating.
The instruction sets of the W78E516D/W78E058D are fully compatible with the standard 8052. The
W78E516D/W78E058D series contains a 64K/32K bytes of main Flash EPROM and a 4K bytes of
auxiliary Flash EPROM which allows the contents of the 64K/32K bytes main Flash EPROM to be up-
dated by the loader program located in the 4K bytes Flash EPROM; a 256 bytes of SRAM; 256 bytes
of AUXRAM; four 8-bit bi-directional and bit-addressable I/O ports; an additional 4-bit port P4; three
16-bit timer/counters; a serial port. These peripherals are supported by an 8 sources 2-level interrupt
capability. To facilitate programming and verification, the Flash EPROM inside the
W78E516D/W78E058D series allows the program memory to be programmed and read electronically.
Once the code is confirmed, the user can protect the code for security.
The W78E516D/W78E058D series microcontroller has two power reduction modes, idle mode and
power-down mode, both of which are software selectable. The idle mode turns off the processor clock
but allows for continued peripheral operation. The power-down mode stops the crystal oscillator for
minimum power consumption. The external clock can be stopped at any time and in any state without
affecting the processor.
-4-
W78E516D/W78E058D Data Sheet
2
FEATURES
•
Fully static design 8-bit CMOS microcontroller
•
Optional 12T or 6T mode
12T Mode, 12 clocks per machine cycle operation (default), Speed up to 40 MHz/5V
6T Mode, 6 clocks per machine cycle operation set by the writer, Speed up to 20 MHz/5V
•
Wide supply voltage of 2.4 to 5.5V
•
Temperature grade is (-40
o
C~85
o
C)
•
64K/32K bytes of in-system programmable FLASH EPROM for Application Program (APROM)
•
4K bytes of auxiliary FLASH EPROM for Loader Program (LDROM)
•
Low standby current at full supply voltage
•
512 bytes of on-chip RAM. (include 256 bytes of AUX-RAM, software selectable)
•
64K bytes program memory address space and 64K bytes data memory address space
•
One 4-bit multipurpose programmable port, additional
INT2
/
INT3
•
Support Watch Dog Timer
•
Three 16-bit timer/counters
•
One full duplex serial port
•
8-sources, 2-level interrupt capability
•
Software Reset
•
Built-in power management with idle mode and power down mode
•
Code protection
•
Packages:
-
Lead Free (RoHS) DIP 40:
-
Lead Free (RoHS) PLCC 44:
-
Lead Free (RoHS) PQFP 44:
-
Lead Free (RoHS) LQFP 48:
-
Lead Free (RoHS) DIP 40:
-
Lead Free (RoHS) PLCC 44:
-
Lead Free (RoHS) PQFP 44:
-
Lead Free (RoHS) LQFP 48:
W78E516DDG
W78E516DPG
W78E516DFG
W78E516DLG
W78E058DDG
W78E058DPG
W78E058DFG
W78E058DLG
-5-
Publication Release Date: Feb 15, 2011
Revision A09