![background image](http://html1.mh-extra.com/html/icp-das-usa/i-7188xb-series/i-7188xb-series_user-manual_3585678063.webp)
To write an integer (two bytes) to the NVRAM, use the code shown
below.
int data=0xAA55, data2;
char *daraptr=(char *)&data;
InitLib(); /* Initiate the 7188xb library */
WriteNVRAM(0, *dataptr); /* write the low byte */
WriteNVRAM(1, *1); /* write the high byte */
dadaptr=(char *)&data2;
*dataptr=ReadNVRAM(0); /* read the low byte */
(*1)=ReadNVRAM(1); /* read the high byte */
/* now data2=data=0xAA55 */
Refer to the demo programs in the
CD:\Napdos\7188XABC\7188XB\Demo\BC_TC\Memory folder for more
information.
4.8.3 Using EEPROM
The EEPROM is designed to store data that is not changed frequently,
such as:
Module ID, configuration settings
COM port configuration settings
Small
databases
The erase/write cycle of the EEPROM is limited to1,000,000 erase/write
cycles, so it should not be changed frequently when testing. The
EEPROM can be erased/written in a single byte, so it is very useful in
real world applications.
The I-7188XB(D) has 2K bytes of EEPROM memory, containing 8
blocks and each block contains 256 bytes, giving a total of 2048 bytes of
EEPROM memory. Normally, the EEPROM is in protected mode by
default, meaning that no data can be written to the EEPROM. The
EE_WriteEnable()
function must be called to unprotect it before writing
I-7188XB Series User’s Manual(Ver.1.0, Apr/2007,
7MH-020-10
) ---
63
Summary of Contents for I-7188XB Series
Page 88: ...I 7188XB Series User s Manual Ver 1 0 Apr 2007 7MH 020 10 88...
Page 138: ...I 7188XB Series User s Manual Ver 1 0 Apr 2007 7MH 020 10 138...
Page 144: ...Step 8 Make the project I 7188XB Series User s Manual Ver 1 0 Apr 2007 7MH 020 10 144...
Page 151: ...Step 8 Rebuild the project I 7188XB Series User s Manual Ver 1 0 Apr 2007 7MH 020 10 151...