Rewrite - Hitachi H8/3152 Hardware Manual

Single-chip microcomputer h8/3150 series
Table of Contents

Advertisement

Notes:
When the WDT is disabled, EWE does not need to be set.
After an EEPMOV instruction, the CPU does not execute the next instruction until the writing or
erasing of EEPROM data has ended.
EEPROM data cannot be written or erased by instructions other than EEPMOV.
8.4.2

Rewrite

A single rewrite operation can modify contiguous bytes located in the same EEPROM page; 1 to
32 contiguous bytes in the H8/3152, 1 to 64 contiguous bytes in the H8/3153 and H8/3158, and 1
to 16 contiguous bytes in the H8/3155 and H8/3156 can be modified.
A rewrite operation is restricted to a single page. The byte counter (R4L) and EEPROM address
register (R6) must be set so that the operation does not cross a page boundary.
To perform a rewrite operation, clear both OC1 and OC0 to 0.
86
Store write data in RAM
Set parameters in CPU registers (R4L, R5, R6)
Set EWE in WDT to 1*
Execute EEPROM write/erase instruction (EEPMOV)
1. EWE does not need to be set when the WDT is disabled.
2. EPR does not need to be set when writing to or erasing
the data area of the EEPROM
Figure 8.9 EEPROM Write/Erase Sequence
START
1
2
Set EPR*
Set ECR
END

Advertisement

Table of Contents
loading

Table of Contents