W78E516B-24 Winbond, W78E516B-24 Datasheet - Page 24
![no-image](/images/manufacturer_photos/0/7/712/winbond_sml.jpg)
W78E516B-24
Manufacturer Part Number
W78E516B-24
Description
8-BIT MICROCONTROLLER
Manufacturer
Winbond
Datasheet
1.W78E516B-24.pdf
(26 pages)
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
W78E516B-24
Manufacturer:
WINBOND
Quantity:
5 120
Company:
Part Number:
W78E516B-24
Manufacturer:
SAM
Quantity:
2 000
Part Number:
W78E516B-24
Manufacturer:
WINBOND/华邦
Quantity:
20 000
MAIN_4K:
ERASE_P_4K:
;*********************************************************************
;* BLANK CHECK
;*********************************************************************
BLANK_CHECK_LOOP:
UPDATE_64K:
SETB TR0
MOV PCON,#01H
MOV A,SFRFD
CJNE A,#FFH,BLANK_CHECK_ERROR
MOV CHPENR,#87H ; CHPENR = 87H, CHPCON WRITE ENABLE.
MOV R7,#FFH
MOV CHPENR,#59H ; CHPENR = 59H, CHPCON WRITE ENABLE.
ANL A,#80H
CJNE A,#80H,UPDATE_64K ; CHECK F04KBOOT MODE ?
MOV CHPCON,#03H ; CHPCON = 03H, ENABLE IN-SYSTEM PROGRAMMING.
MOV CHPENR,#00H ; DISABLE CHPCON WRITE ATTRIBUTE
MOV TCON,#00H
MOV IP,#00H
MOV IE,#82H
MOV R6,#FEH
MOV TL0,R6
MOV TH0,R7
MOV TCON,#10H
MOV PCON,#01H
MOV CHPENR,#00H ; DISABLE CHPCON WRITE-ATTRIBUTE
MOV TCON,#00H
MOV IP,#00H
MOV IE,#82H
MOV TMOD,#01H
MOV R6,#3CH
MOV R7,#B0H
MOV TL0,R6
MOV TH0,R7
MOV SFRCN,#22H
MOV TCON,#10H
MOV PCON,#01H
MOV SFRCN,#0H
MOV SFRAH,#0H
MOV SFRAL,#0H
MOV R7,#FFH
MOV TL0,R6
MOV TH0,R7
MOV A,CHPCON
MOV TMOD,#01H
MOV R6,#FBH
; TCON = 00H, TR = 0 TIMER0 STOP
; TMOD = 01H, SET TIMER0 A 16BIT TIMER
; IP = 00H
; IE = 82H, TIMER0 INTERRUPT ENABLED
; TCON = 10H, TR0 = 1, GO
; ENTER IDLE MODE
; TCON = 00H , TR = 0 TIM0 STOP
; IP = 00H
; IE = 82H, TIMER0 INTERRUPT ENABLED
; TMOD = 01H, MODE1
; SET WAKE-UP TIME FOR ERASE OPERATION, ABOUT 15 mS. DEPENDING
; ON USER'S SYSTEM CLOCK RATE.
; SFRCN(C7H) = 22H ERASE 64K
; TCON = 10H, TR0 = 1,GO
; ENTER IDLE MODE (FOR ERASE OPERATION)
; READ 64KB APROM MODE
; START ADDRESS = 0H
; SET TIMER FOR READ OPERATION, ABOUT 1.5 S.
; ENABLE TIMER 0
; ENTER IDLE MODE
; READ ONE BYTE
- 24 -
W78E516B