Page 1 of 1

PIC16F688- Unable to access full 256 bytes RAM

Posted: Fri May 04, 2007 10:02 am
by mjs7770
Steve/Ben,

In Flowcode, I am using a PIC16F688. (256 bytes RAM, 256 bytes EEPROM).
I have a few variables and one array variable. When compiling the hex program the total RAM used is only about 50% of the 256 bytes.
I just cannot get it to access the full RAM.
I have had to reduce the array size right down.
Am I doing something wrong? Is there something I have to change/enter to access the full RAM?

Best regards,

Michael

Posted: Fri May 04, 2007 10:16 am
by Mark
Michael,

How much ram you can use of what there is depends upon the BoostC license you have. Check the dialog when you program the chip and I think somewhere it says what your allocation is.

Hope this helps,

Posted: Fri May 04, 2007 10:28 am
by Steve
BoostC has a limitation on the size of arrays (this is true for all licences).

This is from the BoostC manual:
Arrays can have any number of dimensions. The only constraint is that an array must fit into a single RAM bank.
RAM is organised into "banks" of 128 bytes, which explains this limitation. You might find that the maximum size of an array is 96 bytes or less due to the "special function registers" that reside in each bank of memory.

Posted: Fri May 04, 2007 10:47 am
by mjs7770
Thanks Steve and Mark,

I'll just create 2 arrays and move between them.

Best regards,

Michael