![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
DonWare
Joined: 18 Jan 2006 Posts: 43
|
Adding RAM to PIC16F877 |
Posted: Wed Jun 07, 2006 3:33 pm |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Thu Jun 08, 2006 2:31 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
|
|
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
|