Close

Some thoughts on going from breadboards to PCBs

A project log for Yet Another TTL Computer

Yet another TTL computer, inspired by Ben Eater's YouTube video series.

amosAmos 12/29/2018 at 11:234 Comments

As I complete each module of the computer, I like to revisit Ben's videos both to make sure I haven't missed anything and also to see what I can learn from the design choices made. Now that I am starting to design PCBs for each module, I am also finding it important to check later videos for any additions or modifications Ben makes to the circuits - there'd be nothing worse than "finishing" the PCBs and discovering that I'd missed an important change to the layout. Like the clock's inverted clock signal, which is used in the control logic module. Not really a problem - I have watched the series of videos a number of times bu I want to make sure I don't miss anything important on the PCBs.

While integrating later additions into my PCB designs is not a big problem, I am facing a moment of writer's block when it comes to laying out the PCBs and their interconnections. I would like to keep things affordable, so I am aiming for no larger than 100mm x 100mm (so I can get cheap PCBs made) and I'd kinda like to keep the layout somewhat similar to Ben's final design, with modules on either side of a data bus. But what to do about the control signals? I guess a control bus would make sense. I am picturing a control + data bus down the middle of the layout, with separate modules plugging into either side of this bus. So we're talking 8 data lines, 16 control lines, power and ground, clock, !clock (for only one module), halt, and the carry and zero flags. That's 31 lines, round it up to 32 for good measure. Two 16-pin connectors per module would do the job.

Given my size constraints (100x100mm), if I could get each module to fit on a 50 x 100mm board, I could fit two modules per bus segment. So far so good. Of course, some modules connect directly with other modules - the two registers (A and B) connect directly to the ALU, bypassing the bus for example. So whatever size connectors makes sense for those interconnections can be used.

One minor annoyance is the register design. Registers A and B are identical, so that's easy, but the Instruction Register is slightly different. Being a cheapskate, I'd like to avoid paying for a separate PCB design, so I need to figure out a way of modifying the design so the one PCB can server both register types, perhaps selectable by a jumper?


As I continue this build process, I am also taking notes for my next design. Ben's design choices have been made for a specific purpose - explaining how to design a CPU. As such, not all of his design choices are necessarily ideal. I think his clock is over-engineered for example - three 555 timers and thee logic chips just to implement a clock? When I redesign, I will choose a simpler clock design. I still want to keep the adjustable clock rate and single-step mode, but this can should be achievable with a single 555, and the only logic chips needed would be for the Halt and inverted signal - if these are really needed. (Well, Halt is needed, but does it belong in the clock circuit, or elsewhere?)

Another design choice I will make with my own design, is separating the CPU functions from the general computer functions. Ben's design merges everything into one big design, but I'd like to have separate CPU, memory and input/output sections. I will also need to include separate address and data busses (external) for memory access and a larger address space is also a given. Do I need a separate flags register? Should the ALU be hard-wired directly to A and B registers, or is there a better design? (I'm guessing there is a better (and more versatile) way to implement the ALU and registers - if i add more registers, I should be able to use them with the ALU too, right?)

I'm okay with Ben's microcode ROM design, however the replication of instructions for each combination of zero and carry flags is a bit problematic - what if there are more flags and conditionals added? I will need to explore a better way of implementing this. There's also something about his output module that I am not entirely happy with, but I can't pinpoint what it is just now.

Anyway, I just wanted to get some (ramble) thoughts down before I forget them. ;^)

Discussions

[deleted]

[this comment has been deleted]

Amos wrote 01/06/2019 at 10:42 point

I'm not interested in simulating the design in software - that's why I am choosing the breadboard route. As for PCBs, while they are much cheaper than when I first got into electronics, when you factor in shipping costs, the price increases significantly. I simply cannot afford to do 2 or 3 iterations of a PCB that will end up costing me $30-40 per run. I know there are signal issues I will likely run into with breadboards, but plenty of others have implemented Ben's design on breadboards and there are quite a few interesting (and potentially useful) troubleshooting videos on YouTube if I run into problems.

Another reason for doing this on breadboards, apart from the learning aspects, is that I think the finished product looks quite neat and would make a great display piece. I am hoping for an aesthetically pleasing layout for my breadboards so I can show off this prototype - perhaps mount it to a piece of particle board and hang it on the wall. ;^)

PCI connectors might be interesting. I am up to about 31 connections required, which I could probably trim to about 28 if I really think about it, but a 36 way connector would give me room to expand. I'll definitely add that to my lost of things to explore.

  Are you sure? yes | no

Amos wrote 01/06/2019 at 13:00 point

I would love to get hold of a physical copy of the Malvino book, but the cheapest I can get it here is around $45AUD which is a touch out of my price range at the moment. (I'm currently a full-time student, so finances are bit tight.)

I have just uploaded a picture and video of my clock - the wiring isn't as neat as I'd like, but it'll do for now. ;^)

  Are you sure? yes | no

roelh wrote 01/06/2019 at 09:20 point

Hi Amos. You might know that in the Ben Eater design, LEDs are in many cases directly driven by an output, without series resistor. The LED limits the voltage to a certain value, and the resulting voltage is not always high enough to drive another input (that is connected to the same signal) to a high level. So I advice to use low-current LEDs and a series resistor.

I'm looking forward to your design !

  Are you sure? yes | no

Amos wrote 01/06/2019 at 09:35 point

My initial breadboard prototype will hew as close to Ben's design as possible, but I will definitely be keeping an eye on the LEDs' voltage and current draw. I've seen a few people have problems with voltages and spurious signals, so there's a few gotchas waiting out there for me, but I hope I'm prepared. 8^)

When I start to build my own CPU, I will be treating the 74xx chips with a little more care and tenderness than Ben does and hopefully avoid many of the issues people are having implementing his design. ;^)

  Are you sure? yes | no