Skip to the content
4 layers76.7 × 76.7 mmOS816, the printed circuit board in 3D

An experimental single-board computer using the 65C816

Size
76.7 × 76.7 mm
Copper layers
4
Thickness
1.6 mm
Parts
40
Nets
84
Pads
314
Tracks, vias
1,153, 106
Pours
2
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
24 Apr 2021
Updated
4 Oct 2026

Overview

OS816 is an open-source printed circuit board by c0pperdragon, from the c0pperdragon/OS816 repository on GitHub. It is a 4-layer board of 76.7 × 76.7 mm with 40 parts on 84 nets, routed with 1,153 tracks and 106 vias.

It is built around the 74HC245D, 74AC573PC and 74HC04D, with the 74HC138 and 74HC574D among its other parts. Its parts include 8 capacitors, 8 ICs, 8 diodes, 4 resistors and 1 crystal. It belongs with the computers and single-board computers boards of this library.

Main components

5

README

README.md

OS816

A small single board computer using the 65C816 processor running at 10MHz, together with 512KB of RAM, 512KB of flash and a simple but effective I/O circuitry.

I made a small boot loader program for this hardware sitting in the top 4KB of flash to upload further code via a serial connection to avoid the need of swapping the Flash IC in and out of the board all the time.

User programs can be developed with the WDC compiler tool chain that provides an assembler as well as a C compiler confirming to the C89/90 standard (a.k.a ANSI C). I had to fix some bugs and add implementations for stdin/stdout over serial and file access to utilize the unoccupied area of the Flash memory. By now it is complete enough to run the "frotz" interactive fiction interpreter to play some of the old text adventure classics.

alt text

Minimum 65C816 setup

This processor is a tricky beast to use in a circuit as it has some unusual quirks that need consideration, especially when you want to use more than 64KB of address space.

  1. RD and WR signals need to be externally generated.
  2. Address bits 16-23 are multiplexed with the data bus.
  3. Difficult to use flat RAM and ROM areas, as both the stack as well as the initial boot code needs to be placed in bank 0.

Points 1 and 2 are just solved with some extra logic on the board. Point 3 is solved by using the emulation bit to force the top 8 address lines to $FF during startup time. Once the program is running it switches to native mode to make use of the full address range with flat regions for both RAM, IO and flash.

Memory map

fromtotype
00000007FFFFRAM
400000400000IO port
C00000C7EFFFUser flash
FFF000FFFFFFBoot loader flash

Many other ranges of the 16MB space are mirrors of some of the specified ranges here, but should not be used in order to allow future extensions.

Compiling for the platform

The free WDC compiler tools (running on Windows only) are used that include a C compiler, so it is easy to get most things done without directly touching the 65C816 machine code. The OS816 libraries are designed for the "large" memory model to evenly access static and dynamic data without bothering about banks, direct page and all the other intricate details of this specific CPU. Low level access to the hardware (essentially to the IO port, but also the flash programming functions) is provided by libraries that are directly written in machine code for best performance and because sometimes it would not be possible otherwise.

The necessary compiler and linker can be found at the Western Design Center's download page. Additionally you need a python 3 interpreter to run my extra build tools.

To see how all these tools should be used, have a look at the build scripts for the various examples provided.

Get the boot loader into the flash

This is a step you probably need to do only once, but it requires the use of a dedicated chip programmer, like the TL866-II Plus and its corresponding programming software. Building the OS816 libraries by executing the 'build.bat' script in the 'src' directory, will create some libraries in the 'bin' directory, and also the 'boot.hex' file which needs to be written to the flash IC. To avoid buying this not completely cheap programmer I could provide you with a pre-flashed IC for a reasonable price.

With the kit I sell at tindie, the flash IC comes already pre-programmed.

Serial interface

With its simple IO hardware, the CPU is in charge of all signal handling. With a 10MHz clock and hand-crafted machine code it was possible to implement a reliable serial communication that can run at 115.2kHz (1 start bit, 1 stop bit, no parity). But as the CPU can not do any communication when being busy with other things it is necessary that the communication partner must only send data when the CPU is prepared to receive it. A straight forward solution is the use of hardware flow control using RTS/CTS handshake lines. In my reference setup I use a cheap USB-to-UART interface board with support for these signals.

Pin locationOS816Partner
OUTPUT 0TXRX
OUTPUT 1RTSCTS
INPUT 7RXTX
INPUT 6CTSRTS

If your USB-to-UART interface does only have a CTS input, but no RTS output, this can also be made to work. Just pull the CTS input of the OS816 permanently to GND to disable flow control in the direction from the OS816 to your computer, assuming that your computer is fast enough so it can always process all incomming data.

Uploading

Compiling with the recommended tools will create a file in Intel HEX format. This file contains the "user code" which can be written to flash using the resident boot loader program. When starting up the machine with a serial terminal attached, the boot loader enters a command line interface. Here memory locations can be inspected or modified and also the content of the flash can be reprogrammed. After completely erasing the user flash area with the "!" command, you can conveniently dump a whole intel hex file into the terminal whose lines will be treated as individual programming commands. Once the user program is in the flash, the command "x" will start up this program. When the machine starts up with a user program already installed, the boot loader will give you 1 second time to enter the command line interface by pressing a key. Otherwise it will fire up the user program directly.

