User`s manual

72
EEPROM Control
The cpuModule is equipped with an EEPROM, or "Electrically Erasable and Programmable Read
Only Memory". This part is primarily used to store the configuration from the Setup program. You
can also use this part for non-volatile storage of a small amount of data. Its contents are retained even
with system power off and no backup battery connected.
The EEPROM consists of 1024 bits organized as 64 words of sixteen bits each. Thirty-two words
are used by the BIOS to store Setup information. The remaining 32 words are available to your ap-
plications. You may access these memory locations using functions of software interrupt 52H, which
are listed below.
NOTE!
The EEPROM will wear out after a large number of write cycles. You
should not use the EEPROM to hold data which is updated frequently.
To prevent unintended changes to the Setup stored in the EEPROM,
we recommend you always access the EEPROM using the interrupt
functions listed below
Function 0 EEPROM write/erase enable. It is active until the next disable
command and allows the device to be written and erased.
INPUTS: AH = 0
RETURNS: AH = error code
Function 1 EEPROM write/erase disable. This instruction must always be the
last operation performed, to prevent undesired EEPROM access.
INPUTS: AH = 1
RETURNS: AH = error code
Function 2 EEPROM read. Reads from the device address specified in AL the
number of words specified in CX, then stores the read values into
the buffer addressed by ES:DI
INPUTS: AH = 2
AL = address (0-3FH accepted)
CX = number of words to read
ES:DI = pointer to the buffer where the read values are stored
RETURNS: AH = error code; if AH<>0, then AL = number of locations read
Function 3 EEPROM write. Writes at the device address specified in AL, for
the number of words specified in CX, the values pointed by DS:SI.
Does not allow write operations at locations 0 to 1FH, which are
reserved.