Skip to content

Brainfuino [-]+.

Yes, this is real. Yes, it runs Brainfuck natively in silicon. No, we will not apologize.

  • Launch Web Terminal


    Zero-Install Web Serial Terminal

    Connect directly to Brainfuino from Chrome, Edge, or Opera. Upload code, adjust clock speeds live, and run programs with 1 click.

  • Brainfuino Rev 1.1 Assembled Hardware


    Rev 1.1 Hardware

    Lattice MachXO2 FPGA soft-processor paired with an STM32F072 coprocessor, parallel SRAM tape memory, and Flash ROM.

  • Brainfuino in 3D Printed Case Running


    Custom 3D-Printed Enclosure

    Protective portable case with status LED illumination, single-screw assembly, and exposed programming cutouts.


What is Brainfuino?

You may have seen the Brainfuino Hackaday project released during COVID in 2021. Originally created by Eduardo Corpeño, it's a programming board that runs the esoteric programming language Brainfuck completely in hardware. The language is extremely minimal, with just 8 characters, yet it is entirely Turing complete. When uploading code to the Brainfuino, there is no conversion or compression, the ascii brainfuck characters are saved into rom exactly as they are written. Programming in Brainfuck is difficult, hilarious, and rewarding, and doing it with Brainfuino is even better.


Two Processors: Pure Hardware and Quality of Life

There are two processors on the Brainfuino, the actual Brainfuck based soft processor implemented in hardware on the Lattice FPGA, and the STM32 which makes the whole thing user "friendly". Since the FPGA is configured basically as an old fashioned Harvard CPU, instructions move through the soft processor in a continuous stream of parallel bits, these flash into and out of existence, and the STM32 is there to catch them and serialize them so you can use it with a modern PC instead of an ancient parallel based terminal interface. The FPGA does all the hard work here though. When programs are run, all the output is being generated real time in hardware via the FPGA. The FPGA reads bytes of data from good old parallel flash program memory, and when it encounters bytes representing one of the 8 ascii characters used in Brainfuck it executes that with its built in soft processor based instruction set according to the character. Since it's a harvard style cpu, it also uses parallel based RAM to read and write data to and from for computation purposes. The STM32 uses its hardware timer to drive a clock pin to the FPGA at speeds from 10 Hz up to 12 MHz. You may wonder if the STM32 is overkill, and your curiosity is valid, it probably is overkill, but by leveraging a separate microcontroller for these quality of life improvements, it allows the Brainfuck soft processor implemented in Verilog on the Lattice FPGA to remain pure and stay true to its purpose to compute Brainfuck. We leave the rest to the STM32: Usb communication, parallel to serial conversion, program memory flushing and prep, variable clock speed control, and an interactive terminal interface.

flowchart TD
    ROM["256 kB Parallel ROM<br/>(Raw ASCII Brainfuck Code)"]
    RAM["128 kB Parallel RAM<br/>(The Physical Tape Memory)"]

    FPGA["Lattice MachXO2 FPGA<br/>'brainfuck_uP' Soft-Processor Core<br/>Native ASCII State Machine"]

    STM32["STM32F072 Coprocessor<br/>(Host Interface & Clock Synth)<br/>Clock Generation • USB Serial • Flash Burner"]

    SHIELD["Arduino-Style Headers<br/>Parallel 8-bit In/Out & Handshakes<br/>(Via 74ALVC164245 Level Shifter)"]

    ROM <-->|18-bit PC Address and 8-bit Instruction| FPGA
    FPGA <-->|17-bit Pointer and 8-bit Bidirectional Tape| RAM
    STM32 -->|Clock Pulses: 10 Hz to 12 MHz| FPGA
    STM32 <-->|Reset and Serialized ASCII Stream| FPGA
    STM32 -.->|Flash Programming Bus| ROM
    FPGA <-->|3.3V to 5V Level Shifter| SHIELD

Why Brainfuino?

As to answer the question of why? Well: The challenge. And to quote the original author Eduardo Corpeño, with the Brainfuino you get "bragging rights for writing code that works! You certainly won't get that from the Arduino."


What's in Revision 1.1

My revision 1.1 of the Brainfuino has: - Improved clock routing to the FPGA soft processor using an FPGA pin optimized for clock input rather than a generic GPIO - Proper VBus to 3.3v connection on the STM32 increasing STM32 clock stability - JLCPCB compatible parts list and reduced cost by switching to prestocked "basic" components. - USB-C connectivity! - A nifty 3D printed case - KiCad design files (migrated from the original Autodesk Eagle)

See the original demo video: Brainfuino: Hardware Brainfuck Processor (YouTube)


Project Origins & The Team

The Brainfuino project is the brainchild of Eduardo Corpeño, a brilliant electrical and computer engineer, FPGA specialist, and university professor of 20+ years:

Today, the project is maintained and expanded by:

  • Matthew Archibald (Hardware): Hardware redesigns (Rev 1.1 in KiCad), PCB fabrication, 3D printable case engineering, and documentation.
  • Thalia Archibald (Software): Software architecture, and curator of the bfcorpus repository.

Explore the Docs

Use the left sidebar to navigate the guides:

  • Quick Start Guide: Connect via USB-C and run your first Brainfuck program in seconds with the Web Terminal.
  • Web Serial Terminal: Browser-based terminal features, shortcuts, and drag-and-drop code uploading.
  • Terminal Commands & Controls: Dynamic clock speed stepping, hotkeys, and the interactive VT100 configuration menu.
  • Configuration Menu: Multi-page raspi-config style menu, onboard Flash library, and color customization.
  • Hardware & PCB: Schematic walkthrough, BOM, level shifting, and physical header pinout.
  • FPGA Soft-Processor: Deep dive into the brainfuck_uP Verilog core, state machine, and bracket depth counter.
  • STM32 Firmware: Coprocessor architecture, clock generator, USB CDC, and memory flashing.
  • 3D Printed Case: Printing specs and assembly instructions.
  • Brainfuck Guide & Examples: Language cheat sheet, hardware execution quirks, and tested sample programs.