Overclocking

I have chosen this moderately fast 10MHz as the clock speed to always stay safely inside all the timing constraints and to make cycle-counting as simple as possible. But I was also able to run the board at 16MHz without problems. If you want to try this, you need to swap out the crystal and set the serial communication speed in your terminal program accordingly.

Contact

For questions regarding purchases of either a pre-programmed flash IC or a whole kit for self-assembly (using through-hole parts exclusively), please contact me directly at: reinhard.grafl (at) aon.at

For other questions that may also be of interest for other users, please create an issue ticket.

Parts

40
QtyValueFootprintReferences
8LED_SmallLED_THT:LED_D2.0mm_W4.8mm_H2.5mm_FlatTopLED0, LED1, LED2, LED3, LED4, LED5, LED6, LED7
4100nFCapacitor_THT:C_Disc_D3.0mm_W2.0mm_P2.50mmC1, C2, C3, C4
210kResistor_THT:R_Array_SIP9RN1, RN3
210kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR3, R4
233pFCapacitor_THT:C_Disc_D6.0mm_W2.5mm_P5.00mmC12, C13
1100uFCapacitor_THT:CP_Radial_D5.0mm_P2.50mmC11
110MHzCrystal:Resonator-2Pin_W7.0mm_H2.5mmY1
11MResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR2
11kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1
11kResistor_THT:R_Array_SIP9RN2
11uFCapacitor_THT:C_Disc_D3.0mm_W2.0mm_P2.50mmC8
165C816Package_DIP:DIP-40_W15.24mm_SocketU1
174AC573Package_DIP:DIP-20_W7.62mm_SocketU4
174HC04Package_DIP:DIP-14_W7.62mm_SocketU5
174HC138Package_DIP:DIP-16_W7.62mm_SocketU6
174HC245Package_DIP:DIP-20_W7.62mm_SocketU8
174HC574Package_DIP:DIP-20_W7.62mm_SocketU7
1AS6C4008Package_DIP:DIP-32_W15.24mm_SocketU2
1Conn_01x03Connector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_VerticalJADR1
1Conn_01x20Connector_PinSocket_2.54mm:PinSocket_1x20_P2.54mm_VerticalJAUX1
1Conn_01x20_MaleConnector_PinHeader_2.54mm:PinHeader_1x20_P2.54mm_VerticalJIOPWR1
1SST39SF040Package_DIP:DIP-32_W15.24mm_SocketU3
1SW_PushButton_Switch_THT:SW_PUSH_6mm_H4.3mmRESET1

The 36 most common of 40 parts.

More from c0pperdragon/OS816

1
  • 4 layers40.6 × 17.8 mmRamboard, the printed circuit board in 3D

    Ramboard

    c0pperdragon/OS816

    An experimental single-board computer using the 65C816

    5 parts28

Similar boards

  • 2 layers233.4 × 280 mmCft dfp, the printed circuit board in 3D

    Cft dfp

    alexiosc/cft

    The CFT homebrew minicomputer

    227 parts6GPL-3.0
  • 2 layersBreadBin, the printed circuit board in 3D

    BreadBin

    c0pperdragon/BreadBin

    A CPU made of 7400 logic on breadboards - inside a bread bin ;-)

    45 parts18
  • 2 layers106.7 × 83.8 mmVdu sv, the printed circuit board in 3D

    Vdu sv

    zuiko21/minimOS

    Scalable OS for 6502/65816

    40 parts23MIT
  • 2 layers208 × 110 mm8 16 computer 2, the printed circuit board in 3D

    8 16 computer 2

    halfburnttoast/TCPU816-v1

    Version 1.1 of my 8-bit, TTL computer.

    120 parts21
  • 2 layers284.9 × 96.5 mmFella, the printed circuit board in 3D

    Fella

    agkaminski/FellaPC

    DIY 6502 all-in-keyboard personal computer

    115 parts2CC0-1.0
  • 4 layers188 × 128.3 mmZAK180, the printed circuit board in 3D

    ZAK180

    agkaminski/ZAK180

    DIY all-in-keyboard computer featuring Z180 and floppy drive

    140 parts
  • 2 layers259.7 × 80 mmSteuereinheit, the printed circuit board in 3D

    Steuereinheit

    stonedDiscord/Steuereinheit

    Steuereinheit 68000

    348 parts

Questions

How big is the OS816 PCB?

It measures 76.7 × 76.7 mm and has 4 copper layers, 1.6 mm thick.

What parts does the OS816 use?

40 parts, built around the 74HC245D, 74AC573PC, 74HC04D and 74HC138. 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 OS816 KiCad files?

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

Can I use the OS816 design in my own project?

Its repository states no licence, so its author keeps all rights: ask c0pperdragon before reusing the design.