Chapter 15: Serial EEPROM
Description
A 1024-word serial EEPROM is available to the user. The serial EEPROM does not
require battery backup to maintain the data when the system power is off. The
serial EEPROM is easily accessible via software interrupts by most programming
languages.
Enhanced INT 17h function definitions
The serial EEPROM definitions include the following functions: Read a single word
from serial EEPROM, Write a single word to serial EEPROM, Read multiple words
from serial EEPROM, Write multiple words to serial EEPROM, and Return serial
EEPROM size.
Serial EEPROM
Read a single word from the serial EEPROM
Function:
Subfunction:
Purpose:
Calling registers:
Return registers:
Comments:
Programming example:
/* Read word 2*/
unsigned int seeData;
/* Inline assembly code for Borland C++ 3.1*/
asm {
84
fch
00h
To read a single word from the on–board serial
EEPROM.
AH
AL
BX
DX
Carry flag cleared if successful
AX
Carry flag set if error
AL
Error code
ffh
01h
02h
03h
This function reads a word from the user area of
the serial EEPROM.
mov ax,0fc00h
mov bx,02h /* Read word 2*/
mov dx,0ffffh
int 17h
mov seeData,ax/* store data in c environment */
fch
00h
Word address (zero based)
ffffh (User area relative address)
9876h (Absolute address)
Word read
Error code
Meaning
Unknown error
Function not implemented
Defective serial EEPROM
Illegal access