CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Adding RAM to PIC16F877

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
DonWare



Joined: 18 Jan 2006
Posts: 43

View user's profile Send private message

Adding RAM to PIC16F877
PostPosted: Wed Jun 07, 2006 3:33 pm     Reply with quote

I realize this might be a better Microchip question but I thought I'd get a better response here.

I'm developing CCS C code for a PIC16F877 and the compiler says I'm using about 89% of available RAM.

Do I need a different processor or is there a way to add external RAM to the chip? All info I seen only talks about adding ROM.

Thanks, Don
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

PostPosted: Wed Jun 07, 2006 4:11 pm     Reply with quote

See point 3
http://www.ccsinfo.com/faq.php?page=16bit_pointers
Ttelmah
Guest







PostPosted: Thu Jun 08, 2006 2:31 am     Reply with quote

There are a number of parts to this. The first (as has already been posted), is to make sure that you are actually using all the RAM available.
Beyond this, there is no really 'easy' way to add RAM, since the processor architecture will involve any external memory having to be accessed in a far slower and more complex form. There is no direct access to the memory busses for the internal RAM, even on chips that allow access to external ROM. Hence the 'best' answer, is to use a chip with more RAM.
However, that having been said, _provided_ you have a reasonable amount of ROM left (since the extra functions are going to use a lot of this...), it is possible to add external memory of various types (a 'good' form, is FRAM, which has the advantage of relatively fast reads, and writes, and in the serial forms, needs few pins to the processor), and then to treat this as if it is RAM, for the purposes of variable storage. The 'trick' to this, is the 'typemod' function:
If you search on here, or on the CCS homepage, there is a manual page giving an example of how to do this for an EEPROM
This allows you to provide the functions to read/write an external memory, and then to treat this memory, more or less like the internal RAM.

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group