Skip to the content
2 layers99.1 × 86.4 mmHD6301V1 thing, the printed circuit board in 3D

I recently received a few samples of a Hitachi HD6301V1 in a DIP-40 package. It's a 1MHz 8bit CPU derived from the Motorola 6801 with a few extra instructions.

Size
99.1 × 86.4 mm
Copper layers
2
Thickness
1.6 mm
Parts
60
Nets
88
Pads
348
Tracks, vias
1,116, 97
Pours
2
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
2 Oct 2022
Updated
6 Apr 2026

Overview

HD6301V1 thing is an open-source printed circuit board by lgugelmann, from the lgugelmann/HD6301_thing repository on GitHub, published under the MIT licence. It is a 2-layer board of 99.1 × 86.4 mm with 60 parts on 88 nets, routed with 1,116 tracks and 97 vias.

It is built around the SLG46826G, 74HCS08PWJ and 74HCT573D, with the APX811-46UG, SN74LVC1G14DRL and BAT54W among its other parts. Its parts include 15 resistors, 14 capacitors, 9 ICs, 8 connectors and 3 diodes.

Main components

7

README

README.md

Exploring the HD6301V1

I recently received a few samples of a Hitachi HD6301V1 in a DIP-40 package. It's a 1MHz 8bit CPU derived from the Motorola 6801 with a few extra instructions. It has an onboard mask-programmed 4k ROM, 128 bytes RAM, and 4 I/O ports that can be used as some combination of data or address bus, or I/O lines. It also comes with an onboard serial interface. Overall it's a really neat chip!

  • The datasheet for the HD6301v1 can be found e.g. here.
  • An extensive handbook for the entire Hitachi 6301/6303 series of CPUs, including copies of all datasheets, can be found on archive.org.

This repository contains schematics and code to build a retro-inspired computer around this chip. The idea is to build this off of modular components and a shared bus so we can start small and build up piece by piece.

Currently I have a working device with Arduino-like ease of programmability, PS2 keyboard input, HDMI video output. It's complete enough for a working 'Snake' clone that can be played over both serial console and video out.

Getting started on a breadboard

The architecture is quite simple and similar to other 8-bit CPUs like the 6502. There is one 16-bit address bus, one 8-bit data bus, a clock line, a read/write line, and an interrupt line.

One way in which this chip departs from e.g. a 6502 is that it has several different 'modes' that affect the memory layout and external buses. Mode selection is done at startup using the first 3 lines of port 2. After startup these lines can be reused for other purposes if desired. Mode 1 (non-multiplexed) breaks out all 16 address and 8 data lines. Mode 5 reduces the external address bus to 8 lines. Mode 0/2/4/6 multiplex the data bus: at the beginning of the cycle the 8 low address bits are presented, then an address latch signal fires, then the 8 data bits are set. This frees up one 8-bit port for I/O. Mode 7 has no external buses at all. Mode 0/5/6/7 map the internal ROM to the top of the address space. It's inaccessible in 1/2/4. Mode 0 ('test mode') has a special handling for the first read of the startup vector addresses at $FFFE/$FFFF: instead of reading them from ROM (as it would in any subsequent read) they are read over the external bus. This allows one to override the ROM-interal startup vector while still keeping it accessible otherwise.

By selecting mode 1 at startup it's easy to get this chip to work on a breadboard by just adding some external parallel RAM / ROM with a bit of address decoding to select which one to access.

The chip has an internal 4x clock-divider. To get it to run at the max 1MHz you need a 4MHz oscillator. I had no stability issues on a breadboard even at max frequency.

The chip requires a minimum 100kHz to run (400kHz oscillator). Going below makes it unstable.

Random hardware notes

