/* Eeprom-w: 1. Writting a value to EEPROM. 2. The value will auto-plus 1 when it's writted to next address. Compiler: BC++ 3.1, Turbo C ++ 1.01(3.01) (free from http://community.borland.com/museum) Compile mode: Large Project: Eeprom-w.c ..\..\lib\7188el.lib Hordware: 7188E Detail description: Following list is where the user should avoid to write to For 7188XA/B/C ==> block 7 For 7188E(Xserver) ==> block 0, 7 For 7188E-MTCP ==> block 0,1,2,3,7 For 8x1x ==> block 7 For 8x3x (Xserver) ==> block 0,7 For 8000E-MTCP ==> block 0,1,2,3,7 [05/Dec/2006] by Liam [July,13,2011] by Nicholas */ #include #include #include #include #include #include "..\..\lib\7188e.h" void main(void) { int i,j,addr=0,block,data; Print("Warning:The block of 0 address is used by system\n"); Print("\r\nPlease insert a value writting to 1 block of EEPROM only:"); Scanf("%d", &data); EE_WriteEnable(); while(addr<256) { WriteEEP(1, addr, data); Print("\rWritting the value %d to address %d of EEPROM\n", data, addr); addr=addr++, data=data++; } EE_WriteProtect(); }