8.5
Write/Erase Protection
8.5.1
Protect Bits
EEPROM data can be protected from accidental writing and erasing. Each page can be protected
individually.
Each page has its own protect bits. Write/erase protection is conferred by writing a protection code
(H'78) to the protect bits.
Once a page is protected, the protection cannot be canceled.
The protect bits for a page have the same address as the first data byte in the page. The PBM bit in
EPR selects either the protection or data area. The protection area is selected when PBM = 0; the
data area is selected when PBM = 1.
Figure 8.12 shows how the protect bits are allocated to pages. Figure 8.13 shows an example of
write/erase protection.
H'8000
16 kbytes
+ 512 bytes
H'C1FF
88
64 bytes
Page 0
.
.
.
Page 263
PBM = 1
EEPROM
Data area
Figure 8.12 Allocation of Protect Bits (H8/3153)
1 byte
Protect 0
.
.
264 pages
.
Protect 263
PBM = 0
EEPROM
Protection area