This is a collection of random notes about the hardware that are either well-hidden in the datasheet or not documented at all.

  • The IRQ line is not specified to be open-drain. It's likely not.
  • The reset and standby pins are drawn with Schmitt-trigger inputs in the datasheet.
  • The datasheet recommends 74'373 chips to latch the address bits in multiplexed mode. The '573 is probably a better choice for layout reasons as it has the same functionality but instead of having in/out pins next to each other it has all 8 inputs on one side and the 8 outputs on the other.
  • P21 is not a general purpose I/O pin (even after mode selection). It is either a general input, or timer output.
  • The mode selection / P2 multiplexing circuit in the datasheet would probably not work with a modern '4053 chip. The one in the datasheet has minimum switching times higher than the required hold times on the mode selection pins. Modern '4053 are faster.
  • Reset and power-up are a bit finicky. The datasheet says reset must be held low for at least 20ms at power-on time. That's good advice. Without the wait time the MCU seems to start working a hair before the power rail reaches 3V. The clock and data / address lines have their 'high' bits at that voltage too. At that point in time a typical 5V ROM might not even have powered up yet and you get all sorts of fun non-deterministic behavior. Something like a Diodes Inc. APX811-46 is a great way to satisfy that requirement as it keeps reset low after power-up for 100-200ms. Alternatively, the datasheet seems to suggest that the reset line has a Schmitt-trigger input. That would make an RC circuit with a long time constant also workable. Have not tried that.
  • Exiting the standby mode requires holding reset low 20ms longer than STBY.

The mask-programmed ROM

The samples I have come mask-programmed with some unknown code. The internal_rom folder contains a dump of that ROM, some very preliminary disassembly, and details on how to do such a dump using the 'test mode' of the chip.

The ROM configures the data direction registers of all 4 I/O ports to a combination of inputs/outputs. This suggests that it was meant to work in single-chip mode. The MC6801 was popular in automotive applications - maybe this one was meant to go into a car too.

Contents of the repository

Hardware modules

On the hardware side the repository contains

  • The main CPU board. This can be used as a fully functional standalone single-board computer with 32kB RAM and ROM.
  • A programming board to make programming the main CPU board as easy as programming an Arduino. This is a Raspberry Pi Pico-based board for USB connectivity to a host computer. It can put the main CPU into standby, take over the bus, and read or write to RAM/ROM as needed.
  • A "video chip" board with HDMI output. This is another Pi Pico-based board that implements various graphical modes like a 100x40 or 100x75 text terminal with 6-bit color for each foreground and background. On the HDMI side it's 800x600 pixel. On the bus it presents 64 write-only registers that implement various commands like setting characters, colors, or doing cursor moves.

Currently in progress are:

  • An audio board based around the OPL3 FM synthesis chips.

Software

HD6301 programs

The 'asm' folder contains software to run on the HD6301. There is a monitor program for debugging, running other programs, and to provide some basic libraries for PS2 keyboard handling and more.

There are also various test programs as well as a 'Snake' clone and a simple audio sequencer.

See the docs in the 'asm' folder for more details.

Emulator

The emulator folder contains a full-system emulator for the HD6301V1 computer. It emulates the CPU, I/O, graphics, sound, keyboard, and SD card. See emulator/README.md for details on building and running it.

The emulator includes an extensive test suite with ~314 declarative CPU instruction tests (in emulator/testdata/instructions/) and GoogleTest-based peripheral tests. Run ctest from the build directory to execute all tests.

Supporting software
  • Much of the glue logic (address decoding, PS2 serial/parallel decoding, etc.) is implemented with GreenPAK SLG46826 programmable logic chips (see below). The 'greenpak' folder contains a simple python script to program these chips via i2c using an FTDI232h breakout board.
  • The 'pico_programmer' and 'pico_graphics' folders contain the respective software for those those chips. The pico programmer has two parts: one to go onto the Pi Pico and a Python program to interface with it via serial port to do the actual programming.

Bus documentation

All modules communicate over the following shared bus.

