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 support@ccsinfo.com

External RAM

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



Joined: 20 Feb 2007
Posts: 48
Location: Essex UK

View user's profile Send private message Send e-mail Visit poster's website

External RAM
PostPosted: Thu Dec 27, 2007 5:44 am     Reply with quote

Hi,

Is there a way of adding external RAM to a PIC that appears as an extension to the internal RAM to the PIC and compiler.

Effectively, so the PIC appears to have a larger RAM.

Regards,

Horkesley
_________________
Horkesley Electronics Limited
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Thu Dec 27, 2007 9:19 am     Reply with quote

Check the manual for the custom qualifier Addressmod, this is the replacement for the Typemod qualifier of the v3 compiler. With this qualifier you can define a memory range in a 24-bit wide memory space and specify the read and write functions to be used. You can add a mixture of external memory types (ROM, RAM, EEPROM, FRAM, etc) and depending on the address the compiler will automatically call your defined read and write functions. Variables in these external memories are accessed like normal variables, i.e. no special C syntax is required.

For an example see the manual chapter 'Non-RAM Data Definitions', page 41.

The addressmod qualifier is new and not many people have used it yet so you might stumble upon some 'unspecified' behaviour...

Note that the typemod qualifier had the limitation of a 24-bit address and 16-bit range, most likely this also applies to the addressmod qualifier. See also http://www.ccsinfo.com/forum/viewtopic.php?t=26157.
guest345
Guest







PostPosted: Sun Oct 11, 2009 5:13 am     Reply with quote

Addressmod or type mod are not working properly with arrays at version 4.093.

I'm creating a char array on fram, and I'm trying to change one element of this array but compiler changing 2 bytes from array. Only 16 bit variables writing normal. 32 or 8 bit array variables are sux. Reading working good for all. And any 8bit variables or 16bits are working good. But arrays are problematic.
bkamen



Joined: 07 Jan 2004
Posts: 1611
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Sun Oct 11, 2009 4:19 pm     Reply with quote

I've been trying to use addressmod and found it to be quirky.

And I'm just using it to assign blocks of ram so I can place stuff where I want it in memory.

Otherwise, there isn't a way to add RAM and make it look like normal PIC RAM without something like addressmod and have it be "transparent" to the compiler.

Cheers,

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
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