Chapter 15: Serial EEPROM
Description
Up to 1024 words of user-definable data can be saved in the serial EEPROM. 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: fch
Subfunction: 00h
Purpose:
To read a single word from the on–board serial
EEPROM.
Calling registers:
AH
fch
AL
00h
BX
Word address (zero based)
DX
ffffh (User area relative address)
Return registers:
Carry flag cleared if successful
AX
Word
read
Carry flag set if error
AL
Error
code
Error code
Meaning
ffh
Unknown
error
01h
Function not implemented
02h
Defective serial EEPROM
03h
Illegal
access
Comments:
This function reads a word from the user area of
the serial EEPROM.
Programming example:
/* Read word 2*/
unsigned int seeData;
/* Inline assembly code for Borland C++ 3.1*/
asm {
mov
ax,0fc00h
mov
bx,02h /* Read word 2*/
mov
dx,0ffffh
int
17h
mov
seeData,ax/* store data in c environment */
82
Содержание XE-800
Страница 18: ...Figure 2 1 XE 800 SBC component diagram top 18 ...
Страница 19: ...Figure 2 2 XE 800 SBC component diagram bottom 19 ...
Страница 20: ...Figure 2 3 XE 800 SBC dimensions 20 ...
Страница 89: ...MOV AX 0fb0bh MOV DX 0ffffh INT 17h MOV aData AL if aData 1 printf U1 jumper is ON n 89 ...