I’m going to switch it up a bit and talk about one of my other hobbies. Electronics. I haven’t worked with digital circuits in a while. In fact it’s been so long that I had to do a lot of research to find out what is new the world of electronics. Micro-controllers have come a long way. Components have become dirt cheap over the years and way beyond the capabilities of my test equipment. As I was looking around the world of technology, I stumbled across an article describing a guy who built a computer out of thousands of discreet transistors. So that’s what I’m going to talk (or ramble) about in this article.
That’s the name of this homebrew computer system built by a guy named James Newman. You can get to the website by clicking here: http://www.megaprocessor.com/.
First I was intrigued by the fact that he built an entire system out transistors. Not just transistors but NMOS transistors that are sensitive to static discharge. I usually avoid these things, I have a difficult enough time building circuits out of TTL logic and NPN transistors. However, if you want to build something out of a large number of transistors (like 27,000), you have to be conscious of power consumption and speed. He has an entire story about his adventure with controlling static and burning out transistors.
As I dug through the website, I discovered that he built little circuits representing logic gates with these transistors, then he treated the circuits as components in a larger structure. There is an LED on each input and output of every circuit, so it’s easy to visually verify and troubleshoot any hardware problems. Here’s a sample picture of a 2-input AND gate:
His website describes that he built this machine as a learning machine. Anyone who wants to visually see what goes on inside the computer can see the LEDs light up as the program operates. That is a really good idea. I think every college should have one of these for their computer engineering class. Unfortunately, due to maintenance costs and physical space, I don’t think too many colleges would be interested in setting one of these up.
In addition to the single logic gate boards, some boards contained repetitive circuitry consisting of many gates. Those boards are diagrammed accordingly (also with LEDs on inputs and outputs). Here’s an example of an 8-bit logic board:
The next step up is the assembly of circuits into modules. The connecting wires are diagrammed on the front of the board (see the red lines below) and the circuits are wired from behind. Here’s a state machine module:
Here’s what one of these modules looks like from the backside:
The modules are mounted in frames which he has arranged in his living room (though he’s looking for a permanent public accessible location for the device).
As I mentioned before, you can follow the link and dig around through his website and learn all the fun details of how he built the machine, how long it took him and how much it cost. For those of us who have worked in the electronics industry, his section called “Progress” has a lot of interesting stories about problems that he ran into not to mention the “Good, Bad & Ugly”. This story made me cringe: Multiplexor Problem. Unexpected current flow problems are difficult to understand and troubleshoot.
So what’s the point?
It’s a hobby. The purpose is to built something or accomplish some task and stretch your abilities. The goal is to experience what it would be like to construct such a machine. Think of this as an advanced circuit building exercise.
I’ve built microprocessor based circuits in the past (mentioned on my website: http://www.decaire.net/Home/ComputerProgramming),
the megaprocessor is much more complex and more challenging than my project. If you really want to learn how a computer operates, nothing compares to a project like this. I have to warn readers that this is not something you jump into out of the blue. If you have no electronics experience, start small. I mean, really small.
I would start with a book like this:
You can find this book at Amazon or at this link: http://www.makershed.com/products/make-electronics-2ed. The bookstore that I visited yesterday (Barnes & Noble) has this as well. I browsed through a lot of the “Make:” series of books and they are very well organized.
You’ll need some basic supplies like a breadboard, wire, hand-tools, a volt meter (nothing fancy). If you move up into faster digital circuits, or you dive into microcontrollers and microprocessors, you’ll need to invest in an oscilloscope. This will probably be the most expensive piece of test equipment you’ll ever buy. I still own an original Heathkit oscilloscope that is rated at up to 10Mhz. If you understand CPU speeds, you’ll notice that this oscilloscope is not able to troubleshoot an i7 processor running at 4Ghz. In fact, oscilloscopes that can display waveforms of that frequency are beyond most personal budgets of a hobbyist (I think that crosses over to the domain of obsessive).
Other Homebrew Systems
I spent some time searching the Internet for other homebrew computers and stumbled onto the “Homebuilt CPUs WebRing.” I haven’t seen a webring in a long time, so this made me smile. There are so many cool machines on this list (click here). There are a couple of relay machines, one in particular has video so you can see and hear the relays clicking as the processor churns through instructions (Video Here, scroll down a bit). The story behind Zusie the relay computer is fascinating. Especially his adventures in obtaining 1500 relays to build the machine (and on a budget). I laughed at his adventures in acquiring and de-soldering the relays from circuit boards that were built for telephone equipment.
There are a lot of other machines on this webring that are just as interesting. Great stories, schematics, how to build their machine, etc. The one machine that really got my attention was the Magic-1 (click here). This is a mini-computer built by a guy named Bill Buzbee. He has a running timeline documenting his progress in designing and building the computer. Reading his notes on designing an emulator and then his issues with wire-wrapping really gives a good picture of what it takes to build a computer out of discreet logic. Here’s a photo of the backside of the controller card:
The final machine schematics are posted here. He used a microprogrammed architecture. Microprogrammed architecture is like building a computer to run a computer. This is one of my favorite CPU designs which I learned about when I bought a book titled “Bit-slice Microprocessor Design”. Coincidentally, this book is listed in his links page under “Useful books”. You can still get this book as new or used. I would recommend picking up a cheap used book from Amazon. The computer discussed in this book is based on the AMD 2901 4-bit CPU, which is a bit-slice CPU. Basically, you buy several of these CPUs and stack them in parallel to form a computer. For a 32-bit CPU, you would buy 8 chips and wire them in parallel. Unfortunately, AMD doesn’t manufacture these chips any more. The book, however, is a good read. He also has PDF postings of another book called “Build a Microcomputer” which is virtually the same book (go here, scroll down).
Building Your Own
If you’re looking to build your own computer, just to learn how they work, you can use one of the retro processors from the 70’s and 80’s. These are dirt cheap, so if you blow one up by hooking up the wrong power leads, you can just grab another one in your box of 50 spare CPU’s. On the simple side, you can use an 8085 (this is almost identical to the 8080, but doesn’t need an additional +12v power supply). The 8080 CPU was used in the original Space Invaders arcade game (see Space Invaders schematics here).
The 6502 has a lot of information available since it was used by Apple and Commodore computer companies in their earliest designs. The Z80 is like an souped up 8080 processor. This CPU has index registers which makes it more flexible. There are a lot of hobbyists who have built machine around the Z80, and quite a few arcade games were built with this CPU. The Galaga arcade game used 3 Z80 CPUs to run the game.
I suspect that over time these CPUs will become difficult to find. Jameco currently lists them as refurbished. If you build a project around one of these CPUs, be sure and buy extra chips. That way you’ll have spares if the supply chain runs dry.
If you’re more advanced, you can still buy 8088 CPU’s for $3.95 each at Jameco Electronics. This is the CPU that the first IBM PC was based on. At that price, you can get a dozen for under $50 and build a parallel machine. This CPU can also address 1 Megabytes of memory (which is a lot for assembly language programming), is contained in a 40-pin chip format and there is a huge amount of software and hardware available for it.
If you’re not so into soldering, wire-wrapping or circuit troubleshooting, but would like to build a customized system, you can experiment with tiny computers like the Raspberry Pie or the Arduino or Beaglebone. These devices are cheap and they have ports for network connections, USB devices, HDMI outputs, etc. There are a lot of books and projects on the Internet to explore.
These are not your only choices either. There are microcontroller chips that are cheap. Jameco lists dozens of CPUs with built-in capabilities like this one: ATTINY85-20PU. It’s only $4.49 and you can plug it into a breadboard.
So Many Resources Available
My website doesn’t tell the whole story of my early days of building the 8085 computer board. I’ve actually built 2 of these. My first board was built somewhere around 1978. At that time, I was a teenager and computers were so expensive that I didn’t own one. So I was determined to build one. I had an old teletype (donated by an electronic engineer that lived across the street from my family when I was younger). I built my own EPROM programmer that required dip switch inputs (this was not a very successful way to get a program into EPROM memory). After I graduated from High School, I joined the Navy and purchased a Macintosh computer in 1984. I’m talking about THE Macintosh, with 128k of memory. Before I was honorably discharged from the Navy, I upgraded my Mac several times and had a Mac Plus with 4 Meg of memory. My old 8085 computer board was lost in one of many moves my parents and I made between 1982 and 1988, so I decided to reconstruct my computer board and that is the board pictured on my website. I also constructed a better EPROM programmer with a serial connection to the Mac so I can assemble the code and send it to the programmer (I wrote the assembler and the EPROM burner program in Turbo Pascal). All of this occurred before the World Wide Web and Google changed the way we acquire information. Needless to say, I have a lot of books!
Those were the “good ole’ days”. Now we have the “better new days”. I own so many computers that I can’t keep count. My primary computer is a killer PC with 500 Gigs of M.2 hard drive space (and a 4TB bulk storage SATA drive), 32 gig of memory and a large screen. I can create a simulator of what I want to build and test everything before I purchase a single component. I can also get devices like EPROM burners for next to nothing. There are on-line circuit emulators that can be used to test designs. I’m currently evaluating this one: Easy EDA. There are companies that will manufacture printed circuit boards, like this one: Dorkbot PDX. They typically charge by the square inch of board space needed. This is nice, because I can prototype a computer with a wirewrap design and then have a board constructed and build another computer that will last forever.
If you’re bored and you’re looking for a hobby. This is the bottomless pit of all hobbies. There is no depth you can go that would conclude your knowledge. You can always dig deeper and discover new things. This is not a hobby for everyone. This hobby takes a significant amount of patience and learning. Fortunately, you can start off cheap and easy and test your interest levels. Otherwise, you can read the timelines and blogs of those of us who build circuits and struggle with the tiny details of getting a CPU to perform a basic NOP instruction. I like the challenge of making something work but I also like reading about other people who have met the challenge and accomplished a complex task.
Never stop learning!