![Hitachi H8/3152 Hardware Manual Download Page 91](http://html.mh-extra.com/html/hitachi/h8-3152/h8-3152_hardware-manual_140481091.webp)
88
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.
64 bytes
264 pages
1 byte
16 kbytes
+ 512 bytes
H'8000
H'C1FF
Page 0
Protect 0
.
.
.
.
.
.
Page 263
Protect 263
PBM
= 1
EEPROM
Data area
PBM
= 0
EEPROM
Protection area
Figure 8.12 Allocation of Protect Bits (H8/3153)