How to Build an 8-Bit Computer

 by spel3o
Featured

Step 17: Programming

Now that the computer is done, it can be programmed to carry out instructions. To do this you first have to put the computer into its program setting by flipping the run/program toggle switch into the program position. After that you select addresses starting at 0 and going to 15 and insert the needed data for your program. For instance, to start with 5 and add 4 with every output the program would be as follows:

Address - Data:
0000 - 00010111   LDA 7: Load the accumulator with the value stored at memory address 7 (5)
0001 - 00101000   ADD 8: Add value stored at memory address 8 (4)
0010 - 01010000   OUT: Output the accumulator
0011 - 01100001   JMP 1: Jump to instruction 1
0100 - X
0101 - X
0110 - X
0111 - 00000101   5
1000 - 00000100   4
1001 - X
1010 - X
1011 - X
1100 - X
1101 - X
1110 - X
1111 - X
 
Remove these adsRemove these ads by Signing Up
M0HIZ says: Jun 8, 2012. 12:17 AM
How did you tell the computer what to do when you first made up the commands. Did you have to 'define' the assembly language. Please pardon my ignorance if I'm massively wrong!

Thanks
tiberiustibz in reply to M0HIZNov 10, 2012. 9:56 AM
You'll have a hard time understanding how most of this works without a background in microprocessor architecture.

The crux of the computer is the Control Unit, which reads in the Opcode and then manipulates control lines to affect the change. In this case (to the best of my cursory reading), the opcode sets an address for an EEPROM. In the EEPROM, a function is implemented which manipulate 16 control lines to move data around based on the opcode. Each instruction has three possible states.

So in short, yes, you define the assembly by programming the EEPROM with a sequence of control activations.
M0HIZ in reply to tiberiustibzNov 10, 2012. 10:35 AM
Thanks. I understand it a lot more now.
jj.inc says: May 6, 2012. 9:45 PM
I am going to use this to build a minecraft computer. There you can see the flow of power, voltage, resistance, ect. don't matter, and the components are all free. Virtual computers on real computers rock!!!
TechGadgets in reply to jj.incSep 22, 2012. 6:52 AM
I'am building the computer right now, the most compex parts, the ALU and RAM are allready done. I totally agree, the way redstone works makes it way easier. Anyway you might look at Eloraam's Redpower Mod, handy IC's (Logical gates) and 16bit cable included ;).
And everything done in a few hours ^^.
Good luck. If you want (or somebody else) to compare your results with mine, just send me a PM.
Kryptonite in reply to jj.incJun 8, 2012. 4:52 AM
Say goodbye to the next 18 months of your life! :D
OCPik4chu in reply to KryptoniteOct 16, 2012. 3:59 PM
Didnt take anywhere near that long to build a computer in minecraft ;)
MarcosC says: May 4, 2012. 3:40 PM
I think that in English that is called punched card and it was used to input and storage data during the early times of computer science. I have one, it was never used. Very cool your project! Could I use it?
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!