11
\$\begingroup\$

I have come across a bag of about 5,000 n-type MOSFETs (2n7000), and I figured the best thing to do with them is to build a 6502.

I found a diagram of the nMOS 6502 layout

nMOS 6502 layout

But I am confused as to whether the thicker red MOSFETs have any significance. Are they p-type MOSFETs, are they just signifying enhancement vs depletion, or is it something else?

(Side note: if this is a bad idea, just say so! I am still uncertain as to whether I should go through with this project. What else would you do with 5,000 MOSFETs?)

\$\endgroup\$
4
  • 3
    \$\begingroup\$ You might want to make a transistor tester to check them before soldering into a circuit. If you got a bag of 1000 LEDs for $5, you would reasonably expect several to be dead or dim. \$\endgroup\$ Commented Jul 24, 2023 at 15:15
  • 4
    \$\begingroup\$ In case you haven't found it yet: google for monster 6502 where you can find a working one made out of transistors to get an idea how it could look like \$\endgroup\$
    – PlasmaHH
    Commented Jul 24, 2023 at 20:56
  • \$\begingroup\$ Yes, I too immediately think of building a 6502 when I see 5000 MOSFETS.... But it does sound kind of awesome. I would strongly suggest some kind of modularization. There will be bad solders, finding that one bad solder will be a nightmare otherwise. \$\endgroup\$
    – Max
    Commented Jul 25, 2023 at 7:35
  • \$\begingroup\$ If you want the experience of constructing a CPU out of discrete MOSFETs, but with slightly less work, consider e.g. Q2 that has 1094 transistors. \$\endgroup\$
    – jpa
    Commented Jul 25, 2023 at 8:21

3 Answers 3

8
\$\begingroup\$

As far as I can see, all the thick red MOSFETs have their drains connected to the red POWER network and their gates connected to their sources. This makes sense if the symbol means they are depletion MOSFETs - they are used as "depletion loads" which are current limiters. If you build this circuit out of discrete components it will be more convenient to use resistors in their place. I've been told that building logic gates with resistor loads makes them slower, but I'm guessing you don't care about that very much. You could use JFET constant current circuits or something like that, if you really wanted to.

If you find one that isn't wired like this, then it's doing something different and you can't necessarily replace it with a resistor.

If you know how to make logic gates out of MOSFETs then you already know why each logic gate has something like a resistor in it - it brings the output high by default, when the transistors aren't forcing it to be low.

P.S. The big array of transistors on the left side can be replaced by an array of diodes, resistors, and fewer transistors, if you like.

P.P.S. although you can make a 6502, I think you might be underestimating the sheer amount of wiring needed. Looking at a schematic is all well and good but you have to actually solder all these wires and that could take days or weeks. And if you make a mistake you have to find the mistake.

P.P.P.S. You also need to somehow assemble the thing. If you just have a loose tangle of transistors and wiring, they will touch each other and cause short circuits. If you are willing to order some more parts, you could consider perfboard, stripboard or any similar product (many manufacturers make it in different patterns). You'll need many pieces as your project will be big. If you want to only use home materials, you could poke the legs through (corrugated?) cardboard as a makeshift circuit board. Ground the cardboard while working on the circuit. Professionals will laugh at grounding cardboard to prevent ESD, but it's not the worst material...

(Edit: Actually it may be too difficult to poke MOSFET legs through corrugated cardboard. Maybe use normal thickness paper, and reinforce it afterwards by gluing cardboard onto it. IDK - when you go to build it, you'll find what works and what doesn't. I assume you don't want to get a proper circuit board made because it's expensive)

\$\endgroup\$
2
  • \$\begingroup\$ Thank you for answering the question, and these are all great suggestions! If I do somehow find the time for this project, I will probably use cardboard with current-regulating resistors. I don't think it will be too hard to poke through. \$\endgroup\$ Commented Jul 24, 2023 at 20:37
  • \$\begingroup\$ @EvanTheGamer I must have had a brain fart to not think of perfboard/stripboard first. This is a kind of generic circuit board often used by hobbyists. \$\endgroup\$ Commented Jul 25, 2023 at 5:45
2
\$\begingroup\$

