Close
0%
0%

Homebrew 16 bit relay computer

Goal of the project is to develop and build a homebrew 16 bit relay computer

Similar projects worth following
The new relay system is a classical Accu CPU like some CPUs of the good old 80s. The system was simulated using the game "Logic World", now the real world build has startet!

If you want more information: you find the link to the project homepage on the left. And the complete circuit diagram in the download area. Just for fun.

Overview

The system ist a very simple CPU using an Accu register like CPUs in the 80s.  All mathematical operations are using the Accu, also all store / load operations. And, because it is a "High Performance" relay system, the program counter has its own adder which is only able to add 1 to the program counter.

Here you see an actual picture of the complete system:

The following diagram shows an overview about the system structure:

Note: The PC_HR register is necessary, because I can not write the changed PC based on its own value plus 1 direct into the PC...

One detail is important to understand the design of the system: all registers, which are realized by "self retaining" relays, have to be cleared before any information can be stored, also before the stored information can be changed. Thats the reason why the clock of the system is not an ordinary clock as you know it from digital systems. The clock of this system consists of 4 different pulses:

The control unit of the system is using the instruction register and a state register to select the control lines, a control line timing module is setting the Clear, Input-enable and Output-enable control lines based on the clock information.

And, of course, there is not only a state register...there is also a second state register which is cleared / loaded during cycles 0 and 1. You see this detail in the structure picture and in the circuit diagram. It is the same principle than I have to use for the program counter.

The following table shows the command set of the CPU:

The CPU is able to adress the memory using 3 different adressing modes. a) LD X is loading the Accu with the dataword stored in the adress after the opcode, b) LD M(X) is loading the Accu with the data stored in the memory adress stored after the opcode, and c) LD M(M(X)) is ... yes, indirect adressing. The dataword after the opcode contains the adress where the CPU finds the adress of the dataword that will be stored in the Accu. Is adressing mode c) really necessary? Maybe not. But it makes it easier.

And, as you can see, a CALL / RET set of operations is also avaliable. No, there is no stack realized, only one subroutine level is possible. The return adress is stored in the register SR.

The Simulation using "Logic World"

The following images show the Simulation of the complete system in the game "Logic World". This simulation was used to design the system and to check different design variants.

The relay element:


System overview:

Circuit diagram

The complete system circuit diagram is avaliable in the download section.

The software simulation:

To check if the command set of the CPU is useful, a software simulation using an Excel macro was developed. Using this macro it is possible to step through the code, watch registers and memory and to go forward until a breakpoint. The following picture shows the simulation with an program which multiplies two numbers using shift operations.

CircuitDiagram_120524.pdf

Circuit diagram of the relay computer

Adobe Portable Document Format - 1.91 MB - 05/12/2024 at 13:06

Preview

  • 1 × 24V Relay
  • 1 × Diode

  • Finished a new video

    Peter2 days ago 0 comments

    A new video is online, in this video I describe how logic using relays works and how the registers are designed...

  • Finished plug for first module

    Peter02/09/2025 at 07:33 0 comments

    So, the first module, the address calculation module, is now finished...I added a plug to connect it with the control unit.

  • Now phase 2 begins

    Peter01/18/2025 at 12:00 0 comments

    The wiring of the system is a bit messy, as can be seen in the following image:

    So, I disconected the modules...

    I will rewire the system, and I will use the following connectors for this purpose:

  • System test finished!

    Peter12/31/2024 at 10:19 0 comments

    A major success has been achieved...the system test, which thoroughly tests all components of the system, was successfully completed. The following video shows the execution of the test. Phase 1 is now complete, and in Phase 2, the system will be extended with input and output registers.

  • Started with system test program...

    Peter11/25/2024 at 19:13 0 comments

    To be sure that the system is working fine, development of a system test software ist started...the software will test:

    a) all CPU-commands

    b) the ALU

    c) the adress range

    The first step is a dynamic generation of a jump table with the subroutines for the three tests and a collection of the results.

  • Finished relay durability test

    Peter11/25/2024 at 19:10 0 comments

    So, the durability test is now finished. Thats the circuit diagram of the test:

    Thats how the test looks like in reality:

    The following picture shows the the Osci-Output (yellow: Arduino, blue: the second relay)

    Anf here is the protocol:

    So, more than 20 million switches are finished without problems...perfect accordance with the datasheets:

  • Relay durability test

    Peter10/30/2024 at 21:39 0 comments

    To ensure that repeated test runs of the system do not lead to a relay failure (relays are mechanical components and do not have unlimited durability), I have now started a durability test of two relays. An Arduino switches on and off 50 times per second, using a transistor to control a relay. This relay, in turn, switches a second one. I will let this setup run until one of the relays fails.

  • Funny problem...

    Peter10/30/2024 at 21:33 0 comments

    I tried a new program. I wanted to multiply 3 pairs of numbers and add the results...perfect for using the CALL and RETURN functions. But the end-result was not correct. I analyzed videos of the runs (by checking the LEDs), I also tried the three multiplications and the addition of three results in seperate programs...everything was fine. I think that the three multiplications are influencing each other...but before I step deeper into the problem I write a program which is testing the complete hardware of the system, especially the ALU, to be sure that a program error is the reason of the little problem.

  • New commands CALL and RETURN are working...

    Peter10/30/2024 at 21:27 0 comments

    So, the new commands are working fine, but the wiring is a little bit crazy:

    The new board you see is the register which is able to store the return address.

  • Finished state machine control boards for two commands

    Peter10/20/2024 at 19:56 0 comments

    Last week I finished two boards for the CALL and the RETURN command. The CALL command stores the program counter into a register and jumps to the adress after the CALL command, the RETURN command copies the adress stored in the this register into the program-counter.

View all 98 project logs

Enjoy this project?

Share

Discussions

Tom Goff wrote 10/02/2024 at 17:49 point

Great work! Konrad Zuse would be impressed with your hard work.

  Are you sure? yes | no

Peter wrote 10/02/2024 at 20:08 point

Thanks a lot...and today I uploaded a new video, the system is now able to multiply.

  Are you sure? yes | no

astonmartinus12312 wrote 09/20/2024 at 11:22 point

This project interested me a lot and I like such things since I was younger but when I wanted to try it myself, I don't have much to do this. I am student and now I have a lot of home assignments. I searched for the solution and one of my friends advised to try free essay examples website and gave me  https://eduhelper/essay-samples And now I have some free time to do what I like and gain some practical skills in it. Maybe that's can be my future career one day.

  Are you sure? yes | no

Ken Yap wrote 02/25/2024 at 23:44 point

👍 I commend you on your persistence with this epic project. I'm sure it will be a classic work when it's done. Looking forward to seeing that.

  Are you sure? yes | no

Peter wrote 02/28/2024 at 20:43 point

Thanks for your encouraging words. My plan is to be finished at the end of 2024...we will see.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates