English
Language : 

W78E516B_06 Datasheet, PDF (19/37 Pages) Winbond – 8-BIT MICROCONTROLLER
W78E516B
Part 2: 4KB LDROM
Go
Procedure of Updating
the 64KB APROM
Timer Interrupt Service Routine:
Stop Timer & disable interrupt
PGM
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)
Setting erase operation mode:
MOV SFRCN,#22H
(Erase 64KB APROM)
Start Timer and enter IDLE
Mode.
(Erasing...)
End of erase
operation. CPU will
be wakened by Timer
interrupt.
Yes
End of Programming ?
No
Setting Timer and enable Timer
interrupt for wake-up .
(50us for program operation)
Get the parameters of new code
(Address and data bytes)
through I/O ports, UART or
other interfaces.
Yes
Is currently in the
F04KBOOT Mode ?
No
Software reset CPU and
re-boot from the 64KB
APROM.
MOV CHPENR,#87H
MOV CHPENR,#59H
MOV CHPCON,#83H
Setting control registers for
programming:
MOV SFRAH,#ADDRESS_H
MOV SFRAL,#ADDRESS_L
MOV SFRFD,#DATA
MOV SFRCN,#21H
Hardware Reset
to re-boot from
new 64 KB APROM.
(S/W reset is
invalid in F04KBOOT
Mode)
END
Executing new code
from address
00H in the 64KB APROM.
PGM
- 19 -
Publication Release Date: December 4, 2006
Revision A11