Pin numberFunctionNotes
1..4Data bits D0..D3Bus users need to coordinate who's driving
55VOnly one device is allowed to power this
6GND
7..10Data bits D4..D7Bus users need to coordinate who's driving
11..14Address bits A0..A3Bus users need to coordinate who's driving
153.3VOnly one device is allowed to power this, optional
16GND
17..24A4..A11Bus users need to coordinate who's driving
25GND
263.3VOnly one device is allowed to power this, optional
27..30A12..A15Bus users need to coordinate who's driving
31RXSerial receive as seen from a device on the bus
32TXSerial transmit as seen from a device on the bus
33CLKBus clock
34R/WBRead is high
35GND
365VOnly one device is allowed to power this
37C1Control line 1, up to the exact devices on the bus to decide what this does.
38C2Control line 2, up to the exact devices on the bus to decide what this does.
39RESETBActive low reset. Open drain. Pullup on CPU board.
40IRQBActive low interrupt. Open drain. Pullup on CPU board.

This is 40 pins as it's easy to find 40pin IDC connectors and ribbon cables. The power / GND pins are mirrored so that an upside-down connector has them in the same place.

There are no chip select pins. Additional boards that want to fit into specific parts of the memory map need to decode the address pins on their board and coordinate with everyone else. Programmable GreenPAKs make this easy enough.

Pins are all push-pull unless stated otherwise. Any shared use needs to be coordinated.

Logic levels are assumed 5V CMOS.

This is not how one designs for signal integrity - but it works well enough for me. The user-friendliness of getting a ribbon cable to a breadboard to prototype the next module is the overriding concern here.

Bus details for HD6301 board

Pin numberFunctionNotes
38STBYBActive low standby signal. For Pico Programmer to make HD6301 let go of the bus.

Work log

This section contains possible projects and the state of the current in-progress pieces of work.

Faster SD card reads

The next goal is to get faster SD card reads as described in asm/README.md. This means emulating the schematic in io_board in the emulator.

Tasks:

  • Emulator:
    • Create basic shift register output support in W65C22
    • Figure out how to emulate clock inversion and delay
    • Emulate a serial-in, parallel-out shift register like 74'164 series.
    • Connect the above two pieces in-between the W65C22 and the current SPI emulation.
  • ASM
    • Update the code to use SR instead of bit-banging on a port for SPI
  • Hardware
    • Actually try the approach in real hardware [done, down to ~10ms]
    • Write out schematics and design the board

Documentation and repository cleanup

Any day now! This README file is badly outdated vs the state of the project. It doesn't mention the emulator at all for example. The various hardware modules should also be listed and better documented.

Tasks:

  • Pick a standard for how to structure the individual module folders and stick to it
    • Put a README.md with each module, and document all known hardware issues.
    • I don't like the catch-all greenpak folder. That should go with the modules.
  • Get rid of the ft231x_programmer stuff. It's an early idea that's now badly outdated.
  • Rename board to something better.
  • Add README.md to the tools folder.
  • Update this file with a better overall description. It's very very out of date.

General ASM improvements

Tasks:

  • Define and implement a standard for error reporting. With FAT16, MIDI decoding etc there is some complex logic that could benefit from a standard way to pass around errors and refer to standard error strings for them.

FAT16 improvements

The current FAT16 code is read-only and is limited to using only one sector of FAT (so only 254 clusters). This is not an actual limitation yet. The APIs are a bit wonky, the error reporting inconsistent.

Tasks:

  • Implement write support
    • Goal: Snake should get persistent high scores.
  • Implement support for using more than just the first FAT sector

Expanding the programmer board to be a runtime monitor thing too

Right now the programmer board has the ability to read almost the entire bus (data, address, IRQ), but we're not doing anything with that. An idea would be to also plumb CLK back to the Pico and very quickly sample the bus on clock edges. Wiring-wise this should be possible on the existing board by changing the GreenPAK setup - the C1 pin is unused on the Pico side.

It's not clear that we can do this fast enough (easily), but it's worth trying out. It's probably very much possible to do the hard way as we can bit-bang at 400+MHz for the DVI out using PIO.

Some math:

  • The internets claim that Pico interrupt latency can be brought down to 100-200ns. A busy-loop on the pin state ~70ns.
  • The LVC245 in use take 10ns max to go from OE to data available.
  • No idea how fast one can read 8 data pins - but probably tens of ns. Say 50 as an upper bound.

