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 FPGA version of PIC

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



Joined: 24 Apr 2006
Posts: 5

View user's profile Send private message

Adding RAM to FPGA version of PIC
PostPosted: Thu Jun 08, 2006 12:30 pm     Reply with quote

I have a FPGA PIC. It looks a lot like a 16F84A. Except it has more memory. It can address up to 512 address locations. Looking at CHIP
EDIT it allows only expansion of ROM Size. I would like to expand
the RAM size also. It I look at the Device file I modified I can see
the number of RAM locations is 68 in the comments.

Can I just over type here 512 instead of 68 and will the compiler
accomodate the extra memory.

Thank You,
Gary Olson
golson



Joined: 24 Apr 2006
Posts: 5

View user's profile Send private message

Self Reply
PostPosted: Thu Jun 08, 2006 2:51 pm     Reply with quote

I now see that you can add more memory up to 512 with chip editor.
Just have to replace 00 locations with FF to allow the compiler the opportunity to use these locations.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jun 08, 2006 3:43 pm     Reply with quote

1. Look in Section 7.0 on the Instruction Set in the 16F84A data sheet.
For instructions that access file registers, the address field is
only 7 bits wide, so the maximum RAM address is 0x7F.
This is only 128 RAM addresses, including the SFR registers

2. Look in Section 2.2 on Data Memory Organization. It Figure 2-2,
it shows that RAM accesses in Bank 1 are mapped into Bank 0.
In other words, there is no separate Bank 1 RAM available.


So at most, you may be able to increase the maximum RAM address
in Bank 0 to allow 116 bytes of RAM instead of 68. (with 12 SFR regs).
Guest








PostPosted: Thu Jun 08, 2006 6:54 pm     Reply with quote

Very interesting. Is this FPGA PIC from Opercores? I´m interested. What FPGA are you using?
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