W78E58BF-24 Winbond, W78E58BF-24 Datasheet

no-image

W78E58BF-24

Manufacturer Part Number
W78E58BF-24
Description
8- BIT MICROCONTROLLER
Manufacturer
Winbond
Datasheet
1. GENERAL DESCRIPTION
The W78E58B is an 8-bit microcontroller which has an in-system programmable Flash EPROM for
firmware updating. The instruction set of the W78E58B is fully compatible with the standard 8052. The
W78E58B contains a 32K bytes of main ROM and a 4K bytes of auxiliary ROM which allows the
contents of the 32KB main ROM to be updated by the loader program located at the 4KB auxiliary
ROM; 512 bytes of on-chip RAM; 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 a eight
sources two-level interrupt capability. To facilitate programming and verification, the ROM inside the
W78E58B allows the program memory to be programmed and read electronically. Once the code is
confirmed, the user can protect the code for security.
The W78E58B 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.
2. FEATURES
Fully static design 8-bit CMOS microcontroller
32K bytes of in-system programmable Flash EPROM for Application Program (APROM)
4K bytes of auxiliary ROM for Loader Program (LDROM)
512 bytes of on-chip RAM (including 256 bytes of AUX-RAM, software selectable)
64K bytes program memory address space and 64K bytes data memory address space
Four 8-bit bi-directional ports
One 4-bit multipurpose programmable port
Three 16-bit timer/counters
One full duplex serial port
Eight-sources, two-level interrupt capability
Built-in power management
Code protection
Packaged in
DIP
PLCC 44: W78E58BP-24/40
QFP 44: W78E58BF-24/40
40: W78E58B-24/40
8-BIT MICROCONTROLLER
- 1 -
Publication Release Date: March 18, 2002
W78E58B
Revision A3

Related parts for W78E58BF-24

W78E58BF-24 Summary of contents

Page 1

... Four 8-bit bi-directional ports One 4-bit multipurpose programmable port Three 16-bit timer/counters One full duplex serial port Eight-sources, two-level interrupt capability Built-in power management Code protection Packaged in DIP 40: W78E58B-24/40 PLCC 44: W78E58BP-24/40 QFP 44: W78E58BF-24/40 8-BIT MICROCONTROLLER Publication Release Date: March 18, 2002 - 1 - W78E58B Revision A3 ...

Page 2

