-1
\$\begingroup\$

I recently purchased the book 'Code' which, for those who don't know, is an insight into how computers work on the hardware level - going down to basic components and how various parts of a computer are structured in terms of logic gates and I/O signals.

It has inspired me to make a simple 8 bit computer myself. I will probably use CMOS ICs for more complex components (such as RAM), however stuff such as the clock and accumulators etc I am planning on making entirely out of transistors.

I understand that NPNs are the way to go with logic gates, however I don't really understand what type of NPN to buy and what resistor to use for the base. From articles I've read it seems to be 1K resistor however I don't not know what transistors they use.

If someone could give me an idea on what kind of transistor to use it would greatly be appreciated.

Thanks :)

Adam

EDIT: I am planning on using a 5V power supply, I don't know what amperage however, so if someone could give me guidance on that as well :) (I think it should be a 2A form what I've read)

\$\endgroup\$
  • 1
    \$\begingroup\$ Shopping questions are off topic, so you could change this to ask what characteristics you need for those transistors. I would go with a jellybean part, whatever you can get cheap such as a 2n3904 or 2n4401. Alternatively a 2n7000 n channel mosfet might be a good fit. \$\endgroup\$ – Colin Jun 13 '17 at 11:04
  • 3
    \$\begingroup\$ Yeah, what Colin suggests, to which I'll add from my learner days (circa 1972): Build an astable multivibrator first for a timer. Messing around with discrete components can be great fun, plus, if nothing else, astable multivibrators make great, musically-rich tones (the square wave output has lots of harmonics). \$\endgroup\$ – Michael Gorsich Jun 13 '17 at 11:46
  • 3
    \$\begingroup\$ Reminds me of my own first learning experience. There was a while when I felt like the answer to every circuit design was some combination of two transistor astable multivibrators. Ah, the grand days of the BC108... \$\endgroup\$ – Ian Bland Jun 13 '17 at 12:33
  • 2
    \$\begingroup\$ Adam - Find a copy of the 1970 'book "Osborne 1 - An introduction to microcomputers" ... searches ... various formats here - PDF is 376 pages. Read it. This will be about as hard a book to read as you will ever meet. If you master it, when you look at the book again a few years later it will be troivial. (Ask me how I know :-) - 40 years ago!) . If it's too hard, find Volume 0. Written later because so many foun=d vol1 too hard. But, it's the best. archive.org/details/AnIntroductionToMicroprocessorsVolume1 \$\endgroup\$ – Russell McMahon Jun 13 '17 at 12:43
  • 1
    \$\begingroup\$ I walk through a reduced-down design process for RTL here: electronics.stackexchange.com/questions/281152/… . So you might take a look there. Then consider the idea of DTL, as well. However, even there I recommend careful design steps before settling on exact values. No matter what you do, you need to thoroughly test the basic logic gate design and make sure it is versatile and handles part variations well, too. \$\endgroup\$ – jonk Jun 13 '17 at 15:14
1
\$\begingroup\$

While I applaud your interest, you should be aware that you have taken on a monumental task. Even a fairly limited 8-bit computer will take hundreds (thousands, more likely) of transistors, let alone diodes and resistors. And resistors and diodes will always outnumber transistors. See, as an example, this project which does what you are trying. Especially, check out the Octal D Latch picture.

If you are still up for it, you can rest easy about the transistors. Almost any small-signal transistor will do. I'd advise going to digikey.com or any other online component supplier, then searching on discrete transistors. Select for NPN and through-hole, then sort by price. You should be able to find something for less than 5 cents per unit, which is just as well considering the quantities you'll need. Do the same thing for diodes (but skip the NPN part). And resistors get remarkably cheap in the thousands quantities.

You'll also need to consider how you're going to mount these circuits. As the linked project does, you're probably best off modularizing your circuits using perfboard.

Frankly, you're much better off by starting small. Make a few logic circuits and get a feel for what it takes, keeping the final computer as a distant, long-term goal. If you become comfortable with modularized logic blocks, you will see the wisdom of using integrated circuits instead of building your own blocks - they are equivalent, after all. Keep in mind that in the linked project, a single octal register, which you can get as an IC for less than a buck, took 2 1/2 hours of soldering. And (trust me on this) there is no guarantee that you will make all the connections properly if you do it yourself, so there may be a whole lot of extra time and aggravation spent it trying to track down your mistakes.

And finally, at a minimum you will need to get an oscilloscope. The scope will need to be faster than your computer clock rate, and you will have to learn how to use it. But you absolutely will not be able to troubleshoot the inevitable problems with just a meter.

\$\endgroup\$
  • \$\begingroup\$ No, you specifically don't want to use thru-hole parts. The greater hassle, larger space requirements, and much more labor involved will really add up after a few 100 parts, let alone a few 1000. \$\endgroup\$ – Olin Lathrop Jun 13 '17 at 18:14
  • 3
    \$\begingroup\$ @OlinLathrop - While I agree with the argument in general, to expect this poster, who is entirely ignorant of electronics design, to jump immediately to SMDs seems quite unreasonable. And you noted, I hope, that I suggested the effort would be "monumental". \$\endgroup\$ – WhatRoughBeast Jun 13 '17 at 22:10
-1
\$\begingroup\$

1,000 ohms from collector to +5, with 100 pf (approximately 5 loads) Cload on collector, achieves 100nanosecond delay in your NOR or Inverter.

Using 10Kohm into base, hitting the Miller Multiplication point, makes your logic very vulnerable to noise at that Miller pivot point.

Thus I'd use DTL NAND gates, with 1Kohm collector to +5v, and 1Kohm pullups on bases.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • \$\begingroup\$ Each output will then draw over 4 mA when low. That's going to add up to a lot of power fast. \$\endgroup\$ – Olin Lathrop Jun 13 '17 at 18:16
  • \$\begingroup\$ That's right. If he wants speed, these DTL NAND gates demand power. \$\endgroup\$ – analogsystemsrf Jun 14 '17 at 3:20

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.