Maker Pro
Maker Pro

Need an advice. Have idea to create simple computer , with punched card programming

AlekseiX86

Apr 18, 2013
8
Joined
Apr 18, 2013
Messages
8
Entry :
At first , i want to excuse me for my bad english :( , please.
Hello , let me introduce myself.
My name is Aleksey , and a am live in Ukraine. Now am studing in a college by specialty "Applied mathematics" , else i am programming in C++ , in circuit i am newbie.


Main part :
Some months ago , i decided to learn how working computer on the most low level (CPU , ALU , RAM , Binary Code , etc). And i think that in whole i not bad all this understand.
And here , in my mind came one idea : create my own simple computer , with small LED display.
But the main part of my idea : i want to create such computer , without any microcontrollers (like Ardruino , Rasberry , etc) , and even maybe without ant memory microchip's. Using only or binary logical elements on transistors, or binary logical elements on microchip's (but not microcontrollers!).

In whole , my idea :
1)Display.
Simple matrix(array) from one-color light-emitting diod's (i think 20x20=400 LEDS).
2)Programming.
I think , that is the most interesting part of my idea , i want to programming my computer... by punched tape , which include only binary code of my progrram.
The special apparatus is reading binary code from punched tape , and write it is in Command RAM. After this , CPU starting to read and do binary code from Command RAM. Variables , counts , all this will be making in the Main RAM.
Else CPU has acsees to Video RAM. I mean : reading binary code from punched tape and writing this in Command RAM. Then CPU reading this code , and if need do something counts , delarings , etc. in Command RAM. On this base , in binary code i want to write some algorithm, which count the position for that LED , which i want to turn on.
CPU only do commands. There is no conveyor algrotinm of command reading , code optimizer's , etc.
Only 3-4 simple commands
Just like this :
Command style :
xxxx - command ID
yyyy - first operand
zzzz - secomd operand

1)0001 0111 1 = > Set value of bit from Video RAM , with number 0111 in 1 (in the other words - turn on LED with number 0111).
2)0002 0111 1 => Set value of bit from Main RAM , with number 0111 in 1.
etc...

And else i have idea to write some assembler for this computer.
Some lexical analyzer on C++ , which will be tranlate my special assembler codes into binary code.
On these assembler i can create even arrays and object types , using only 3-4 CPU commands.
In the whole :
Screen : 20x20=400 LED
Video RAM : 400 bits
Command RAM : 1KB ~ 500Bytes
Main RAM : 200-300 Bytes. Maybe 500-600.

Ah , forgot about IRQ. I want to create 5 buttons , and there will be IRQ RAM (5 Bit) flags of turning on for each buton.

And i need an advice : is it really possible to create such computer (or my idea completely crazy??), which will be programming by binary code on punched tape , and 20x20 LED screen , and simple CPU , and how many time does it get to create?
And of course using ONLY or binary logical elements and memory triggers based on transistrors , or binary logical elements and memory triggers based on microchip's (but not microcontroller)
(It is crucial for me :D).
But do not understnd me wrong : i am actually glad to using microcontrollers , but i want to create this computer withount any of them.
This is not some college projects, or project for real/business using , just my own idea for self-education.
In theory , counting the position of turned on LED , i can write some games on that computer.
And it is quite possible to write such games on my copmuter :
Thanks for reading!
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
A card reader is likely to be almost as tricky to build as the computer itself.

One option is an array of photo transistors that is covered by your "card" Holes in the card turn on and off bits in your memory.

It limits your program memory to a single card, but it's conceptually fairly simple.

Many people have built computers from simple logic, most famously creating this logic from relays. There are a number of designs from the 70's or perhaps very early 80's which were available as kits and for which schematics and descriptions of operation (the latter probably being useful to you) are still available.

If you google "educ-8', you'll find some material on an example. It will indicate the level of complexity. If you're happy with that... Note that even this computer from 1974 uses a static ram chip.
 

JimW

