Interfacing external SRAM

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hello everybody!

I am working on a project bout digital audio processing based on a dspic from microchip, but I have a little problem with RAM memory as of the dspics 8kb onboard ram present.
So i was considering on using a NVSRAM i had around.
its a 8bit 2megabyte chip, with 70ns access time.

I was hoping to hear any advice on what would be the FASTEST and simpliest way of interfacing such a memory to a dspic (or any 16bit dsp/uc)

One of my limitations is that i only have 512 assembler instruction cycles to process every 2 (L/R) samples.
I program in C, so that way, that cycle number decreases of course.

What do people usually use for this kind of stuff ?
Is it good to simply use the dsp's ports to write data and address the ram? or maybe some external circuitry could speed up the process of writing and retrieving data from the ram?

Should i consider using inline assembler to speedup ?


thats pretty much it


thanks in advance
 
Let' s see...
2 MB = 21 Address lines, 8 bit data...
If you have 29 I/O lines free to use on your DSPic, you can address directly the RAM and read/write the data (very fast), otherwise you will have to latch/multiplex the address and data lines, loosing some machine cycles.
Some more data about your chips would be useful...
And yes, some inline assembler could be necessary, as in all time-critical applications.

Cheers,

Bruno
 
Ok :) thank you

I do have enough free pins on the dsp, being the chip tqfp 80, dsPIC30F6014 , with several 16bit parallel ports. I will do it this way then, direct addressing and writing

lets see


setup address - 1 or 2 instructions
write a byte - 1 instruction
toggle write - 1 instruction

so i'd need 4 cycles to write 1 byte
16 instructions for writing 2 16bit words
say top 20 instructions for either writing or reading
i think i can live with that :)

thanks for clarifying my mind
 
Hey, thanx for all the replies !

Second RAM sounds nice :) didnt think of it that way hehe
i actually happen to have a couple of BQ4015 here, which is a 512kbyte 8bit NVSRAM, one with 70ns access time, the other with 85ns. 19 address lines, 8 bit data bus, and Write Enable, Chip Enable and Output Enable pins.
I'd need 19 shared address lines, 8 bits for one ram, 8 bit for another, and 1 write enable.. 36 pins

I could position the data on a single 16bit port.

For address I would need another whole 16bit port , plus 3 more pins from some other port. Now this makes me wonder how would i implement fast 19bit addressing on a 16bit processor?
or maybe there is some alternative way of doing this?

With 24.576MIPS, i have a 40.6ns instruction period. The ram, 1 chip is 70ns the other 85ns.
so then i guess i would need a couple or 3 "nop"'s after every action to get an acceptable settle down time for both chips.

I am russian but living in Mexico for 15years now :)
Bout the project... its my own design, pure work at home :) no school. Maybe if lucky sometime something could be sold, but yet a lot of stuff to do :)
First thing will be an audio digital dynamic range compressor which will be my repay to a friend of mine who sponsored me with cash for an oscilloscope :)
... actually the system will allow other audio fx/processing.

I am looking forward to using another dsp processor, the Analog Devices Shark. Seems a very promising chip, running at 200mhz allowing 1200MFLOPs, with 24 digital audio data channels :)
got couple of these for free as samples, but i have yet to attempt solder a 144TQFP with .5mm pitch by hand .. another thing is how i am going to get the firmware into it, need to look for some diy programmer or design one myself, because i cant afford getting development boards for every thing i do ... so this will be next project hehe

think thats it

Good luck!
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.