Before writing data to Flash Memory, the user must first call the
FlashWrite()
function, and check whether data can be written or not.
After calling the
EraseFlash()
function, data can be written to that
segment.
Refer to the demo programs in the
CD:\Napdos\7188XABC\7188XB\Demo\BC_TC\Memory folder for more
information.
4.8.2 Using RTC and NVRAM
The I-7188XB(D) module contains both an RTC and NVRAM, which are
located on the same chip, and an onboard Li battery that is used as
backup for at least 10 years. The features of the RTC are as follows:
BIOS support for RTC time and data
MiniOS7 supports RTC time and date
Seconds, minutes, hours, date of the month
Month, day of the week, year (Leap year valid up to 2079)
NVSRAM: 31 bytes
The NVRAM can be read/written any number of times. The features of
NVRAM are as follows:
Data Validity: 10 years
Read/write cycles: unlimited
Total
31
bytes
The
ReadNVRAM()
function can be used to read one byte of data from
the NVRAM and
WriteNVRAM()
function can be used to write one byte
of data to the NVRAM. The code to write data to NVRAM address 0 is
shown below.
int data=0x55, data2;
InitLib(); /* Initiate the 7188xb library */
WriteNVRAM(0, data);
data2= ReadNVRAM(0); /* now data2=data=0x55 */
I-7188XB Series User’s Manual(Ver.1.0, Apr/2007,
7MH-020-10
) ---
62
Содержание I-7188XB Series
Страница 88: ...I 7188XB Series User s Manual Ver 1 0 Apr 2007 7MH 020 10 88...
Страница 138: ...I 7188XB Series User s Manual Ver 1 0 Apr 2007 7MH 020 10 138...
Страница 144: ...Step 8 Make the project I 7188XB Series User s Manual Ver 1 0 Apr 2007 7MH 020 10 144...
Страница 151: ...Step 8 Rebuild the project I 7188XB Series User s Manual Ver 1 0 Apr 2007 7MH 020 10 151...