English
Language : 

UPD784938 Datasheet, PDF (670/733 Pages) NEC – 16-Bit Single-Chip Microcontrollers
CHAPTER 27 ROM CORRECTION
27.5 Conditions for Executing ROM Correction
In order to use the ROM correction function, it is necessary for the external environment and program to satisfy the
following conditions.
(1) External environment
Must be connected externally to an non-volatile memory, and be configured to read that data.
(2) Target program
The data setting instruction for CORC, CORAH and CORAL will be previously annotated in the target program (program
stored in the ROM).
The set-up data (the items written in lower-case in the set-up example below) must be read from the external non-volatile
memory, and the correct number of required correction pointers must be set.
Example of four pointer settings
MOV
CORC, #00H;
Specified channel 0
MOVW CORAL, #ch0 datal; Sets the channel 0 matching address
MOV
CORAH, #ch0 datah; Sets the channel 0 matching address
MOV
CORC, #01H;
Specified channel 1
MOVW CORAL, #ch1 datal; Sets the channel 1 matching address
MOV
CORAH, #ch1 datah; Sets the channel 1 matching address
MOV
CORC, #02H;
Specified channel 2
MOVW CORAL, #ch2 datal; Sets the channel 2 matching address
MOV
CORAH, #ch2 datah; Sets the channel 2 matching address
MOV
CORC, #chH;
Specified channel 3
MOV
CORAL, #ch3 datah; Sets the channel 3 matching address
MOV
CORAH, #ch3 datal; Sets the channel 3 matching address
MOV
CORC, #romcor en
; Sets 00H when correction is disabled
; Sets F0H when correction is operated
BR
$NORMAL
BR
! ! COR ADDR;
Specifies the address of the correction program
;
NOMAL instruction ; next instruction
(3) Setting the branch instruction in the CALLT table.
In the case of the above program, the header address for the BR!!COR_ADDR instruction is specified. (COR ADDR
indicates the address where the correction program is located.)
The reason for this being branched into the CALLT instruction and BR instruction is owing to the fact that only the base
area can be branched with CALLT. There is no necessity to branch into two levels when it is to be attached to the RAM
base area with the LOCATION instruction.
670
Preliminary User’s Manual U13987EJ1V0UM00