# Looking for 4 bit memory option

I'm building a small and simple 4-bit CPU and I'm looking for an IC to store the program opcodes. I've considered using eeproms although they seem too large for my purpose, being in the kilobyte range. I was hoping that there was an easy to access memory that stored 8 bit numbers and could be addressed using 4 bit values, or 16 addressable 8 bit values. I would also prefer not to have to purchase an eeprom programmer so that memory could easily be programmed with a micro-controller.

What type of memory IC would be recommended for this purpose?

• What sort of implementation technology are you using for your CPU? Are we talking discrete transistors, SSI/MSI logic, CPLD? Jul 28 '14 at 19:41
• I am using TTL and CMOS integrated circuits for each part of my cpu Jul 28 '14 at 19:43
• digikey.com/product-search/… Jul 29 '14 at 0:52
• Also, why not use a much faster MCU to act as the memory instead? That way you can use either the MCU programmer or a bootloader to program it. Plus it'd be cheaper and easier to find. Jul 29 '14 at 0:57
• I'm making a collection of all known TTL computers at en.wikibooks.org/wiki/Microprocessor_Design/Wire_Wrap . I'd love to add your CPU to the list. Aug 29 '14 at 22:07

It seems that you want to build as much as possible yourself. So why not also build your own the ROM?

It is easily possible if you have just 2^4 data words. You can use two 74HC138 to decode the address and feed the outputs into a diode array.

Here is a schematic with just one 138 (but another one can be added for 8 more data words; it must be enabled by connecting A3 to the non-inverted enable input; another possibility would be to use a single 74HC4067 (16 channel analog MUX/DEMUX)).
A diode has to be placed at the appropriate crossing for each 0-bit. (If you have more 0-bits than 1-bits use a 74HC240 buffer instead of a 74HC244 and put a diode for each 1-bit).

• Yes, diode matrix ROM is a part of many early computers. Aug 29 '14 at 22:13

If you want nonvolatility and simple parallel output and input of address, an EEPROM would probably be the easiest for you.

An Atmel 28C64 is less than $4 in singles, still available through authorized distributors, requires only a single +5V supply, and holds 8K x 8 bits. Easily programmed with a microcontroller, comes in DIP-28 package if you want, and is reasonably fast. Just don't bother about the unused bytes. The obvious candidate is the 74LS189. 16 x 4 bits, LSTTL. Available for ~$3.00.

• Do you know why the 74LS189 has outputs that complement the content of the addressed memory location? What is the benefit? Jul 28 '14 at 20:09
• Haven't a clue. Not the faintest idea. Jul 28 '14 at 20:42
• The 74LS189 is a RAM. The OP obviously is looking for some kind of ROM (non-volatile).
– Curd
Aug 27 '14 at 22:06