... PSEN 13 28 P2.7, A15 INT1, P3.3 14 T0, P3.4 27 P2.6, A14 15 T1, P3.5 P2.5, A13 P3.6 25 P2.4, A12 17 24 P2.3, A11 RD, P3 P2.2, A10 XTAL2 XTAL1 19 22 P2. VSS 21 P2.0, A8 44-Pin QFP (W78E58BF P0.4, AD4 38 P0.5, AD5 37 P0.6, AD6 36 P0.7, AD7 RXD, P3 INT2, P4.3 34 P4.1 TXD, P3.1 33 ALE INT0, P3.2 32 PSEN INT1, P3.3 31 P2.7, A15 T0, P3 ...

Page 3

PIN DESCRIPTION SYMBOL TYPE I EXTERNAL ACCESS ENABLE: This pin forces the processor to execute the EA external ROM. The ROM address and data will not be presented on the bus if the EA pin is high ...

Page 4

BLOCK DIAGRAM P1.0 Port 1 Port 1 Latch P1.7 Interrupt Timer 2 Timer 0 Timer 1 UART P3.0 Port 3 Port 3 Latch P3.7 Port 4 P4.0 Latch Port 4 P4.3 Oscillator XTAL1 6. FUNCTIONAL DESCRIPTION The W78E58B architecture ...

Page 5

AUX-RAM 0H FFH is addressed indirectly as the same way to access external data memory with the MOVX instruction. Address pointer are R0 and R1 of the selected register bank and DPTR register. An access to external data memory locations ...

Page 6

Power Management Idle Mode Setting the IDL bit in the PCON register enters the idle mode. In the idle mode, the internal clock to the processor is stopped. The peripherals and the interrupt logic continue to be clocked. The processor ...

Page 7

Continued A8 +IE 00000000 A0 +P2 11111111 98 +SCON SBUF 00000000 xxxxxxxx 90 +P1 11111111 88 +TCON TMOD 00000000 00000000 00000000 80 +P0 SP 11111111 00000111 00000000 Notes: 1.The SFRs marked with a plus sign(+) are both byte- and bit-addressable. ...

Page 8

XICON - external interrupt control (C0H) PX3 EX3 IE3 PX3: External interrupt 3 priority high if set EX3: External interrupt 3 enable if set IE3: If IT3 = 1, IE3 is set/cleared automatically by hardware when interrupt is detected/serviced IT3: ...

Page 9

P4CONB (C3H), continued BIT NAME 5, 4 P43CMP1 Chip-select signals address comparison: P43CMP0 00: Compare the full address (16 bits length) with the base address register P43AH, P43AL. 01: Compare the 15 high bits (A15 register P43AH, P43AL. 10: Compare ...

Page 10

Port 4 Base Address Registers P40AH, P40AL The Base address register for comparator of P4.0. P40AH contains the high-order byte of address, P40AL contains the low-order byte of address. P41AH, P41AL The Base address register for comparator of P4.1. P41AH ...

Page 11

P4 REGISTER P4.x READ WRITE ADDRESS BUS REGISTER P4xAL P4xAH REGISTER P4xCMP0 P4xCMP1 In-System Programming (ISP) Mode The W78E58B equips one 32K byte of main ROM bank for application program (called APROM) and one 4K byte of auxiliary ROM bank ...

Page 12

SFRAH, SFRAL: The objective address of on-chip ROM in the in-system programming mode. SFRAH contains the high-order byte of address, SFRAL contains the low-order byte of address. SFRFD: The programming data for on-chip ROM in programming mode. SFRCN: The control ...

Page 13

In-System Programming Control Register (CHPCON) CHPCON (BFH) BIT NAME 7 SWRESET When this bit is set to 1, and both FBOOTSL and FPROGEN are set will enforce microcontroller reset to initial condition just like power on reset. ...

Page 14

F04KBOOT Mode P4.3 P2.7 P2.6 MODE FO4KBOOT FO4KBOOT The Reset Timing For Entering P2.7 P2.6 RST F04KBOOT Mode Hi-Z Hi W78E58B ...

Page 15

The Algorithm of In-System Programming START Enter In-System No Programming Mode ? (conditions depend on user's application) Yes Setting control registers MOV CHPENR,#87H MOV CHPENR,#59H MOV CHPCON,#03H Setting Timer (about 1.5 us) and enable timer interrupt Start Timer and enter ...

Page 16

Go Timer Interrupt Service Routine: Stop Timer & disable interrupt Yes Is F04KBOOT Mode? (CHPCON.7=1) No Reset the CHPCON Register: MOV CHPENR,#87H MOV CHPENR,#59H MOV CHPCON,#03H Setting Timer and enable Timer interrupt for wake-up . (15 ms for erasing operation) ...

Page 17

SECURITY During the on-chip ROM programming mode, the ROM can be programmed and verified repeatedly. Until the code inside the ROM is confirmed OK, the code can be protected. The protection of ROM and those operations on it are ...

Page 18

Oscillator Control W78E58B/E516 allow user to diminish the gain of on-chip oscillator amplifier by using programmer to set the bit B7 of security register. Once B7 is set half of gain will be decreased. Care must be ...

Page 19

DC Characteristics, continued PARAMETER Input Low Voltage P0, P1, P2, P3, P4, EA Input Low Voltage RST Input Low Voltage [*4] XTAL1 Input High Voltage P0, P1, P2, P3, P4, EA Input High Voltage RST Input High Voltage [*4] XTAL1 ...

Page 20

AC CHARACTERISTICS The AC specifications are a function of the particular process used to manufacture the part, the ratings of the I/O buffers, the capacitive load, and the internal routing capacitance. Most of the specifications can be expressed in ...

Page 21

Data Read Cycle PARAMETER ALE Low to RD Low RD Low to Data Valid Data Hold from RD High Data Float from RD High RD Pulse Width Notes: 1. Data memory access time " ...

Page 22

TIMING WAVEFORMS Program Fetch Cycle S1 XTAL1 ALE PSEN PORT 2 T AAH PORT 0 Code Data Read Cycle S4 S5 XTAL1 ALE PSEN PORT 2 A0-A7 PORT ALW T ...

Page 23

Timing Waveforms, continued Data Write Cycle S4 XTAL1 ALE PSEN PORT 2 PORT 0 A0-A7 WR Port Access Cycle XTAL1 ALE T PORT INPUT SAMPLE A8-A15 DATA OUT T DAD T T DWR DAW ...

Page 24

TYPICAL APPLICATION CIRCUITS Expanded External Program Memory and Crystal XTAL1 XTAL2 CRYSTAL 8 RST C1 C2 INT0 12 13 INT1 P1.0 P1.1 2 P1.2 ...

Page 25

Typical Application Circuit, continued Expanded External Data Memory and Oscillator XTAL1 10 u OSCILLATOR 18 XTAL2 8 RST INT0 12 13 INT1 P1.0 2 P1.1 3 ...

Page 26

Package Dimensions, continued 44-pin PLCC Seating Plane 44-pin PQFP See Detail F Seating ...

Page 27

... APPLICATION NOTES In-system Programming Software Examples This application note illustrates the in-system programmability of the Winbond W78E58B ROM microcontroller. In this example, microcontroller will boot from 32KB APROM bank and waiting for a key to enter in-system programming mode for re-programming the contents of 32KB APROM. While entering in-system programming mode, microcontroller executes the loader program in 4KB LDROM bank ...

Page 28

MOV TCON, #00H MOV IP, #00H MOV IE, #82H MOV R6, #F0H MOV R7, #FFH MOV TL0, R6 MOV TH0, R7 MOV TMOD, #01H MOV TCON, #10H MOV PCON, #01H ;******************************************************************************** ;* Normal mode 32KB APROM program: depending user's application ...

Page 29

MAIN_4K: MOV SP, #C0H MOV CHPENR, #87H ; CHPENR = 87H, CHPCON WRITE ENABLE. MOV CHPENR, #59H ; CHPENR = 59H, CHPCON WRITE ENABLE. MOV A, CHPCON ANL A, #80H CJNE A, #80H, UPDATE_32K ; CHECK F04KBOOT MODE ? MOV ...

Page 30

INC SFRAL ; NEXT ADDRESS MOV A, SFRAL JNZ BLANK_CHECK_LOOP INC SFRAH MOV A, SFRAH CJNE A, #80H, BLANK_CHECK_LOOP ; END ADDRESS = 7FFFH JMP PROGRAM_32KROM BLANK_CHECK_ERROR: MOV P1, #F0H MOV P3, #F0H JMP $ ;******************************************************************************* ;* RE-PROGRAMMING 32KB APROM ...

Page 31

... FAX: 81-45-4781800 - 31 - W78E58B Winbond Electronics (Shanghai) Ltd. 27F, 2299 Yan An W. Rd. Shanghai, 200336 China TEL: 86-21-62365999 FAX: 86-21-62365998 Winbond Electronics (H.K.) Ltd. Unit 9-15, 22F, Millennium City, No. 378 Kwun Tong Rd., Kowloon, Hong Kong TEL: 852-27513100 FAX: 852-27552064 Publication Release Date: March 18, 2002 Revision A3 ...

Related keywords