Oct 22, 2010
59
Joined
Oct 22, 2010
Messages
59
If you really want to learn how computer architecture works, build a bit-slice computer. There are some good articles and explanations on the web. Much more informative than picking up an old Z80 and going from there.

If you want to program form punched tape, remember that you not only need a reader, but a punched tape writer. I think you would be better off with a pencil marked version of punch cards. At least then you are only looking at build an optical reader. Each line on the "punch" card could be the bit slice instruction width. Or if you are going with an off the shelf CPU, then the instruction memory width.

In any event, complex. Both on the architecture design side, then there is the wiring of 2 to 3 dozen chips (assuming you can actually find them), then the building of the card or tape reader and the circuitry to load the data stream into memory. Hmm, they used to pay me to do all this in the 70's. and 80's.

JimW
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
If you want to be able to spend most of your time designing, redesigning and optimising your architecture, and relatively little time wiring, rewiring and diagnosing wiring errors with huge numbers of components, you would be best to learn about programmable logic devices such as FPGAs, from companies like Altera and Xilinx. There's a significant learning curve, but if you get an evaluation board, and start from a simple sample project, you can get something working quickly. From there, adding new modules, redesigning existing modules, fixing problems etc is all done in the virtual world of your computer. If you come up with a good design, you can even market it as IP (intellectual property) so others can use it. It's an amazingly powerful idea.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
I agree with Kris. Using and FPGA will give you the same learning of the computer at gate level without the drudgery of having to build it phyiscally. In fact, this idea has been percolating in the back of my mind for a project once I reach retirement and have the time. FPGA deleveopment boards can be had for less than $100.

On the other hand, if what you want is something showy with thousands of transistors and "blinken lichten" then go for it. I will likely take years and cost a bundle.

Bob
 

AlekseiX86

Apr 18, 2013
8
Joined
Apr 18, 2013
Messages
8
Thanks each of you for giving me an advice.
I understand that each of you is well versed in the circuitry, and I understand what you're saying reasonable things about what to put together a computer on microcontrollers, but still I want to put it together or on the logic elements from discrete transistors, resistors , diodes, or using logical elemets , which created in the form of chips.
 

AlekseiX86

Apr 18, 2013
8
Joined
Apr 18, 2013
Messages
8
Forgot to ask about the reliability of logic:
1) If you make logic the transistors + diodes + resistors.
2) If you make the logic on logical view elements on chips (but not on microcontrollers!)
Under the reliability of logic I do not mean errors of logic, I mean the physical reliability of elements (i do not want that the computer worked an hour or two and something diode or transitor burned down or broken , etc.).
 
Last edited:

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
Reliability is a function of the number of components, the number of junctions and operating conditions.

And of the quality of the single device.
Therefore an integrated circuit, although it contains many components, is typically more reliable than an identical circuit built from the same number of discrete components.
I recommend you use low level integrated logic (e.g. 74hc series) for your project. You don't want to hassle with the umpteenth NAND or NOR gate built from discrete components - nothing to learn from that. Start on the level of integrated logic to gain insight into the inner workings of a computer.

However, no computer built from single or low-level integrated components will ever reach the reliability of an integrated chip.

Don't dismiss Kris' idea of using an FPGA prematurely. These are highly integrated, right, but the development environment (IDE) gives you access to logic on a gate level. The BIG plus is that it is very easy to reconfigure the FPGA in case of a mistake or if you want to test different functions. And the IDE will do at least some consistency checks for you. This can save you a lot of time for troubleshooting. And, although you have no direct access to internal circuit nodes within the FPGA for observing the behaviour of the circuit, you can always assign some pins as debug outputs to observe internal nodes.
You will also be able to integrate auxiliary functions into the FPGA, e.g. a display driver or keyboard mux which you will need to input data and to display results, or some small memory for code and data for your little CPU. These auxiliary functions are not necessary for the operation and for understanding the CPU, but will be required in practice to be able to handle your CPU. Putting all this into an FPGA leaves you more time and sace to concentrate on the core of your task.
 
