View previous topic :: View next topic |
Author |
Message |
golson
Joined: 24 Apr 2006 Posts: 5
|
Adding RAM to FPGA version of PIC |
Posted: Thu Jun 08, 2006 12:30 pm |
|
|
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
|
Self Reply |
Posted: Thu Jun 08, 2006 2:51 pm |
|
|
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
|
|
Posted: Thu Jun 08, 2006 3:43 pm |
|
|
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
|
|
Posted: Thu Jun 08, 2006 6:54 pm |
|
|
Very interesting. Is this FPGA PIC from Opercores? I�m interested. What FPGA are you using? |
|
|
|