2
\$\begingroup\$

Awhile back I built a version of Ben Eaters 8 bit computer, on my build, I changed only AND, NOT, and OR gates to all NAND. Otherwise the design was exact. I tested it before touching it and found that it does still work. I've made a modification to the RAM by adding an Arduino nano and 2 595 shift registers so that I can program the computer at the push of a button. That all works. The program is successfully loaded into RAM from the Arduino. However the computer itself seems to have an issue now as the same code that worked before, will not work. I have noticed 2 problems:

  1. The program counter, despite being disabled (shown by the multimeter below) will still count on occasion when it shouldn't. However it is consistent, on my test program it will about 90% of the time count on the first clock cycle(which it should not), then again on the 2nd clock cycle, which it should and does.
  2. The output 7 segment displays will output a random number from time to time, seemingly to be just before it switches to a different number, however not every time. The random number also does not show up anywhere else, whether on the bus, in the memory, or any of the registers.

The problem I am focused on here is the counter, but I am unsure if the two problems might stem from a common issue.

The counter IC is a 74ls161

What I have tried:

  1. The most obvious being checking if the chip is enabled at the correct time to check if its a control logic issue. Based on the multimeter it is only being enable when it should be.
  2. The chip is not being loaded, the only time it should ever get loaded is when jump instruction occurs of which there are none in my test program, this is double checked with a multimeter as well.
  3. Trying to fix any loose wires and shorts, if there is one causing it, I havn't found it yet
  4. I have removed the counter from the computer and tested it on its own, and seems to work just fine
  5. I have tried switching out an EEPROM I thought to be iffy, as it would seem to "turn off" to the touch, however I believe this to have been some sort of short, as it doesn't have that issue now. However I cant be 100% sure that was the case.
  6. Lastly I have looked in the assembly test code for any patterns, but the issues happen a couple times during the test run and not one instruction is used more than once. But it typically happens during the very first microcode instruction, which is consistent for every assembly instruction (Outputting the counter to the bus and the memory address register receiving it).

I will check back frequently and try and be as active as I can on here around work, let me know if you need any more information!

Description of photos, since I don't see the captions showing up

  1. Step 0, the computer has the program uploaded and was just reset(minus the RAM of course) **Notice the CE (count enable) control LED (bottom right) is not lit up (its hard to tell from photo, but it isn't), meaning it should not count on the next clock. Confirmed by multimeter
  2. The Counter (top right, green LEDs, counted, despite being disabled. It is NOW enabled both confirmed by the CE light and multimeter)
  3. Again the counter was incremented, this time it should have, but now we will miss a whole memory address

Step 0, the computer has the program uploaded and was just reset(minus the RAM of course) **Notice the  CE (count enable) control LED (bottom right) is not lit up (its hard to tell from photo, but it isn't), meaning it should not count on the next clock. Confirmed by multimeter The Counter (top right, green LEDs, counted, despite being disabled. It is NOW enabled both confirmed by the CE light and multimeter) Again the counter was incrimented, this time it should have, but now we will miss a whole memory address

\$\endgroup\$
2
  • 1
    \$\begingroup\$ I see very few decoupling capacitors in your setup -- maybe one or two per power strip. If you're using mostly LSTTL, that isn't nearly enough. Back in the day, even when using a proper PCB, we would typically have close to one capacitor per chip. Furthermore, if you are driving LEDs with signals that are also going to other logic, you are seriously compromising your noise margins on those signals. \$\endgroup\$
    – Dave Tweed
    May 9 '20 at 1:19
  • \$\begingroup\$ Yeah, thats very true. My next project is gonna be utilizing breadboards to a much lesser extent. I will keep that in mind for the next one. However this computer did work before though, I did pull the arduino out to see maybe the arduino is drawing too much, but it didnt make a difference. \$\endgroup\$
    – dka13
    May 9 '20 at 1:30
2
\$\begingroup\$

Get leaded 0.1uF caps, spread the leads out, and insert them from pin 7(GND) to pin 14(VDD) over the top of each IC.

You have made physical changes, and inductances that were LOW ENOUGH prior to changes, may not be low enough now.

Another risk is the lack of GROUND GRID.

============================================

back at university I implemented a 70-TTL-IC tic-tac-toe machine.

Knowing little of EMI, and not yet concerned with V = L * dI/dT, I had seen professional implementation of large IC systems using wire-wrap (Augat) boards that provided solid GND and solid VDD planes (punctured by thousands of wirewrap pins).

Having no budget for such niceties, I merely included X+Y ground wires (and X_only VDD wires), soldered at each X+Y at every crossing.

These X+Y parallel wires (5 for X and 18 for Y direction), soldered at each opportunity (4 * 17 = 68 nodes) were a fine GROUND GRID and ensured the 5 nanosecond TTL edges were always within 0.1 inch of a return_ground_wire.

With 0.1uF bypass caps across each of the 70 ICs (typically pin 14 to GND grid), there were no debugging issues.

\$\endgroup\$
3
  • \$\begingroup\$ Whats a ground grid? \$\endgroup\$
    – dka13
    May 9 '20 at 18:02
  • \$\begingroup\$ @dka13 A network for ground that runs everywhere. If it's a solid sheet of copper it is a groundplane. If it's a wiremesh, it is a ground grid. \$\endgroup\$
    – DKNguyen
    May 10 '20 at 6:39
  • \$\begingroup\$ For anyone looking at this later, I am accepting this as solution as it seems most likely my problem. If I find something else that I screwed up thats causing the problem I will come back and change the answer \$\endgroup\$
    – dka13
    May 10 '20 at 18:32

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.