Very low cost ($4.00) 64KB SRAM Expansion with only 12 total pins required
Alexis64
Posts: 42
I was bored today (waiting for Mouser to deliver some parts) so I decided to draw up this 64K SRAM expansion. I wanted to have something that uses the least amount of possible pins while maintaining parallel writing and some decent speed. This expansion could be used for a C64 or other early 80 emulator or simply to have some storage and a decent screen/buffering ...
Anyway here it is if anyone wants to take some ideas from it (any 32Kx8 SRAMs will work with it) ..
Anyway here it is if anyone wants to take some ideas from it (any 32Kx8 SRAMs will work with it) ..
Comments
That would certainly work for any 32Kx8 SRAM (but not SDRAM's), however unless buying in very large quantities, I really doubt that the PCB+parts could be had for $4
Take a look at Dr_Acula's Dracblade, he does something very similar with a 512Kx8 SRAM
I meant SRAM (that was a typo).. Of course SDRAM needs CAS/RAS ... Everyone knows that ...
Re the cost, that is the cost of all the parts. PCB is whatever deal you can get.
In any case, the purpose of my post was to share a design not to challenge you or anyone else ... I guess I just learned a quick lesson ...
NVM...
The 512k dracblade sram uses 3 latches, of which one tends not to change very often.
This circuit is going to be faster than the 512k latch solution, but sometimes you won't need 512k.
Indeed, with the speed of some of the SD driver code (eg Kye's), there may be coding solutions that work better with a bit less ram, and with more re-loading of data from the SD card.
So I think Alexis64's circuit will be a very useful addition to the 'external memory' group of circuits.
I wonder about another solution using one 512k chip and the same 373 support chip and only access 64k of the sram? I know the temptation is to always use all the available ram, but that would get the chip count down by one. Cost would be similar - $3.25 for the 512k sram and I suspect the total cost for chips would still be around the $4 mark.
I am glad you shared - I was not feeling challenged.
I just wanted to clarify it, so people would not expect you to produce and sell it for $4...
I never said I was going to sell it... I just posted a schematic for others to pick ideas from (you know, as in 'free' ...) ...
The 10 pin byte-wide SPI 256KB SRAM solutions will cost more than the Flash, but will be fast enough to be useful.
While these SPI solutions are a little slower to get started, the data can be read/written once every HUB window. The only way to beat that right now (with one COG) is with Ding-Batty's SDRAM driver on the GadgetGangster SDRAM board. In the very near future, even the SDRAM solutions will have a low pin count
BTW, the outputs of those 74HC04's should not be tied to ground especially with the inputs tied to ground .... There are better ways to generate heat.
Oops. Thanks.
Also what I have been finding is that sometimes you don't need heaps of memory (but you do need more than the propeller's internal memory). I'd like to think we have a library of solutions for a range of requirements for memory. This 64k solution fits in neatly between a 512k and the internal 32k.
Are you thinking of building this?
If so, it would be helpful to have a cog driver for it. I suspect it would be very similar to existing drivers.
I really like this circuit. For our Z80 emulations 64K is often quite enough. It only uses 12 pins.
And as Dr_A correctly recalls I have tubes of 32K*8 DIP RAMs gathering dust waiting to be used for such a thing. I always thought they were an appropriate match for a DIP Prop running CP/M.
But it has a couple of issues that make it impossible for me:
1) That 74ABT16373 is not available locally (Helsinki) getting one is going to be a pain and expensive. So for me it's better to use two 8 bit DIP latches.
2) The 74ABT16373 is only available in SSOP or TSSOP as far as I can tell which makes it a lot harder to throw together than traditional DIPs.
Still you may have inspired me to pull those RAMs out of store...
I wasn't planning of making this board on its own but the design will be used in ProLab (a new developer's platform that my company will launch in June). ProLab is an open-source product which will support both prop1 (and prop2). The prop1 support is neat as it has a variable clocked multiple propeller card in it (you can change the clock speed of each propeller by software from 25Mhz to 113Mhz etc ... Most of the software comes from contributors (some from obex) so we basically just came up with a simple hardware design that allows people to build projects quickly and keep expanding without losing their initial investment. It has removable workspace etc (it allows you to swap carrier boards so you don't have to destroy one project to start another one) ... I'll let you know more as we get closer...
oh and yes, we'll need lots of drivers for it as it has lots of cool peripherals on it (basically a real portable lab)... maybe I can send you a freebie in exchange for some pasm drivers for it ...
Excellent! That was the goal - to inspire ...
P.S. Since you're just about there with the Z80, do you think you could have a ZX81 emulator with that 64K expansion? (I have some code if you need it) ...
My ZiCog Z80 emulation is 95% correct for emulation of documented instructions. Fortunately the uncompleted op codes are never used by 99% of software that runs under CP/M so it achieved what I wanted to do.
Meanwhile PullMoll on this forum turned out three or four attempts at full Z80 emulation which I believe ended up with this amazing version http://forums.parallax.com/showthread.php?121579-qZ80-the-third-shot
In there you will find Spectrum and Colour Genie emulation. There is a NASCOM emulation built with it. Perhaps others.
All of which somewhat removed the motivation to perfect ZiCog but I hope one day I'll get round to finishing up those missing ops....
http://www.smarthome.jigsy.com/propeller and scroll down a bit there is a screenshot of Pacman and Frogger which is some of Pullmoll's Z80 emulation in action.
You have 4 chips. You might be able to do this with 2 - use a single ram chip (anything 64k or above), your latch chip, then you don't need an inverter for the A15 line, and also you don't need inverters for /WR and /RD as that can be done in software?
(Wow, just how that hurts to say)
Yes 2 is duable with a bigger ram - reason i invert RD/WR is because I had spare inverters (I needed one for A15 and i felt guilty wasting 5 inverters) ... but using a bigger ram chip is better in the long run (cheaper) ... Thank you.
Agree - better to waste some space for sake of simplicity, size and cost -- What DR_Acula and yourself pointed out is definitely a better approach for new designs unless you happen to have tubes of 32K SRAMs lying around like Heater ... I'll definitely will take that into consideration for one of the cards in ProLab. Thank you very much for the constructive feedback. Truly appreciated.
Every time I see one on an old board it gets harvested, I can't get out of equating it to the value of that amount of RAM from a 1970's point of view. So that 32KB chip would be about £300 (probably £2000 at present rates).
Therapy never helps.