A project log for 4 bit computer built from discrete transistors

This project is an attempt to teach myself about the inner workings of computers. Naturally I started from the bottom up.

zaphodzaphod 04/05/2015 at 02:102 Comments

in the last post I said I had fixed the timing problems. on closer observation I realized I had only made them slightly less noticeable. the idea of breaking up the clock is correct and the logic I proposed almost worked, but not in all test cases it turns out. I then spent some time designing slightly more well thought out logic and produced this:

the above logic would appear to do everything I want it to. when I connected it to the program counter everything went fine, but upon inspection of the output of the instruction decoder I realized that something is seriously wrong. the instruction decoder, which had appeared to be working now does not and I don't know why. as you may have noticed this project has been on the back burner for a while, mostly due to the timing problems, but I'm going to try and figure out what's going on with the instruction decoder. as of right now I'm pretty stuck. any advice would be appreciated.



[this comment has been deleted]

zaphod wrote 04/09/2015 at 20:59 point

I've played around with the circuits in question since posting this update and have learned a few things and done some rewiring. the circuit is logically correct which you seem to have confirmed. It appears what has been going wrong with my setup has to do with 'amplification'. early on in this project I noticed that if I built a circuit with too many gates I would eventually not get the desired output due (I think) to the logic levels getting to close together, since then I have been adding 'amplifiers' when ever I noticed that the logic levels are starting to 'dim'. I am using 'amplify' and 'dim' in a very qualitative sense because I don't have the tools or understanding to talk about what's going on here in a more technically correct manner. on the output of the above circuit I added a stage which appears to increase the voltage coming out of the circuit because logical HIGHs was getting close in value to logical LOWs, since then I have noticed that if I bypass this 'amplifier' the circuit produces the desired behaviour in the program counter. basically I think I was adding complexity where I shouldn't have been. I think the problems I was/am having are due to me not having a great conceptual understanding of how transistors work. 

as to your suggestion to probe around with a scope, I have been doing that but I only have access to a crappy single channel scope that I don't quite know how to use. 

  Are you sure? yes | no

Johnny B. Goode wrote 04/09/2015 at 22:51 point

I know how that goes. I have a little two channel USB oscope, but I quickly discovered that I need more than two channels. It probably doesn't help that I don't really know what I'm doing with it either.

Regarding your amplification issues, I have run into similar problems. On a completely unrelated project I had an issue with my square wave being more of a square slight variation, which was due to my driving signal only dropping to 0.2V, which was then being amplified by an intermediate transistor.

I have found that pull down resistors are critical for eliminating these types of problems as any non-zero voltage quickly gets amplified to problematic levels. At this stage, my project is mostly just "on paper", but all of my gates have been designed with open collector outputs to avoid the problem of "dim" outputs. This is the result of noticing some issues similar to what you described when I was exprimenting with circuits for the different gates.

  Are you sure? yes | no