If we take some upper bounds we get 200 trigger + 3 * (10 + 50) ~= 400ns. We have 500ns budget between clock edges so this sounds doable. Afterwards we have 500 more ns to do some data processing until the next interesting edge.

Assume we have ~100k of RAM free (total 264k, seems reasonable). If we store 3 bytes per clock cycle we get roughly 30ms of data in a buffer before we run over. In total we generate 3MB/s. Getting those off the Pico in a continuous fashion does not seem doable without trickery. The theoretical maximum is 12Mbit/s, or 1.5MB/sec. In practice folks seem to get somewhere between 500 and 850 KiB/sec. The minimum information needed to code the instructions would be: instruction, address (if needed), data. A 3-byte instruction typically takes 4 cycles and would have 4 bytes of data total (1 instruction, 2 address, 1 data). We'd get a factor 3 compression here if that's the average case. It might just barely be possible to stream things continuously.

Tasks:

  • Rework the GreenPAK setup to get the clock back to a Pico input pin.
  • See how fast the IRQ triggers and whether we can sample the bus on time.

Parts

60
QtyValueFootprintReferences
1110kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR2, R3, R7, R8, R9, R10, R11, R12, R13, R14, R15
10100nCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC1, C2, C3, C4, C5, C6, C7, C8, C9, C14
44.7uCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC10, C11, C12, C13
2100kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR4, R5
23.3kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR1, R6
2LEDLED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolderD1, D2
2SLG46826Gimported_footprints:SOP65P640X120-20NU3, U5
174HCS08Package_SO:TSSOP-14_4.4x5mm_P0.65mmU9
174HCT573Package_SO:SOIC-20W_7.5x12.8mm_P1.27mmU6
18bit_thing_bus_connectorConnector_IDC:IDC-Header_2x20_P2.54mm_HorizontalJ5
1APX811-46Package_TO_SOT_SMD:SOT-143_HandsolderingU1
1BAT54WPackage_TO_SOT_SMD:SOT-323_SC-70_HandsolderingD3
1Bankingimported_footprints:SW_DS04-254-1L-02BKSW2
1CXO_DIP8Oscillator:Oscillator_DIP-8X1
1F1_resetown_footprints:PinHeader_1x02_P2.54mm_Vertical_minimalJP1
1F2_nmiown_footprints:PinHeader_1x02_P2.54mm_Vertical_minimalJP2
1HD6301V1Package_DIP:DIP-40_W15.24mm_SocketU4
1IS62C256ALimported_footprints:SOIC127P1210X305-28NU7
1KMDGX-6S-BSimported_footprints:KMDGX6SBSJ1
1LOGOown_footprints:smyrill_logoG***
1LOGOown_footprints:smyrill_logo_smallG***
1P1_connectorown_footprints:PinHeader_2x06_P2.54mm_Horizontal_no_graphicsJ3
1ResetButton_Switch_SMD:SW_SPST_TL3305ASW1
1SN74LVC1G14DRLPackage_TO_SOT_SMD:SOT-353_SC-70-5_HandsolderingU2
1SST39SF010Package_SO:TSOP-I-32_12.4x8mm_P0.5mmU8
1USB_B_Microimported_footprints:AMPHENOL_10118194-0001LF_MICRO_USB_improvedJ6
1memmap_i2cown_footprints:PinHeader_1x02_P2.54mm_Vertical_minimalJ4
1prog_LEDown_footprints:PinHeader_1x02_P2.54mm_Vertical_minimalJ7
1ps2_i2cown_footprints:PinHeader_1x02_P2.54mm_Vertical_minimalJ2
1pwr_LEDown_footprints:PinHeader_1x02_P2.54mm_Vertical_minimalJ8

The 56 most common of 60 parts.

More from lgugelmann/HD6301_thing

