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

  • \$\begingroup\$ To make it less frustrating, I recommend building a manual EEPROM programmer first. It's just a socket, some switches and a timing circuit. \$\endgroup\$
    – Janka
    Jul 23 '19 at 23:16
  • \$\begingroup\$ Sorry, didn't get your idea. I don't have EEPROM yet, so nothing to be programmed :) I was going to build the control logic on FPGA or on EEPROM. If I choose EEPROM then I'll have to build a programmer to be able to load microcode for my commands. But I'm not on that stage yet. \$\endgroup\$ Jul 23 '19 at 23:35

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

  • \$\begingroup\$ I recommend to use hex rotaty encoder switches instead of DIP switches. No one –not that most eager learner in the world— will ever bother to use DIP switches to enter more than three bytes. \$\endgroup\$
    – Janka
    Jul 23 '19 at 23:12
  • \$\begingroup\$ Thank you guys for you replies, really appreciate that. The main question now is more about the principle how to be able to tamper into the memory so that I can read/write it manually along as running my computer in normal mode. Once this problem solved dip switches could be replaced with something else. Also control unit is not build yet, so my intention was to play it's role by switching jumpers :) \$\endgroup\$ Jul 23 '19 at 23:26
  • \$\begingroup\$ hacktastical, could you please elaborate on this a little bit more "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." I don't have any control logic yet, so I don't have singly-cycle DMA command. \$\endgroup\$ Jul 23 '19 at 23:30
  • \$\begingroup\$ You have two clients using the memory: your CPU, and your toggle switches. You need to select which one has access to the memory. You have this shown as 'manual/auto'. I'm suggesting that instead you have 'run/stop' for the CPU, and for the switches you break into the memory and perform the read/write cycle by pausing the CPU momentarily while the switch read/write completes. It's bit more complex but it will allow you to manipulate the machine as it is running. I would also add single-step as a way of watching program flow. \$\endgroup\$ Jul 23 '19 at 23:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.