Thursday, February 11, 2016

Designing and Building an 8-bit CPU

It's been too long since the last post here! Let's fix that:

I've always been fascinated by computers- especially the old 6805 or 8080 PCs of the 70s and 80s. Why? Because they're easier to understand than the computers of today. You can actually trace each connection on the circuit board and understand what's happening. But even then, the CPU chip itself is still a black box. Who knows what's going on inside there? For all I know, it's filled with silicon-based magic. That's why, over the past year, I've been learning about the inner workings of CPUs- registers, logic gates, memory, addressing, etc- and I have finally done enough research to design my own, completely out of 74 series CMOS chips. The design as it stands has a 16-bit address bus, 8-bit data bus, 32k of RAM, and can perform the following functions on two 8-bit operands: Addition, subtraction, bitwise AND, NAND, and OR. It's based upon the One Instruction Set architecture, meaning that it has only one command: "Move A to B". All CPU functions can be accomplished with this single instruction. 

The design will be built on two pieces of 9x15 cm .1" perfboard, and connections will be made between chips using enameled magnet wire. I chose this method of construction mainly because it was cheaper that the traditional wire-wrap construction most hobbyists use when attempting this type of digital project- the sockets needed to do wire wrap would cost me about $1.50 a piece, which, times about 50 chips, equals $75. Ok. Maybe that's not so bad, but still- I'm not made of money (read: I'm a cheapskate). 

Using ~30 gauge magnet wire, you still are wiring connections point-to-point, but instead of wrapping the wire around posts, you simply turn your soldering iron up to around 700F, and burn the insulation off of the very end of the wire and then solder your connection. The downside to this method is that the burning insulation can release dangerous chemicals, so you need to work in a well-ventilated area. Also, not all magnet wire types are created equal- some have insulation that will not melt under heat

Stay tuned for more updates, pictures and schematics. I'm currently working on the control logic section of the first board, and just finished the clock section. So far, so good!

-Ben, doitnowlabs