Serial EEPROM – 45
CHAPTER 9
SERIAL EEPROM
DESCRIPTION
Up to 1792 bytes (that is, 896 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. The software inter-
rupt used is INT 17 subfunction 0FEH (read) and INT 17
subfunction 0FFH (write).
READING THE SERIAL EEPROM
The following Borland C example reads word 2:
_AH = 0xfe;
/* read */
_BX = 2;
/* index for word in serial EEPROM (0-895)*/
_DX = 0xffff;
/* always set to FFFFH */
geninterrupt(0x17); /* do interrupt */
EEdata = _AX; /* serial EEPROM data returned in AX */
WRITING TO THE SERIAL EEPROM
The following Borland C example writes 1234H to word 2:
_AH = 0xff;
/* write */
_BX = 2;
/* index for word in serial EEPROM (0-895)*/
_CX = 0x1234; /* Data to write */
_DX = 0xffff;
/* always set to FFFFH */
geninterrupt(0x17); /* do interrupt */
NOTE: During programming of the EEPROM, the power LED
may momentarily flash.
StockCheck.com
Summary of Contents for 4010
Page 20: ...Overview 10 This page intentionally left blank S t o c k C h e c k c o m ...
Page 52: ...Watchdog Timer 42 This page intentionally left blank S t o c k C h e c k c o m ...
Page 56: ...Serial EEPROM 46 This page intentionally left blank S t o c k C h e c k c o m ...
Page 68: ...PC 104 58 This page intentionally left blank S t o c k C h e c k c o m ...
Page 76: ...Troubleshooting 66 This page intentionally left blank S t o c k C h e c k c o m ...