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. The following table shows the command set of the CPU, the picture below the register structure.

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 CPU is a classical Accu machine. 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.´

The Simulation using "Logic World"

The following images show the Simulation of the complete system:

The relay element:

Overview 1

Overview 2

Overview 3

The ALU

The +1 adder for the program counter

The accu

The command decoder and the state machine function

The uCommands

Design

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:

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 will find this detail in the circuid diagram.

The complete system circuit diagram is avaliable in the download section. The following pitures are some key diagrams:

A system overview:

The CPU overview:

The control unit:

The complete ALU/register unit:

The command decoder:

The commands state functions:

ALU operation for 1 bit:

The command state function for command ST M(M(X)):

The uCommands:

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.

16bit_RelayComputer.pdf

Circuit diagram of the relay computer

Adobe Portable Document Format - 1.79 MB - 02/27/2023 at 08:44

Preview
Download

  • 1 × 24V Relay
  • 1 × Diode

  • Made a decision to reduce number of relays

    Peter05/20/2023 at 19:37 0 comments

    The design (and the wiring of the circuit diagram) is able to adress 16 bit of memory....64K. But I don't think that the system will ever use 64K of memory. So i decided to only realise 10bit of adress logic...this means the program counter, the program counter help register (PC_HR), the +1 adder, 2 MUX , the adress register and the adressbus-register are only using 10 bit. In my calculation this saves me 84 relays, thats more than 10%. Thats not nothing.

  • Finished the Control unit state register

    Peter05/20/2023 at 19:31 0 comments

    So, the module is finished...you find the module on page 21 of the circuit diagram.

    The next module will be the state decoder, on page 22.

  • Started the next module

    Peter05/09/2023 at 18:14 0 comments

    Today I started the next module...the status register of the control unit state machine, you find the module in page 21 and 24 of the circuit diagram (which you can download on this page).

    The module consists of 2 * 9 relays and is able to store a 4 bit status (in a relay system we need a master/slave register structure).

  • Found a little problem...

    Peter05/01/2023 at 09:47 0 comments

    During the tests of the instruction decoder I found a little error...I forgott the GND connection for the right side of page 26 of the circuit diagram, located on its own board. There are really funny consequences of this litte error...

  • Instruction Register and Decoder connected

    Peter04/24/2023 at 19:11 0 comments

    So, the instruction register is now connected to the instruction decoder. I had to buy a new soldering station, my very cheap, old one was a little bit overwhelmed.

    Here you see the pictures of the new modul. The next week I will test it, write the opcode and adressmode of all commands into the data input of the instruction register and I will see if everything works well.

    The next module will be the register of the control unit state machine...you find it on page 21 of the circuit diagram.

  • Instruction Decoder finished

    Peter04/15/2023 at 09:58 0 comments

    So, the instruction decoder is finished and will be tested during the following week. After test the module will be mounted on top of the instruction register. The next module will be the state register...

    And yes, one corner of the board is broken...but thats only an esthetic problem. You have to be very careful if you mount a board using screws.

  • Instruction decoder part 1

    Peter03/26/2023 at 20:58 0 comments

    An new board is finished, the instruction decoder...or the main part of it. There will be need for a second board with 11 relays to distinguish between the three adress types for Load, Store and mathematical operations.

    This board will be mounted on top of the instruction register module.

  • Finished the first module!

    Peter03/17/2023 at 16:17 0 comments

    Here you see a picture of the first finished module, the 16 bit instruction register. The LEDs show the status of the instruction register. The next module will be the command decoder...

  • The first module

    Peter03/03/2023 at 18:58 0 comments

    3.3.23

    After some failed attempts (for example aluminium bars are not easy to handle) i found a solution to join up some circuit boards to build a module: the instruction register:

  • Build is in progress

    Peter02/24/2023 at 12:45 0 comments

    24.2.2023

    Buid of the system is in progress, the first module is the instruction register:

View all 10 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

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