6
  • 2 layers99.1 × 86.4 mmOpl3 sound, the printed circuit board in 3D

    Opl3 sound

    lgugelmann/HD6301_thing

    I recently received a few samples of a Hitachi HD6301V1 in a DIP-40 package. It's a 1MHz 8bit CPU derived from the Motorola 6801 with a few extra instructions.

    58 parts3MIT
  • 2 layers99.1 × 86.4 mmIo board, the printed circuit board in 3D

    Io board

    lgugelmann/HD6301_thing

    I recently received a few samples of a Hitachi HD6301V1 in a DIP-40 package. It's a 1MHz 8bit CPU derived from the Motorola 6801 with a few extra instructions.

    43 parts3MIT
  • 2 layers99.1 × 86.4 mmMidi board, the printed circuit board in 3D

    Midi board

    lgugelmann/HD6301_thing

    I recently received a few samples of a Hitachi HD6301V1 in a DIP-40 package. It's a 1MHz 8bit CPU derived from the Motorola 6801 with a few extra instructions.

    42 parts3MIT
  • 2 layers99.1 × 86.4 mmProgrammer board, the printed circuit board in 3D

    Programmer board

    lgugelmann/HD6301_thing

    I recently received a few samples of a Hitachi HD6301V1 in a DIP-40 package. It's a 1MHz 8bit CPU derived from the Motorola 6801 with a few extra instructions.

    30 parts3MIT
  • 2 layers99.1 × 86.4 mmPico graphics board, the printed circuit board in 3D

    Pico graphics board

    lgugelmann/HD6301_thing

    I recently received a few samples of a Hitachi HD6301V1 in a DIP-40 package. It's a 1MHz 8bit CPU derived from the Motorola 6801 with a few extra instructions.

    28 parts3MIT
  • 2 layers99.1 × 86.4 mmBoard template, the printed circuit board in 3D

    Board template

    lgugelmann/HD6301_thing

    I recently received a few samples of a Hitachi HD6301V1 in a DIP-40 package. It's a 1MHz 8bit CPU derived from the Motorola 6801 with a few extra instructions.

    7 parts3MIT

Similar boards

  • 4 layers220 × 160 mmQds cv, the printed circuit board in 3D

    Qds cv

    cnpem-emi/qds-cv-hw

    Quench detection system for a single superconducting coil working in the Vertical Cryostat.

    403 parts
  • 4 layers66.8 × 60 mmIMD SAFETY 2024, the printed circuit board in 3D

    IMD SAFETY 2024

    PUT-Motorsport/PUTM_EV_IMD_SAFETY

    Bender Insulation Monitoring Device Shutdown Circuit driver, based on TW & SS project

    100 parts
  • 2 layers190 × 151.6 mmFM Towns Pico Adapter, the printed circuit board in 3D

    FM Towns Pico Adapter

    cyo-the-vile/FMT-ATX-TOWER

    A modification to revive a dead FM Towns tower model

    24 parts6
  • 4 layers144 × 150 mmKepler x, the printed circuit board in 3D

    Kepler x

    kunichiko/X68k-KeplerX-PCB

    186 parts4MIT
  • 2 layers36.5 × 19.9 mmGreenpak pmod, the printed circuit board in 3D

    Greenpak pmod

    Novakov/greenpak-pmod

    21 parts
  • 2 layers60 × 75 mmUBike, the printed circuit board in 3D

    UBike

    nategreco/uBike

    The Universal Bike Controller is an open-source project aimed at providing a drop-in replacement for the factory console on NordicTrack® S-series exercise bikes

    53 parts22GPL-3.0
  • 2 layers68.6 × 53.3 mmGergotron, the printed circuit board in 3D

    Gergotron

    expipiplus1/gergotron

    33 parts1

Questions

How big is the HD6301V1 thing PCB?

It measures 99.1 × 86.4 mm and has 2 copper layers, 1.6 mm thick.

What parts does the HD6301V1 thing use?

60 parts, built around the SLG46826G, 74HCS08PWJ, 74HCT573D and APX811-46UG. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the HD6301V1 thing KiCad files?

From the lgugelmann/HD6301_thing repository on GitHub, at the commit this page was made from: the board is board/HD6301V1_thing.kicad_pcb and its schematic board/HD6301V1_thing.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the HD6301V1 thing design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).