DIP-8 uses EEPROMs for arithmetic in a 4 MHz homebrew computer

TTL, EEPROM, homebrew CPU

This is the read-only HTML version. For the full Visual Space experience, open the app.

TTL computer, circuit board —

TTL computer, circuit board —

Source: DIP-8 TTL Computer on Hackaday.io · kaimac

CPU design, compiler

Lookup tables handle both arithmetic and instruction decoding in kaimac’s custom 8-bit computer. That choice also leaves room to reshape the instruction set around software: an experimental C compiler backend prompted new operations before the hardware became a working single-board machine.

👍 1

DIP-8 replaces a conventional microprocessor with 7400-series logic and EEPROMs—including two memory chips that do the arithmetic. Creator kaimac documented the custom 8-bit computer on Hackaday.io, describing it as the first CPU design to leave their notebook. The interesting choice is where the complexity goes: lookup tables handle arithmetic and instruction decoding, while software experiments help shape what the machine can do.

The project was created on June 29, 2022. By November that year, kaimac reported a working multi-board computer running at 4 MHz; the latest supplied update, dated January 16, 2023, reports that a consolidated PCB had arrived and was working.

Memory chips do the arithmetic

DIP-8 uses two 64K × 8 EEPROMs as its arithmetic logic unit, with each chip generating four bits of the result. Another three EEPROMs decode instructions into 23 control lines. Kaimac chose Winbond W27C512-45 devices with a stated 45 ns access time, making memory-based logic practical at the intended clock speed.

The August 16 ALU design log explains an economical detail: both arithmetic EEPROMs contain the same image. One address pin is held low on one chip and high on the other, allowing that shared image to serve two different roles.

A Python script generates the table for 16 internal operations. These include addition, subtraction, Boolean logic and pass-through operations, as well as helper operations used by the instruction decoder. Passing a value through unchanged matters here because registers can only be read through the ALU. Even moving data needs an arithmetic-unit operation.

The machine has six general-purpose 8-bit registers, four of which also form two 16-bit pairs. Its stack pointer and program counter are 16-bit too. A hidden carry flag helps bridge that width difference: when an instruction updates a 16-bit address in two steps, it can carry information between the low and high bytes without changing the carry, zero and negative flags visible to the program. Stack housekeeping therefore needn’t disturb the result of an earlier comparison.

A C compiler pushed the instruction set further

An unexpected software detour made the programmable decoder more useful. In the August 8 compiler update, kaimac described starting a DIP-8 backend for vbcc after finding GCC and LLVM too large a task for this experiment.

The backend was incomplete: function calls, structures and arrays weren’t working properly yet. It could, however, compile a C version of the Byte sieve benchmark. Kaimac reported that this version ran only 20% slower than their hand-written assembly, while occupying 50% more space. That is a result for one test, not a general measure of compiler quality.

More importantly, writing the backend exposed instructions the architecture needed. Kaimac added signed comparisons, rotate-right support, more 16-bit arithmetic and operations on variables in memory. The hardware design and its software were developing together, rather than treating the instruction set as untouchable once drawn.

The emulator supported that feedback loop. A July 24 update describes changing it to use the same decoder ROM images intended for the physical machine. That kept instruction-set changes synchronized and allowed cycle counting, although kaimac reported that this version of the Python emulator was too slow to run in real time.

From a backplane to one board

By November 3, the CPU had RAM, program EEPROM and a 16550 UART attached. An AVR, previously used for debugging, remained as the 4 MHz clock source—not as the processor executing DIP-8 programs. Kaimac reported that the Mandelbrot test took five seconds on this hardware.

The modular eurocard-and-backplane arrangement had made incremental construction convenient, but it also hid many of the chips. Kaimac wanted most of the computer on one motherboard, with connectors for expansion.

The November 8 single-board plan also proposed a better memory map. A switchable 16K window would expose pages of RAM, ROM or expansion space, making more storage accessible than the 16-bit address bus could select at once. The proposal used a UART output port for bank selection. A future graphics card was a possibility, not an implemented feature.

The January 16, 2023 update confirms that the new PCB worked, but gives no detailed account of its final memory banking or peripherals. A cooperatively multitasked operating system and a custom higher-level language remained ambitions in the project overview.

For another CPU builder, the most reusable idea is the shared decoder image: it gives the hardware and emulator a common definition of instruction behavior. The supplied DIP-8 repository link is a starting point for exploring the design. The useful question to carry forward is how much of a custom machine’s behavior can be defined once—and then reused across its logic, tools and tests.

Source: DIP-8 TTL Computer

Hardware

3 Followers

A workshop for electronics and physical computing. Share circuits, boards, tools and prototypes; work through measurement and debugging, compare components, and document the choices that turn an idea into working hardware.

Visual Space is built for projects like this—where creators collaborate, organize goals, and grow communities around real work.