The 2N7000 is an N-channel enhancement mode FET. The FET symbols are a bit basic, as well as they won't all be N-ch enhancement mode. There is a good discussion on the 6502 on the forum.6502.org webpage. Also hackaday did cover a discrete build of a 6502. It didn't run at a 1 MHz but rather down at 60 kHz.This was due to, as they noted, NMOS capacitance. Gate capacitance on enhancement mode devices needs to be charged up, so you have some delay.

Also the original 6502 was actually a depletion mode device (see 6502.org as well as wikipedia.

You can put the FETs up on ebay, donate them to a local college, keep some for yourself to tinker with, many options.

Always keep in mind that your time does really have value, so while this may be a "cool" project, and you certainly will learn a lot, there are only so many hours in a day.

You could take some of these FETs and make something simpler from a logic perspective (perhaps some AND/OR gates etc). Just learn how to use them, in general in circuits and then move on to using IC's for more complex designs.

Its not entirely a bad idea, as you would learn how a basic CPU works, and if you are interested in ASIC design, CPU;s etc. Then this could be rather interesting. If it’s more about using up 5k FET's then you should really consider other design ideas.

Also its not clear what your background is for engineering, doing a CPU isn't trivial. You want to start small (light an LED, learn how to drive a FET in linear vs saturation region.

Good luck!

\$\endgroup\$
7
  • \$\begingroup\$ Thanks for the feedback! In terms of background, I just graduated high school and am going off to MIT soon for EE&CS. I've built quite a few things, including guitar pedals, game controllers and eurorack modules, and I am also interested in computer architecture. I've made an ALU in a logic sim before, but not any further. I understand MOSFETs from a digital standpoint, and I have made logic gates with them before. I found the transistors for $5 at a flea market, and I thought I should "go big or go home," but you're probably right, the time of this project is probably better spent elsewhere. \$\endgroup\$ Commented Jul 24, 2023 at 4:36
  • 2
    \$\begingroup\$ @EvanTheGamer 5000 FETs is enough to build a CPU, probably even a 6502 (based on this schematic). If not the exact same electrical circuit then you could build the exact same logic circuit. The electrical circuit will look pretty similar even if not identical. I think these thick-channel FETs are so-called "depletion loads" and your version will probably use resistors instead because that makes more sense when you are building from components. ICs use depletion loads because they can't use resistors. \$\endgroup\$ Commented Jul 24, 2023 at 9:14
  • 1
    \$\begingroup\$ If you're after an understanding of computer architecture, I can recommend the gigatron, which is a TTL-level system implementing a harvard architecture computer (with video), used to implement a number of CPU types. There are lots of things it does and doesn't do, and understanding why and how will put you in great shape for your degree studies. \$\endgroup\$
    – jonathanjo
    Commented Jul 24, 2023 at 9:30
  • 3
    \$\begingroup\$ I can't find the part of this post that answers the question. What do the thick MOSFET symbols in the diagram mean? \$\endgroup\$ Commented Jul 24, 2023 at 12:54
  • 2
    \$\begingroup\$ I think that making a CPU out of transistors is a lot more trivial than many people think. If you can make one in a logic simulator, and you can make a logic gate out of transistors, then unquestionably, you can make a CPU out of transistors. What it is, though, is tedious as heck. It's much easier to build one in a transistor simulator, simply because there's no soldering! \$\endgroup\$ Commented Jul 25, 2023 at 6:32
2
\$\begingroup\$

The 'thick' FETs are depletion-mode type. In NMOS devices they are typically used in the pull-up network instead of resistors.

To model their behavior in the 6502 you could replace them resistors, with some reduction in efficiency. Otherwise you'll need to source some depletion-mode n-FETs (rare these days, but not impossible.)

More about depletion-mode FETs: Typical use of depletion MOSFET

How does the depletion-mode FET work as a pull-up? Here's a simulation showing the principle in an NMOS inverter (simulate it here):

enter image description here

(The depletion-mode FET shown has a threshold of -0.5V.)

It might also be possible to convert all the NMOS gates to CMOS topology. This will increase your transistor count on the pull-up side, but it will use less power than NMOS (or NMOS faked out with resistor pull-ups.) Note that the 6502 uses a lot of common pull-ups to implement PLA's, so this may not be practical.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.