Close
0%
0%

BrainfuckPC Relay Computer

Von-Neumann 16-bit relay computer with Brainfuck++ instruction set

Public Chat
Similar projects worth following
This is a Reed Relay Computer on soviet reed relays with Von-Neumann architecture and esoteric programming language "brainfuck" instruction set. a BrainfuckPC.

All compute logic is mounted on 192 modules (60x44mm PCB, with 4 relays on each) placed on 6 blocks (150x200mm), 32 modules on each. Blocks are wire-wrapped.
IC-based RAM, 128KB, or 64K Words x 16 bits.

Working frequency - up to 100Hz. And as we can modulate clock by external MIDI device, we can play a music while our application is running.

Outline

Tens of thousands of people creates they own programs on brainfuck esoteric programming language. 

Thousands - creates they own brainfuck compilers or emulators to run their creation.

But the only one man tries to create Brainfuck Relay Computer.

BrainfuckPC (BFPC) - is a computer on reed relays, which can execute brainfuck commands natively, without any compilation into other assembly (just need a translation to 16-bit instructions representation). All main instructions are corresponds to eight bf commands.

BrainfuckPC 3D model in Fusion 360(Clickable). Dimensions 1000x650mm

Central compute  element is a 16-bit full adder. Four 16-bit registers for storing temp values and context values. Static RAM 128Kbytes (64K words). And some latches and controlling logic to support. 

Roadmap

Brainfuck++ instruction set

MIDI controlled program execution

As maximum working frequency is 100Hz, and as we can modulate clock using some MIDI device, we can play some music using just a relays knocking sounds!

  • 439 × RES55 USSR Reed relay with 1C contact group
  • 64 × RES64 USSR reed relay with 1A contact group
  • 64 × RES43 USSR reed relay with 2A contact group
  • 157 × PCB module 60x44mm different PCB modules
  • 5 × Base PCB plate 200x150mm PCB each for 32 modules

View all 7 components

  • Run Hello World on BrainfuckPC on 25Hz

    Artem Kashkanov2 days ago 1 comment

    I connected VFD to my relay computer and run Hello world on "Brainfuck" on 25Hz

  • Perhaps, the world's fastest relay computing

    Artem Kashkanov01/28/2019 at 08:50 5 comments

    First program works!  In a cycle I'm doing ADD+ADA operations on 25Hz!

    Program:

    0: NOP

    1: ADA+0xFF00 - set Address register to 0xFF00

    2: ADD+1 //increment value in current memory cell

    3: ADA+1 //shift current memory cell number

    //repeate last two instruction 16 times, because writing inner loops in brainfuck is brainfuck enough :)

    33: ADA-0xF //return AP to 0xFF00 memory cell

    34: JNZ-0x21//if current cell is Not Zero, return IP to number 1 (which would be skipped due to pc arch). 

    All instructions are repeated.

  • instruction fetching stage works!

    Artem Kashkanov01/18/2019 at 21:05 0 comments

    Instruction fetching stage is one of two main stages - fetching and execution.

    We need to write old IP register(right block, top) value to TMP register (left block, top) and using full 16-bit adder do IP+1 operation.

    The result of this operation as saved back to IP register.

    After we got new IP, we send reading strobe to RAM, and new instruction goes to DATA line. Now we just need to write it to CMD register (Left block, bottom) and goes to execution stage.

    As RAM was inited with 0x5555 and 0xAAAA values we see how on odd IP numbers Odd bits  on CMD register are flashing, and on even IP values - even bits.

    Bottom line of switching boards have leds which are showing current DFATA line state and odd-even switching is observed well

    With high fps camera both stages are visible very well

  • Clock system is ready

    Artem Kashkanov01/18/2019 at 08:14 0 comments

    I wire-wrapped clock system! the idea is to do instruction fetching stage and execution stage in one clock cycle. So we need to run impulse sequencer two times, on every clock signal edge.

    I used simple schema with XOR element and D-trigger to do this and now everything works fine.

    On high-speed camera you can see, how impulse sequencer signal wave is going.  And this process happened two times per one clock period.

    Is Lights of impulse sequencer are flashing only ~10 ms of half-period it's funny to see how camera doesn't detect it because of stroboscopic effect.

  • Output driver replacement for Memory board

    Artem Kashkanov12/06/2018 at 09:48 0 comments

    Previously I found, that my output drivers on TLP281-4 couldn't open just one relay... So I have to replace schematic and developed more powerful driver base on P-MOS.

  • Yet another relay modules

    Artem Kashkanov12/02/2018 at 16:43 0 comments

    Made driver modules for BFPC. 

    Control line need to be supplied with 0.5-0.7A current and my RES55 end RES64  would be broken if I will use them for this.

    So I took 1A reed relays and made just a driver.

  • ADA/ADS Instructions timing diagram

    Artem Kashkanov11/21/2018 at 21:01 0 comments

    ADA/ADS instructions are used for walking through memory - we can change current AP register with some constant value.

  • Signal sequencer is not an easy task

    Artem Kashkanov11/20/2018 at 21:23 0 comments

    Just created waveform for new instruction fetching - we need to do IP++ operation and with new IP address load instruction from memory.

  • Impulse sequencer ruins all plans

    Artem Kashkanov10/22/2018 at 07:24 0 comments

    I made impulse sequencer which generates 16 impulses where each next impulse goes with pause after the previous one.

    Current pause rate is ~700us and 10 stages gives me 7ms. Last 16-th impulse stay high only after 11 ms!. This is a disaster. I can not deliver 100 Hz frequency on this rates. 50 Hz would be the good prize.

    One workaround is to raise voltage from power supply

  • Instruction Decoder Wire-wrapped

    Artem Kashkanov10/07/2018 at 21:10 0 comments

    Started Relay computer logic block. Done instruction decoder part - It get 4-bit instruction number and decode it to a signal on a propel line. 

    All schematic eat 11 relays  and 5 diodes.

