====== framWrite ====== ''void framWrite(u16 fadr, u8 fData)'' |fAdr : Address in FRAM to write data | |fData: Data to write | The MOACON has 32KB of FRAM (Ferroelectric Random Access Memory) memory. It is non-volatile so it retains data even without power.Retaining memory between power cycles has traditionally been implemented using EEPROMs or battery backup. Battery backup uses a battery to maintain memory in internal SRAM. However, the battery must be monitored to ensure it has a charge and is replaced periodically, which places a maintenance burden on the operators. EEPROMs incur a few milliseconds of latency when writing and are limited in the number of write-erase cycles.FRAM can retain data for about 10 years without the need for a battery backup, has a lower writing latency,and has a greater maximum number of write-erase cycles. Writes fData to FRAM address fAdr. Addresses 0 through 0x7EFF are available for use. The last 256 bytes, addresses 0x7F00 through 0x7FFF, are reserved for the system and should not be used. #include "moacon500.h" #include void cmain(void) { char text[STRING_LEN]; const char* const comfile = "Comfile Technology"; const u8 STRING_LEN = 19; //"Comfile Technology" plus '\0' terminator u8 i = 0; for(i=0; i< STRING_LEN; i++) //Clear text one character at a time { text[i] = '\0'; } for(i=0; i [[MOACON:index#System_Library:|Go to MOACON Home]]