Reading/Writing parallel SRAM

I have one of these parallel SRAM chips:

I've never interfaced to a chip like this before so looking for some pseudocode/examples of how to set up reads and writes to this from a uP.

I'd like to use the uP just to perform "bank switching" the most significant bits of the address lines; the LSBs indexing into blocks of say 64 1 byte cells will be addressed by a binary counter (it's doing a DDS-kind of thing.)

The uP will need to set up the control and address lines to write data into any arbitrary cell accessible within the address space available with the 4 bit LSB counter paused in whatever state it's in, and change the "banks" for readout similarly, but readout will be driven by external clock/counter and into other stuff, not back onto the uP's bus for reading by that particular uP.

I know i2c and SPI SRAMs are available and so forth, humor me please. :-)

Reply to
bitrex
Loading thread data ...

6 bit counter, rather. Or whatever it happens to be.
Reply to
bitrex

Den mandag den 26. februar 2018 kl. 22.43.59 UTC+1 skrev bitrex:

since you want some of the address to be fixed for banking and want to drive the lower address bits from two different places you pretty much have to bit bang it and have a way to disable the drive on external counter for cpu writes

Reply to
Lasse Langwadt Christensen

Sure, I can pretty easily synchronize freezing the counter drive on CPU writes. There are four different write enable/chip enable/output enable pins and I'm just unclear from the datasheet truth table/timing diagram the sequence of assertions I need to bit bang to the chip to write data in, and set it up the be read out on the address lines being incremented.

Reply to
bitrex

if you don't need low power standby just assert CE# and CE2 permanently and ignore them,

ass long as #OE is assert data is driven with the data in ram @address

de-assert #OE, assert #WR, set address, set data, de-assert #WR to write

freezing the counter is not enough you need tristate, you can't have both the cpu and counter driving the address lines at the same time

Reply to
Lasse Langwadt Christensen

It works! Thanks!

Reply to
bitrex

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.