View all 63 project logs

Enjoy this project?

Share

Discussions

qwerty.lifirenko wrote 01/29/2019 at 20:34 point

Недурно так сделано

  Are you sure? yes | no

Dr. Cockroach wrote 04/16/2018 at 21:46 point

Yes, yours will be the first relay BF computer and I hope to have perhaps the first DTL BF computer :-)  has a nice sound to it :-) Your build is looking fantastic Artem :-)

  Are you sure? yes | no

Dr. Cockroach wrote 04/06/2018 at 22:11 point

I agree, well done :-)

  Are you sure? yes | no

Artem Kashkanov wrote 04/07/2018 at 18:44 point

Thanks!  One more stimulus to complete this project

  Are you sure? yes | no

Artem Kashkanov wrote 04/07/2018 at 18:42 point

I miss this :) Thanks for the link)

Very interesting ethics discussion, but I do not rename this project :) 

Perhaps I should not tell them that the DekatronPC would have BF instruction set too :)

  Are you sure? yes | no

Yann Guidon / YGDES wrote 01/15/2018 at 22:56 point

You have progressed well ! It's cool to see :-)

  Are you sure? yes | no

Artem Kashkanov wrote 01/16/2018 at 08:41 point

Yep! After I got pcb's I began to work actively on the project. I had to order them before instead of making them manually, but... :)

I want to have minimum working set (Adder+Latches+Registers+Memory) with MCU controlling for generating sequences for nearest April's fools day - there should be really cool article to reddit and geektimes resources.

  Are you sure? yes | no

Yann Guidon / YGDES wrote 01/16/2018 at 08:43 point

YAY !

  Are you sure? yes | no

Yann Guidon / YGDES wrote 11/06/2017 at 00:24 point

Hello :-)

Are there any updates lately ?

  Are you sure? yes | no

Artem Kashkanov wrote 11/12/2017 at 14:57 point

Yes) Today

  Are you sure? yes | no

Yann Guidon / YGDES wrote 11/12/2017 at 15:26 point

Awesome !

  Are you sure? yes | no

Yann Guidon / YGDES wrote 03/31/2017 at 18:47 point

Do you have estimates of the power supply requirements ?

  Are you sure? yes | no

Artem Kashkanov wrote 03/31/2017 at 19:52 point

Each base block would consume up to 5Volt and 2Amps. And Up to 2 Amp for memory board and vacuum indicator panel (approx 30pcs of soviet IV-6 tubes, which schematic is still in draft).

So 14Amps is not so much for this. Thanks to reed relays :-) I will use 25Amp 5Volt power supply.

  Are you sure? yes | no

Yann Guidon / YGDES wrote 03/31/2017 at 20:54 point

so it's in the range of 120W...

  Are you sure? yes | no

Dr. Cockroach wrote 03/31/2017 at 00:05 point

That is really awesome, I will be watching this :-)

  Are you sure? yes | no

AVR wrote 03/27/2017 at 14:23 point

this is so hardcore, much respect!!!

  Are you sure? yes | no

Yann Guidon / YGDES wrote 03/27/2017 at 10:17 point

A nice addition to #Relay-based projects :-)

  Are you sure? yes | no

Artem Kashkanov wrote 03/27/2017 at 11:50 point

Yes, very good idea.  :-)

  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