PIC16F688- Unable to access full 256 bytes RAM

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
mjs7770
Flowcode v5 User
Posts: 15
Joined: Mon Apr 02, 2007 1:11 pm
Location: Australia
Contact:

PIC16F688- Unable to access full 256 bytes RAM

Post 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
Michael

Mark
Posts: 209
Joined: Thu Oct 19, 2006 11:46 am
Location: Bakewell, UK
Has thanked: 20 times
Been thanked: 16 times
Contact:

Post 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,
Go with the Flow.

User avatar
Steve
Matrix Staff
Posts: 3426
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Post 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.

mjs7770
Flowcode v5 User
Posts: 15
Joined: Mon Apr 02, 2007 1:11 pm
Location: Australia
Contact:

Post by mjs7770 »

Thanks Steve and Mark,

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

Best regards,

Michael
Michael

Post Reply