![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/4/44/44414c02-d064-4424-ae12-8acc58561d02/44414c02-d064-4424-ae12-8acc58561d02-bg6a.png)
iVIEW-100 Series user’s Manual, 2006, v2.0 ----- 106
7.9 RTC & NVSRAM
The RTC & NVSRAM are located on the same chip. There is a Li-battery to
backup the RTC & NVSRAM for 10 years. The features of RTC are given as
follows:
Year 2000 Compliance
BIOS support RTC time & date
MiniOS7 support RTC time & date
Seconds, minutes, hours, date of the month
Month, day of week, year, (Leap year valid up to 2079)
NVSRAM: 31 bytes
The NVSRAM can be read/write any number of times. The features of NVSRAM
are given as follows:
Data Valid: 10 years
Read/write cycles: without limit
Total 31 bytes
The user can use ReadNVRAM to read one byte data from NVRAM and use
WriteNVRAM to write one byte data to NVRAM. For writing data to NVRAM
address 0, the program is shown below.
int data=0x55,data2;
WriteNVRAM(0,data);
data2=ReadNVRAM(0); /* now data2=data=0x55 */
To write an integer (two bytes) to NVRAM, the program is shown below:
int data=0xAA55,data2;
char *dataptr=(char *)&data;
WriteNVRAM(0,*dataptr); /* write the low byte */
WriteNVRAM(1,*(dataptr+1) ); /* write the high byte */
dataptr=(char *)&data2;
*dataptr=ReadNVRAM(0); /* read the low byte */
*(dataptr+1)=ReadNVRAM(1); /* read the high byte */
/* now data2=0xAA55 */