Building a minimal 8-bit microcomputer with AVR

Inspired by the 8-bit home machines of the ’80s, the Dan64 is a minimalistic microcomputer based on an ATmega328.

Our friends over at Hackaday recently brought to our attention a pretty neat barebones AVR microcomputer from IT professional Juan Martínez.


Inspired by the machines of the 80s like the ZX Spectrum and Commodore 64, Martínez built his own minimalistic 8-bit microcomputer — which he calls The Dan64 — using an Arduino Uno (ATmega328), the SPI SRAM, a few transistors and a PS2 driver for its keyboard. The single-board DIY device is capable of using its keyboard, outputting video to a screen, loading and running external programs, and even writing new programs that could be saved and ran later.

“A microcomputer without software is not very useful but I didn’t feel like writing much software myself using my own dialect of Basic or Forth so I decided to implement a virtual machine, specially because there was the option to use a cross compiler,” he explains.

To accomplish this, the Maker elected to use a 6502 virtual machine due to the availability of cross compilers that would let him compile and debug code for the microcomputer on his larger PC and then load it into the micro to run. In true 8-bit microcomputer style, programs are loaded and stored as audio files. However, Martínez does advise that the volume may need to be adjusted before doing so.


“DAN64 uses a variant of PSK to encode the programs. The data block starts with a sync pulse followed by a header that includes a magic number, the block length and a parity byte as rudimentary checksum. Then the actual data follows, ending in another parity byte,” he adds.

When all was said and done, the current version features composite video black and white output (256 x 192 resolution, 32 x 24 characters), 64KB of memory, external storage support via audio in/out, as well as a 6502 assembler and disassemble so that users can program the chip in its native assembly code.

Intrigued? We figured you’d be. Martínez has logged the entire build here, as well as made its code available on Github.

1 thought on “Building a minimal 8-bit microcomputer with AVR

  1. Pingback: Building an Apple II emulator on an Arduino Uno | Bits & Pieces from the Embedded Design World

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s