Memory Design (Part 1 of 2)
The memory chip I'm using is from the '62' family of CMOS 256Kbit (32K x 8) Static RAM ... effectively meaning it can store 32,768 separate 8 bit values referenced by a 15bit address bus. Buying chips can be a bit of a 'needle in a haystack' when you're buying through one of the larger electronics suppliers (I use Mouser). Knowing the chip number isn't enough to actually buy one and doing a search on Mouser for '62256 memory' narrows it down to 61 matches. I can narrow it down further as I know I need through-hole mounting (not surface mount) and that gets me to 6 matches. Next choice is access speed ... 55ns or 70ns. This is actually a bit of a mute point for this computer as it'll get nowhere near that speed (the relays take around 5ms to switch) so lets ignore that one. So faced with 6 choices it comes down to price and what's in stock. In the end I went for a mid-priced chip from Cypress Semiconductor ... a CY62256NLL-70PXC for £2.77 ('cheap as chips' ... literally).
CY62256NLL-70PXC ... catchy name eh?! There's a data sheet for the chip here but effectively the code is telling you it's from Cypress Semiconductor [CY]; it's the 62 family of CMOS 32K SRAM chips (256Kbit) ; it's using a Nitride Seal Mask fix [N]; it's low power [LL]; access time is 70ns ; packaged in a 28-pin moulded DIP [PX]; and finally it's the commercial temperature grade [C] that's happiest between 0 and 70 degrees centigrade.
What's quite nice with these 62256 chips is that you can pair two of them up together sharing the same data and address bus and then use the most significant bit of the address bus to enable one chip and disable the other. With that set up you get the full 64K memory for your 16-bit address bus. As mentioned in my last post though I'm not going with that solution and I'm sticking with one 32K chip and using the remaining address space for 'future expansion'.
Right, so back to that 'complexity' (no, buying the right chip wasn't the 'complex' thing). CMOS chips have some interesting properties but the one to definitely watch out for is making sure that any inputs are connected to voltage or to ground - never left unconnected. This is because the inputs have very high impedance (resistance) which is good because it means they will not affect the part of the circuit where they are connected. However, it also means that unconnected inputs can easily pick up electrical noise and rapidly change between high and low states in an unpredictable way. This is likely to make the chip behave erratically and to prevent problems all unused inputs absolutely must be connected even if it's a part of the chip that's not being used (which can be tempting with chips that have multiple logic gates).
Why am I picking that out specifically then? Well, the computer operates by connecting and disconnecting power via relays which means that a line coming from a relay that's turned off is disconnected (not wired to ground). It's floating and for a CMOS chip that means erratic behaviour. To make this all work I'm going to have to do some clever relay work to ensure the memory chip is always connected to power or ground. Oh ... did I also mention the chip works on 5V not the 12V the rest of the computer uses? That means there'll be two levels of voltage running around the card and though the lines which'll all need careful planning. Anyhoo, let's make a start.
First things first let's get the memory chip on to the card and to power it I'll add a DC/DC convertor which will drop the 12V down to the 5V the chip needs:
decoupling capacitor and works best when placed as close to the chip as possible.
I can now start wiring the memory chip out and I'll start with a easy one ... the address bus:
Anyhoo, back to that data bus ... the memory chip can read from the data bus or write to it depending what you ask for. When we're doing a read operation we need to drive the main data bus of the computer which runs at 12V. We've only got 5V running on our 'local' data bus however so there's an extra bit of wizardry required:
data sheet here) to react to the 5V data bus and drive out 12V on the other side. This is quite a nicely laid out chip with each input having its corresponding output on the opposite side. There is, however, a bit of a quirk with this chip which means that a high value on the input creates a low value on the output and vice-verse ... effectively inverting the input. It's not really a quirk of course, just the way the design works, but that'll need wiring out on the other memory card.
Nearly there now. Let's start adding some control lines:
Finally, let's add the remaining control lines:
So that's it for this card. I'll continue the design in my next post where I'll need to take all of those board interconnects and handle the differences in voltage between this card and the rest of the computer and wire out those inverted data bus outputs.