W78LE58P-24 Winbond, W78LE58P-24 Datasheet
W78LE58P-24
Available stocks
Related parts for W78LE58P-24
W78LE58P-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: W78LE58-24 PLCC 44: W78LE58P-24 QFP 44: W78LE58F-24 Preliminary W78LE58 8-BIT MICROCONTROLLER Publication Release Date: June 2000 - 1 - Revision A1 ...
Page 2
... PIN CONFIGURATIONS 40-Pin DIP (W78LE58) 44-Pin PLCC (W78LE58P P1.5 8 P1.6 9 P1.7 10 RST 11 RXD, P3.0 12 INT2, P4 ...
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 PROGRAM ...
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 FUNCTIONAL DESCRIPTION The W78LE58 architecture consists of ...
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 A1) of address bus with ...
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 In-System Programming (ISP) Mode The W78LE58 equips one 32K byte of main MTP-ROM bank for application program (called APROM) and one 4K byte of auxiliary MTP-ROM bank for loader program ...
Page 12
SFRAH, SFRAL: The objective address of on-chip MTP-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 MTP-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 Preliminary W78LE58 F04KBOOT Mode Hi-Z Hi ...
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 MTP-ROM programming mode, the MTP-ROM can be programmed and verified repeatedly. Until the code inside the MTP-ROM is confirmed OK, the code can be protected. The protection of MTP-ROM and those operations on it are described ...
Page 18
Oscillator Control W78LE58/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 XTAL1 [*3] Input High Voltage P0, P1, P2, P3, P4, EA Input High Voltage RST[*1] Input High Voltage XTAL1 [*3] Output Low Voltage P1, P2, P3, P4 Output Low Voltage P0, ALE, PSEN ...
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 terms ...
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 APL ...
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 CIRCUIT Expanded External Program Memory and Crystal XTAL2 CRYSTAL 8 INT1 W78LE58 CRYSTAL ...
Page 25
Expanded External Data Memory and Oscillator XTAL1 OSCILLATOR XTAL2 8 RST INT0 12 13 INT1 P1.0 2 P1.1 3 P1.2 4 P1.3 5 ...
Page 26
Package Dimensions, continued 44-pin PLCC Seating Plane 44-pin PQFP See Detail F Seating ...
Page 27
... Application Note: In-system Programming Software Examples This application note illustrates the in-system programmability of the Winbond W78LE58 MTP-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 IE,#82H MOV R6,#FEH 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 ;******************************************************************************** NORMAL_MODE EXAMPLE 2: ;***************************************************************************************************************************** ;* Example ...
Page 29
MAIN_4K: 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 CHPCON,#03H ; CHPCON = 03H, ENABLE IN-SYSTEM PROGRAMMING. MOV ...
Page 30
CJNE A,#FFH,BLANK_CHECK_ERROR 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 BANK ;******************************************************************************* PROGRAM_32KROM: MOV ...
Page 31
... Note: All data and specifications are subject to change withou t notice. Preliminary W78LE58 Winbond Electronics (H.K.) Ltd. Winbond Electronics (H.K.) Ltd. Winbond Electronics North America Corp. Winbond Electronics North America Corp. Unit 9 -15, 22F, Millennium City, Unit 9 -15, 22F, Millennium City, Winbond Memory Lab. ...