Shop OBEX P1 Docs P2 Docs Learn Events
Very low cost ($4.00) 64KB SRAM Expansion with only 12 total pins required — Parallax Forums

Very low cost ($4.00) 64KB SRAM Expansion with only 12 total pins required

Alexis64Alexis64 Posts: 42
edited 2011-04-13 12:36 in Propeller 1
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) ..

64KBRAM.jpg
952 x 659 - 169K

Comments

  • Bill HenningBill Henning Posts: 6,445
    edited 2011-04-12 15:45
    Hi Alexis,

    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
    Alexis64 wrote: »
    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 SDRAMs will work with it) ..

    Attachment not found.
  • Alexis64Alexis64 Posts: 42
    edited 2011-04-12 16:32
    Hi Alexis,

    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...
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-04-12 16:51
    I think this circuit could fill a very useful niche. Everything about external memory is a compromise. More pins = more speed, but then less pins are free for other things. Once you allocate display, sd card, mouse, keyboard, serial, I2C, that leaves about 12 pins free.

    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.
  • Bill HenningBill Henning Posts: 6,445
    edited 2011-04-12 16:52
    Hi Alexis,

    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...
  • Alexis64Alexis64 Posts: 42
    edited 2011-04-12 17:29
    Hi Alexis,

    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' ...) ...
  • jazzedjazzed Posts: 11,803
    edited 2011-04-12 17:44
    The byte-wire SPI Flash solutions Rayman and I have been working on will provide a fast, low cost, 10 pin, 2MB solution. The Flash chips are effectively read-only, but that's good for code and some images. I suspect 2 Flash chips + a FAB will easily sell for under $20.

    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.
  • Alexis64Alexis64 Posts: 42
    edited 2011-04-12 22:36
    jazzed wrote: »
    ...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.
  • Alexis64Alexis64 Posts: 42
    edited 2011-04-12 22:43
    Thank you Dr_Acula for seeing the potential for a smaller RamBoard (it does not hurt to have alternatives)... Definitely using a 512 or 128 would be better and lower the chip count but when I was scouting around this morning I could not find a cheaper 128 or 512 so that is why I used the 32s or I would have used that solution ...
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-04-12 23:42
    I remember when we first started using external ram there were some comments (?heater) about "using those drawers of old memory chips". I certainly have a few 32k ones gathering dust. Some 8k ones as well. (might need to check the specs though, as I think they are 5V chips).

    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.
  • Heater.Heater. Posts: 21,230
    edited 2011-04-13 00:14
    Alexis64,

    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...
  • Alexis64Alexis64 Posts: 42
    edited 2011-04-13 00:27
    Dr_Acula wrote: »
    I remember when we first started using external ram there were some comments (?heater) about "using those drawers of old memory chips". I certainly have a few 32k ones gathering dust. Some 8k ones as well. (might need to check the specs though, as I think they are 5V chips).

    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 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 :) ...
  • Alexis64Alexis64 Posts: 42
    edited 2011-04-13 00:38
    Heater. wrote: »
    Alexis64,

    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...

    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) ...
  • Heater.Heater. Posts: 21,230
    edited 2011-04-13 00:59
    Alexis64,

    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....
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-04-13 02:46
    P.S. Since you're just about there with the Z80...

    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?
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2011-04-13 10:24
    This is one of my old thoughts, 32KB is a big chip. This was true back in the late 80's and early 90's but now it is just so much better to "waste" 87% of a 512KB to get one packace that runs fast on 3.3Volts.

    (Wow, just how that hurts to say)
  • Alexis64Alexis64 Posts: 42
    edited 2011-04-13 12:09
    Dr_Acula wrote: »
    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?

    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.
  • Alexis64Alexis64 Posts: 42
    edited 2011-04-13 12:15
    This is one of my old thoughts, 32KB is a big chip. This was true back in the late 80's and early 90's but now it is just so much better to "waste" 87% of a 512KB to get one packace that runs fast on 3.3Volts.

    (Wow, just how that hurts to say)

    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.
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2011-04-13 12:36
    Dont get me wrong, I do not have tubes of 32KB SRAMs, I have plastic drawers full!

    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.
Sign In or Register to comment.