21.5 Application Example
(1) System Structure
MCU
F2MC16-LX
SIN
(2) EPROM memory map
address:content
0000H:number of bytes of the corrected program No. 0 (0 implies no ROM correction)
0001H:bit 7-0 program address No. 0
0002H:bit 15-8 program address No. 0
0003H:bit 24-16 program address No. 0
0004H:number of bytes of the corrected program No. 0 (0 implies no ROM correction)
0005H:bit 7-0 program address No. 1
0006H:bit 15-8 program address No. 1
0007H:bit 24-16 program address No. 1
0010H~: corrected program No. 0/1 body
(3) Initial Condition
EPROM all at ' 0'.
(4) When ROM Correction is Needed
Send the body of the corrected program and the program address to the MCU through the connector
(UART). MCU will write that information into the EEPROM.
(5) Reset Sequence
After resetting, the MCU reads the content of the EEPROM. If the byte number of the corrected program is
not ' 0', the body of the corrected program will be read from the EEPROM and written in the RAM. Then
the MCU sets the correction address either on PADR0 or on PADR1 and sets the compare enable bit.
First address of the corrected program can be written in the user-defined location of the RAM if a relocat-
able correction program is desired. In this case INT9 service routine looks for this user-defined location to
jump to the corrected program.
MB90580 Series
EPROM
pull up resistor
Figure 21.5a System Structure Example
21.5 Application Example
connector (UART)
Chapter 21: ROM Correction Module
295