
Rev. 1.00
4� of ���
�an�a�� 1�� �01�
Standard 8051 8-Bit Flash MCU
HT85F2260/HT85F2270/HT85F2280
Flash Program Memory
Program Memory Protection
The flash program memory is partitioned into 2 memory blocks. One is the main memory block
and the other is the ID block. The ID block size is 256 bytes and is used to setup the protected
sectors. This memory protection function is used to protect the Program Memory from improper
Program, Erase or Read operations. The flash program memory is divided into several sectors
related to the memory size. Each sector has a capacity of 4K bytes. The memory protection
function is implemented by register control. If a value, with the exception of 0FFH, is written into
the corresponding control register, the corresponding sector program memory protection function
will be enabled. This program memory sector will then be unable to be programmed, erased or read
by corresponding instructions. In this way, the user can select which block of the flash memory is
to be protected.
Memory Protection Control Bytes
The protection of program code memory is categorised to two types: Security Type 1 and Security
Type 2.
■
Security Type 1
For the HT85F2280 device, the inhibit bytes SECURITY1[0:15] are located at the address
0x00~0x0F of the ID block page 0. If a value, with the exception of 0FFH, is written into these
bytes, the sectors corresponding to SECURITY1[0:15] cannot be programmed, erased or read by
the ICP. For the IAP program, when in the OCDS mode, any sector N with a security mechanism
can be protected from being programmed, erased or read by the OCDSINSTR instruction. But
when in the main program, all sector N with security or not, can be programmed, erased or read
by the IAP. For the MOVC instructions, any sector N with security mechanism cannot be read by
the ocdsinstr instruction when in the OCDS mode, but still can be read by MOVC instructions
when in the main program. Since these bytes can only be written once, to release the respective
sectors in the unprotected mode, the device must be erased.
The following table illustrates the protection status when in the OCDS/ICP/IAP/MOVC modes
when the SECURITY1[0:15] bytes are written with a value other than 0FFH:
SECURITY1[N]
N=0~15
Program
Erase
Read
Protect
Sector #
Remove
Protection
ICP
X
X
N/A
(1)
N
E�ase All
IAP
OCDS
(�)
X
(3)
X
X
(4)
N
E�ase All
Main P�og�am
O
(3)
O
O
N
E�ase All
M
O
V
C
OCDS
(�)
N/A
(�)
X
(4)
N
E�ase All
Main P�og�am
N/A
(�)
O
N
E�ase All
Note:
(1) “N/A” means no path to �ead ROM code.
(�) “N/A” means none of these f�nctions.
(3) “X” stands fo� inhibited; “O” stands fo� enabled.
(4) If a read operation is inhibited, reading the Flash will return a fixed Flash code of 00H.
(�) When in the OCDS mode� onl� the OCDSINSTR inst��ction has the sec��it� p�otection
mechanism.