SRAM vs flash ram C3
Rsadeika
Posts: 3,837
I dug out my C3 board, and I guess I need a good explanation as it pertains to SRAM, and flash ram. First off, is the main difference, volatile vs non-volatile? My thinking is that I would use SRAM, within the program, to temporarily store data, and the flash ram to permanently store a program or data. In other words, instead of the EEPROM, you would use the flash ram, although you could not boot a program from the flash ram. So, do I have the concepts correct?
Does anybody have some example programs, written for the C3, other than the standard C3 stuff, that show off the uses of the two rams?
Thanks
Ray
Does anybody have some example programs, written for the C3, other than the standard C3 stuff, that show off the uses of the two rams?
Thanks
Ray
Comments
Hi Ray,
Yes, you've got it about right. There are probably some good Spin examples (others will undoubtedly chime in about those) but ... yes, you guessed it! ... Catalina is also a good choice.
On the C3, Catalina can use the Flash for program space, the SRAM for data space, and the Hub Ram for stack space. You can load quite large programs, but unfortunately with only 1Mb of Flash you can't quite fit some of the very large Catalina programs.
Also, the Catalyst program loader lets you simply load programs into Flash from the command line as if it were plain old read/write memory.
Catalina also provides a utility (Flash_Boot) that you can program into the EEPROM to automatically execute any program stored in Flash on startup.
Ross.