Last edited:

AlekseiX86

Apr 18, 2013
8
Joined
Apr 18, 2013
Messages
8
Thanks for answer , Harald Kapp.
I think make all logic of my computer in program Logisim , for a start. It is include all need for computer components : AND , NOT , OR , etc , so it is possible to create all of the computer parts in Logisim - RAM, CPU, ALU, even LED screen.
Hmm ... And it can even programming computer right there, and it will be fully operational. Then every logical element should be replaced or the same from discrete parts, or the same on chip.
 

SPLatMan

Apr 22, 2013
8
Joined
Apr 22, 2013
Messages
8
Maybe model it forst?

Aleksey,

In theory a computer can be built with nothing but NOR gates, each consisting of 1 transistor and 3 resistors. Add diodes to the mix and you can have NAND gates. Early minicomputers (1960's) were built pretty much that way, though the actual memory used magnetic cores.

However, there's an awful of of work involved. A 1-bit data storage latch might require 6 to 8 such gates.

It seems to me that you would want to know that the computer is going to work to expectation before you start building it. Therefore I suggest, given you have the C++ programming skills, that you consider writing a computer program to model your architecture first.

The first step would be to simply emulate the instructions you intend, and the resulting output. After that you can consider modeling at the gate level. That way you will have a good idea of what it will do before you start wiring up hundreds of transistors and thousands of resistors. I promise you, you will learn a lot from modeling.

FYI, back in ~1970 I built a very simple processor that used a diode matrix to store the program. Imagine an array of 8 data wires and 100 address wires. An "addresser" circuit activates one address wire at a time to read out one instruction. A diode from the address wire to a data wire represents a 1. No diode represents a 0. It's a very simple Read Only Memory (ROM).

SPLatMan
http://splatco.com
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
Forgot to ask about the reliability of logic:
1) If you make logic the transistors + diodes + resistors.
2) If you make the logic on logical view elements on chips (but not on microcontrollers!)
Under the reliability of logic I do not mean errors of logic, I mean the physical reliability of elements (i do not want that the computer worked an hour or two and something diode or transitor burned down or broken , etc.).

All the above advices are really good And i do agree with kris.

One question do you happen to be intrested in building a "computer" with logic circuits "GATES" ? that perform simple mathematics like adding (+) , subtracting (-)
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
Aleksey,

In theory a computer can be built with nothing but NOR gates, each consisting of 1 transistor and 3 resistors. Add diodes to the mix and you can have NAND gates. Early minicomputers (1960's) were built pretty much that way, though the actual memory used magnetic cores.

However, there's an awful of of work involved. A 1-bit data storage latch might require 6 to 8 such gates.

http://splatco.com

Okay i have just read this post....
 

AlekseiX86

Apr 18, 2013
8
Joined
Apr 18, 2013
Messages
8
So, I decided to use memory chips and chips from series 74HS or 7400 for another parts of computer (just standart logic chips). I would like to know what frequency processor will have. Of course I understand that it is difficult to say what frequency will have processor know only using parts and not know architecture , but yet. So for example can i reach at about 500 kHZ frequency , or it is impossible in whole? Thank you.
 

SPLatMan

Apr 22, 2013
8
Joined
Apr 22, 2013
Messages
8
So, I decided to use memory chips and chips from series 74HS or 7400 for another parts of computer (just standart logic chips). I would like to know what frequency processor will have. Of course I understand that it is difficult to say what frequency will have processor know only using parts and not know architecture , but yet. So for example can i reach at about 500 kHZ frequency , or it is impossible in whole? Thank you.

Aleksei, I worked with the original Nova computer ca 1969. It was based on the 74181 4-bit ALU chip. From memory the speed was limited by the magnetic core memory, with a cycle time AFAICR of 1.5µS. So your 500kHz estimate could be close. The logic was running at effectively 4 times that speed, because it processed 16-bit words 4 bits at a time.
 
Top