LOCKEEPROM        Locks or unlocks the EEPROM write protection

Syntax                        

LOCKEEPROM value16

LOCK/unlock EEPROM

 

Operandsvalue16: integer value between 0 and 3

PlaceTMLOnline

Binary code

DescriptionLocks or unlocks the EEPROM write protection. When the EEPROM is write-protected, it is not possible to write data into the EEPROM, with the exception of the TML command SAVE. Value16 may have the following values:

0 – Disables EEPROM write protection

1 – Enables write protection for the last quarter of the EEPROM

2 – Enables write protection for the last half of the EEPROM

3 – Enables write protection for the entire EEPROM

Example

//An EEPROM has 8Kwords. In the TML program space occupies the

//address range: 4000-5FFFh.

LOCKEEPROM 0; // disable EEPROM write protection

LOCKEEPROM 1; // protect the address range: 5800-5FFFh,

LOCKEEPROM 2; // protect the address range: 5000-5FFFh

LOCKEEPROM 3; // protect the entire address range: 4000-5FFFh