Electronic – SRAM Chip. Entering the data either manually through DIP Swithces or from the bus

sram

I'm building a 8-bit "computer" on the breadboard mostly following tutorials from different sources. The project is educational, so I want to be able to execute all the steps manually and see what is happening through bunch of leds hooked up almost everywhere 🙂 Now I'm designing the SRAM module that could work in two modes

  • Controlled by the CPU control logic.
  • Controlled manually.

The second mode is required to be able to enter the data/commands into the SRAM through DIP switches. In this way I can program the "computer" I'm building, switch it then to auto mode and run the program.

I came up with the following schematics. The idea is to hook-up all the control pins through the multiplexer that either hooks up it to the control unit or to some preset signals, so that address/data go to the chip either from the bus or from dip switchers.
As a mux a can probaly use this thing SN74HC157.

So the questions are:

  • Do you think the design will work?
  • Is there any other way to make it simpler? 🙂

Thanks a lot.

enter image description here

Best Answer

In the early days of computing, this was quite common: computers had front panel switches to 'toggle in' the low-level instructions to get the system up and running, along with lights to display the memory contents. My exposure to this was on the Data General Eclipse minicomputer. Early hobbyist computers had this also (e.g., Altair 8800). So it's a total retro thing!

DG Eclipse

Altair 8800

Since you have just one address and one data, you can treat the DIP switch access as if it were a single-cycle DMA. And your manual/auto switch? Treat it as 'run/halt'. And, add 'reset' as well to get the machine to vector back to zero.

DIP switches are fiddly, hard to actuate and will wear out quickly. I suggest toggles.

Finally, since you have an FPGA at your disposal you could wire everything up to it, and implement the CPU of your choice inside. Depending on your mood you could play with 8080, 6502, 6800, 4004...