Microcontrollers often contain EEPROM or app-writeable FLASH memory for saving persistent values which will remain stored after an off-on power cycle. However, these often suffer from small storage space and can be destroyed by only a few thousand erase/write cycles. The neoPLC RAM board solves both these problems by providing 256 kByte additional storage space that can be written to 4 million times before fatiguing. This board offers a low-cost alternative to SD Cards in a smaller package but with much less memory. The neoPLC RAM board is good for data-logging but does not have sufficient memory to store large files like pictures or video.
- 2 Mbit (256Kbyte) EEPROM
- Up to 1 MHz i2c
- 4M write cycles at room temperature
- 100 years data retention
RAM Quickstart Code
// ~~~ RAM ~~~ // include the neoPLC-RAM library #include <neoRAM.h> // create an instance of the RAM board neoRAM ram = neoRAM(); // --- SETUP --- // initialize the RAM EEPROM board. provide the library the size of your data structure // (see our example in Arduino for an example of creating an appropriate data structure) void ram.begin(uint32_t dataSize); // --- METHODS --- // Add a new entry to the log from the data in (buffer). returns 1 for success bool success = ram.addLog(char* buffer); // read the sample at number (sampleToRead) into the data structure at (destination). returns 1 for success bool success = ram.readLog(uint32_t sampleToRead, char* destination); // restart an log writes at the beginning of the EEPROM. void ram.restartLog(); // retrieve the current number of entries in the log uint16_t logSize = ram.logSize();