![background image](http://html1.mh-extra.com/html/icp-das-usa/i-8411/i-8411_user-manual_3619301102.webp)
I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 102
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
#include <stdio.h>
#include “8000E.h”
void main(void)
{
int data=0xAA55, data2;
char *dataptr=(char *)&data;
InitLib();
/* Initiate the 8000E library */
WriteNVRAM(0, *dataptr);
/* Write the low byte */
WriteNVRAM(1, *1);
/* Write the high byte */
dataptr=(char *) &data2;
*dataptr=ReadNVRAM(0);
/* Read the low byte */
(*1)=ReadNVRAM(1);
/* Read the high byte */
}