Saving Ram bytes in C16 microcontrollers

Status
Not open for further replies.

Briez

Member level 5
Joined
Nov 30, 2012
Messages
83
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,288
Visit site
Activity points
1,835
i am using PIC16f676 Microcontroller for programming and its datasheet shows me that it has only 64 bytes ram for use.

While i declare an array of byte 100 in size, it shows me an error that couldn't find space to allocate that variable as the ram memory becomes full.

What should i do to save ram memory and can declare 100 byte array variable?
 

Post your code, using either CODE or SYNTAX tags, along with a detailed description of the required task.

Specifically, what is the purpose of the 100 byte array.


BigDog
 

.... it has only 64 bytes ram for use.

While i declare an array of byte 100 in size, it shows me an error ...

You need to select a uC which has >> 100 bytes of RAM.

...What should i do to save ram memory ..

for that (as BIGDOGURU says) we need more info on what you're doing.
 

What should i do to save ram memory and can declare 100 byte array variable?

The short answer is, you can't ( have more than 64byte.) You need to select a microcontroller with more RAM, or declare a shorter array. I suppose you need more variables than the one array, so the array need to be smaller still.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…