Close

Build Summery

A project log for Simple 16-bit Computer

Simplified 16-bit computer using mostly 74LSxx logic

charlie-smithCharlie Smith 08/15/2020 at 01:560 Comments

Again this will just be a summery of the build of the computer, to get mostly up to date with the project. Mostly of the actual work was done a little over a year ago, and unfortunately I didn't take as many pictures as I should have done at the time.


Build Method

The first decision was exactly how to build all the modules. Clearly PCBs are a really good option (and the one I used) but there are still choices over how to have them made. However, originally I planned on using strip-board. This seemed a reasonable upgrade over breadboards, and so I started experimenting with building a register. That resulted in this:


While this looks rather promising and allows for fixes and modifications when needed, there is the slight problem of the other side:This is clearly a mess (and I'm surprised that I did so much of it before giving up). It was very tedious to build, prone to error, and extremely difficult to debug and fix. The main issue being that with 16 data lines (needing a connection from the bus connection to the flip-flops, from the flip flops to the LEDs, from the flip-flops to the bus driver, and finally from the bus driver to the bus connection), and the remaining signal and power wired: over 70 individual wires are needed, and this is one of the simpler modules. As such I gave up building the entire system in this way. There are still some parts I still decided to used strip-board. Most notably the bus as it is so large, and mostly just a lot of parallel strips (i.e. exactly what a strip-board is). As an alternative fabrication method I had an experiment with making my own PCBs. For this I tested an EEPROM programmer for the AT28C16 ICs. For this I set up a headed container of Sodium Persulfate (as its apparently cleaner and more controllable than ferric chloride) with an air bubbler. To place a mask for the copper to keep, I experimented with laser printing onto paper, placing the paper toner side down onto copper clad board, heating the lot with an iron, and then removing the paper after soaking it in water for some time (there are definitely better tutorials out there that explain this). After a couple of attempts at transferring the mask I ended up with one I was happy with, etched and added the components:

This needed a few extra wires as it is a single sided board (double sided like this sounds difficult), but this needs far fewer than on the strip-board. The other side:

Amazingly this worked with only a few traces needing to be fixed (some extra solder on traces at the top of the picture). There were a few issues with the process of making this. Firstly transferring the mask wasn't very reliable, perhaps I need to consider printing on thinner paper to stop the toner being pulled off when the paper is removed. Secondly, etching was rather inconsistent with the bubbler I used. The bubbler only really did anything directly above it, this can probably be fixed by using one that bubbles in a line, rather than from a point. Finally, and most importantly, the board stopped working shortly after it was made. This is likely due to damage to one of the traces from the lack of solder mask. Overall the process was somewhat successful, but probably a bit too unpredictable for what I want. What's more, I then discovered JLCPCB as an extremely cheap way to get two layer boards manufactured properly. I even got free 3ish day shipping with a test order I made (so I spent an entire £1.53 to get 5 test register PCBs). These tests looked very good, and let me use two layer PCBs so I ordered a full set of boards (unfortunately I had to pay shipping this time) along with all the ICs I expected I should need.


Modules

To build the computer I started with a roughly 560mm x 560mm x 6mm sheet of MDF. I then sketched out in pencil some construction lines before adding mounting points which the PCBs can clip onto. These have an M3 bolt going through the MDF into the post , so require some fairly well placed holes, based on each PCB. To make sure they where all lined up, I could hold each PCB over the correct place and make a pencil mark for where to drill holes. Overall I am very happy with this method of holding everything together, although maybe I should have used mounting posts where screw help the PCBs in rather than clips, so that they are easier to remove. Also I might paint the MDF at some point, but for now I will wait to everything is working. Soldering everything together was pretty simple (although the LEDs and their resistors took a while). I also tried to test all the modules separately as thoroughly as possible  before putting it all together. This got me to this state:

Finally, I needed to wire it all together. To make things look vaguely nice, my plan was to solder small pieces of strip-board onto header pins to make a more easily solderable connector, and then use solid core wire to connect them together:

After quite a bit of tedious soldering I am very happy with the "finished" look. As a colour code, red is 5V, black is ground, white is clock, yellow is signal and blue is either data or an address (maybe I should have made addresses a different colour, but I'm not redoing these if I don't have to). For the yellow signal lines, I added some electrical tape to hold things together so they look nice (might might have been a bad idea due to interference, but it looked better than everything allover the place). There is also sort of a colour code the the LEDs: red is a data (which is sometimes an address) value in a module, blue is control (either the OPCODE or control word) and yellow is somewhat variable; being the micro-code counter in the control logic, the OPERAND in the IR, and the current value on the bus.

This was then the point where I thought it would be done, maybe some work fixing small issues, and then I could consider additional modules for it such as some sort of graphical output. However, things are never quite that simple. Upon powering it up (using a 5V 3A phone fast charger) it was very clear there was some more than small issues with the computer. This was mostly characterized by the values in modules updating randomly, and not synchronized with the clock. The control logic was also able to output values not valid based on how they had been programmed (outputting 0xFF which was only programmed to parts of memory which had address lines pulled to ground so couldn't be accessed).

Having run into these problems, I got rather fed-up with the whole project as I don't have a digital oscilloscope, and my logic analyzer isn't fast enough to see any issues. However, after spending some tome working on other projects (mostly model rockets) I eventually came across this video on Schmitt triggers on the EEVblog. The most relevant part of this, is that it introduced me to the issues when a signal takes too long to change from low to high or vice-versa. Looking at the datasheet for CD4047BC (which is used to generate the clock signal), the rise and fall time at 5V has a maximum if 15μs. I haven't been able to find a maxim rise or fall time for any 74LSxx ICs, some 74HCxx chips give the value at about 500ns at 5V. What is more, some 74LSxx datasheets give the rise and fall time in test conditions, with the values being all less than 10ns. While this isn't going to be anywhere near the maximum time, it does give us a rough target of what we should be using. So clearly having a clock with a rise time up to 3 orders of magnitude larger than the typical value is a problem. Having looked at this I decided to test using an Arduino Nano as a more controllable clock (which needed the clock to be buffered as it couldn't drive everything) and soon found that while the computer still didn't work, there was a significant improvement in the overall stability of everything. For the time being I have gone back to the clock used in Ben Eater's original computer. This still isn't perfect, but has definitely improved things so will have to do for the time being.

In a second attempt to revive the project I upgraded the power supply. The old one was a 5V 3A phone fast charger, and while this was able to maintain the voltage at just below 5V, from testing with lower current supplies (which definitely couldn't maintain anything like 5V), I decided that keeping a consistent supply at higher voltages might be a bit much for the power supply. As a replacement, I got a proper 5V 10A supply of the sort often used for higher power hobby electronics. This uses a screw terminal to connect a main power cable, and had absolutely no cover over this terminal. As such, I 3D printed a cover and resulted in a very nice, and capable, 5V bench power supply for anything that needs it. However, I'm not convinced it really did much to help the computer, and I don't really have anything to measure how smooth the power supply really is.

That more or less catches up with where I was before properly reviving the project. In the next log I will talk about some of the fixes I have made (which have made me realize it is possible to get this working), as well as answer any questions anyone has about anything a bit more specific than I have so far gone into.

Discussions