![](http://datasheet.mmic.net.cn/290000/HMS77C2000_datasheet_16134699/HMS77C2000_53.png)
HMS77C2000/2001
50
Nov. 2002 Ver 1.1
13.4 CODE PROTECTION
The program code written into the EPROM can be protect-
ed by writing to the CP bit of the configuration word. In the
HMS77C2000 and HMS77C2001, it is still possible to
program and read locations 000
H
through 03F
H
, after code
protection. Once code protection is enabled, all code pro-
tected locations read 555
H
and prevented from further pro-
gramming. All unprotected segments, including the
internal oscillator calibration value, ID, and configuration
word read as normal. These locations can be programmed.
13.4.1 Embedding Configuration Word and ID
information in the Hex File
To allow portability of code, the programmer is required to
read the configuration word and ID locations from the hex
file when loading the hex file. If configuration word infor-
mation was not present in the hex file then a simple warn-
ing message may be issued. Similarly, while saving a hex
file, configuration word and ID information must be in-
cluded. An option to not include this information may be
provided.
FIGURE 13-3 CONFIGURATION WORD FOR HMS77C2000/1
bit11
bit0
4
3
2
1
PORLS
: Power on reset level selection bit
1 = 1.7v(Typ.)
0 = Data retention voltage 0.6v(Typ.)
RESETE
: RESET pin enable bit.
1 = RESET pin enabled
0 = RESET tied to
V
DD
(internally).
CP
: Code protection bit.
1 = Code protection off
0 = Code protection on
WDTE
: Watchdog timer enable bit
1 = WDT enabled
0 = WDT disabled
FOSC1~FOSC0
: Oscillator selection bits
11 = ERC - external RC oscillator
10 = IRC - internal RC oscillator
01 = XT oscillator
00 = LF oscillator
Address
: FFF
H
CP
WDTE FOSC1 FOSC0
-
Unimplemented, read as ‘0’
Configuration Word
RESETE
PORLS
5
Program Memory Segment
R/W in Protected Mode
R/W in Unprotected Mode
Configuration Word (FFF
H
)
R/W Enable
R/W Enable
00
H
~ 3F
H
R/W Enable
R/W Enable
40
H
~ 1FE
H
Read Disable (555
H
), Write Disable
R/W Enable
1FF
H
Oscillator Calibration Value
R/W Enable
R/W Enable
ID Location (200
H
~ 203
H
)
R/W Enable
R/W Enable
TABLE 13-2 CODE PROTECTION(HMS77C2000)