-
• #27
I have a question which may have already been answered, but this thread is already long and way over my head.
Could these chips be used instead of the microcontrollers internal memory to execute memory intensive code, to hopefully fix the out of memory issue while running a memory intensive script?
-
• #28
Take a look at the writeup here, which has been updated to new version of the AT24 modules:
http://www.espruino.com/run_code_from_eeprom
You can store code on the EEPROM, and then load it off the EEPROM and execute it immediately - so you still need the memory free to hold the function while it's running, but not any other time. That's what this does.
And you can of course write large blobs of data to the EEPROM, and then read it later when you need it - in this case, you're swapping stuff in and out of RAM.
You can't have it access the EEPROM like it can main memory - you'll always have to swap stuff in and out.
But these can help with it, by storing some function code on the EEPROM (in my projects, code is where much of my memory goes). It's probably significantly slower, making it best for code not frequently used.
-
• #29
Thank you for summing this subject up in layman's terms :-)
@DrAzzy, looked at the module and wondered why for each byte the address has to be written - have to say that I have not studied the EEPROM api>
It certainly shouldn't be writing the address for each byte, unless I screwed up...
Only difference between writing EEPROM and SRAM is that EEPROM is organized in pages, and after writing a page, you have to wait 10 ms before the chip will respond. The FRAM looks to be made to be a drop-in no software change necessary replacement for EEPROM.
There are 2mbit FRAM chips ;-) Only $15-20 a pop and non-stock @ digikey. No sea of tears - just red ink.