I've been noticing some odd behavior when trying to use an array of 1024 (or more) bytes. arrays or data structures initialized after the large array return incorrect values, specifically values from the end of the large array.
I'm declaring and initializing the array like this:
byte myArray[1024] = {0xFF, 0xFF, ...etc };
is there some buffer I'm overrunning? is there a better way to initialize the array (ie with a delay, or in two parts)?
Hi,
Yes, the RAM on an arduino is limited to 1K (at present).
However, if the data in the array is read-only (that is, you initialize it but don't change it), then you can use some of the program space to store the data. This is called progmem. Since the program space is 8k (for the 168 chip), you have a lot more room to mess around with.
Look here:
Grr. I can understand why the compiler can't tell exactly how much ram is used, but you'd think it would be able to come up with some warning message if the ram used by a single source module exceeded what was on the chip...
There may very well be an option for it, but I don't know what it is. If anyone feels like digging through the gcc / g++ man pages, I'd be grateful. It's certainly something that would be nice to provide better errors for.
Well, I was excited for a minute. Check that DS1200 data sheet again - 1024 bits, which is only 128 bytes.
Ramtron has an FRAM, nonvolatile and they claim more than 109 write cycles. I think the sizes are up to 256k bytes? SPI interface. Could be useful, but I haven't had a prject that required it yet.
There's a company that has a datasheet for a product that's an SPI interfaced SRAM. I say they have a datasheet and not an actual product, because I can't find anyone to sell them to me other than a distributor who sells in 10k quantities with an unknown ship date.