Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to extend Pic memory using external RAM?

Status
Not open for further replies.

dhakeparag81

Full Member level 2
Joined
Jun 6, 2012
Messages
131
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
INDIA
Activity points
2,406
I want interface RAM with pic18f87k22 for store data, more specifically i want declare variable in the address of external RAM. After reading bunch of forum i conclude that i have to interface RAM parallel, which is supported by this cpu and use extended mode.
(See attachment for clarification)
I am not able find specific documentation about it.

If you ave any document, link or sample code please attache.

I have found one pseudo code
Code:
 #pragma romdata EXT_RAM_SECTION
 rom int my_variable;
 #pragma romdata
 

 CODEPAGE   NAME=extram     START=0x100000       END=0x13FFFF    PROTECTED
 ...
 SECTION    NAME=EXT_RAM_SECTION       ROM=extram

can you plz explain.
 

Attachments

  • Atmega128_external_ram_data_heap.png
    Atmega128_external_ram_data_heap.png
    5 KB · Views: 99
Last edited:

Hi,

if you need a more simple hardware solution, then use SPI SRAM.

It´s easy to write the driver for reading/writing through SPI, if it not exists already.

Klaus
 

Thanks for reply,

If i used ram using spi i need to write it every time at the end of program, means when power is off ram data are not updated one.
I am trying to add ram using external memory bus connection and change linker file accordingly so that i can use variable which is at external ram address space but i can use it as normal internal variable.

I also power it up using external battery using some batt control ic but which is not important b'coz the circuit is already proven, to hold the data after power off.
Im not thinking about eeprom b'coz data will be write on every scan.

I have read the datasheet of87k22 8.0 external memory bus which make lot of sense but still not able to get how to do that i mean using variable of external ram address as if internal one.

You can suggest me to battery power the cpu but i thing external ram with battery backed is more convenient.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top