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

  • Mounted anything together

    Peter09/03/2023 at 11:47 0 comments

    Here you see the new module mounted on the complete control unit:

    The open connections you see on top of the "bus module" will be filled with the state machine modules for the different CPU commands. The first one will be the NOP command.

  • Finished the worst module until now...

    Peter09/03/2023 at 11:38 0 comments

    So, the converter between the uCommands and the control lines is finished now, but it was not my best work,,,see the pictures:

    The module works, I checked all inputs. This is the scematics of the module:

  • Mounted the control unit components...

    Peter08/09/2023 at 19:37 0 comments

    So, now the components of the control unit are mounted together. The next step is to implement the NOP command (page 39 of the circuit diagram) and the uCommand board (page 20 of the circuit diagram). The two boards will be placed on two of the bus connectors of the bus-module on top of the control unit:

    And then the tests of the control unit will start. A new logic analyzer is avaliable (16 channels, a cheap variant is enough for this very slow system) and an Arduino will be used as a clock for the system.

  • Finished the control line timing module...

    Peter08/07/2023 at 15:02 0 comments

    So, the module ist finished...now the test of the module starts. After testing the module will be mounted to the rest of the system, together with the backplane.

  • Started new module...

    Peter07/25/2023 at 09:07 0 comments

    The next module of the control unit has started...the control line timing module. You find the circuit diagram of this module on page 23 of the system circuit diagram (which you can dornload in the download area).

  • Backplane finished...

    Peter07/03/2023 at 12:29 0 comments

    So, the backplane for the 12 different command state machines (see page 27 of the circuit diagram) is finished. It was a very booring part of the system. The uCommands board will also be put into the backplane (see page 20).

    The next, and last module of the control unit, will be the control line timing unit, page 23 of the circuit diagram.

  • Finished the module

    Peter06/17/2023 at 16:27 0 comments

    Hello, the problem was NOT a defect relay...ist was a defect solder point. I only had to heat it up. Now I mounted the modules together, the instruction register, the instruction decoder, the control unit state register and the control unit state decoder:

    Now I will start with the uProgram for the NOP command (page 39) and the uCommand (page 20).

  • Defect relay...

    Peter06/17/2023 at 08:17 0 comments

    So, I finished the control unit state decoder, but I found a defect relay during my tests:

    I have to change the encircled relay ... in the future I have to test all relays before i use them.

  • State register decoder

    Peter06/08/2023 at 14:56 0 comments

    So, after I reinitialized my soldering tip with a tinner the work is going on. The decoder of the state register will be finished until end of the week. You see a circuit diagram of the decoder on page 22.

  • 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.

View all 19 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