I-7188XA Series User’s Manual ( Ver1.2, Feb/2014, 7MH-019-10 ) ---
66
To write an integer (two bytes) to the NVRAM, use the code shown
below.
Refer to the demo programs in the
CD:\Napdos\7188XABC\7188XA\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-7188XA(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
any data.
int data=0xAA55, data2;
char *daraptr=(char *)&data;
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 */
Содержание I-7188XA
Страница 62: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 62 5 6 COM1 RS 232 1 2 232...
Страница 90: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 90 1 2...
Страница 140: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 140...
Страница 146: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 146 Step 8 Make the project...
Страница 153: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 153 Step 8 Rebuild the project...
Страница 158: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 158...
Страница 161: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 161 Below snap shots are steps for install TC 3 0...
Страница 162: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 162...
Страница 164: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 164...