Skip to the content
PCBKitNew board
4 layers100 × 100 mmCompactFlash, the printed circuit board in 3D

Minimally complex Z80 computer while still being usable

Size
100 × 100 mm
Copper layers
4
Thickness
1.6 mm
Parts
49
Nets
117
Pads
282
Tracks, vias
312, 19
Pours
5
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
15 Dec 2023
Updated
3 Jun 2024

Overview

CompactFlash is an open-source printed circuit board by ashlin4010, from the ashlin4010/simple_Z80_computer repository on GitHub, published under the MIT licence. It is a 4-layer board of 100 × 100 mm with 49 parts on 117 nets, routed with 312 tracks and 19 vias.

It is built around the CH340N. Its parts include 20 resistors, 9 diodes, 9 connectors, 3 ICs and 2 capacitors. It belongs with the Raspberry Pi (Linux) boards of this library.

Main components

1

README

README.md

Simple Z80 Computer

The goal of this project was to build a minimally complex Z80 computer capable of running CP/M. While I haven not yet ported CP/M, it should be capable of it.

This system is made of two boards, the upper board has the the CPU, RAM, ROM and UART. The lower board has Composite Video, USB Keyboard, USB to serial converter, Compact Flash and 8 indicator LEDs.

If you want to have a better understanding of how this system works you checkout the schematics or my blog.

Screenshot

Specifications

  • 64K Static RAM
  • 32K ROM
  • Z80 @ 4Mhz
  • USB Keyboard via Raspberry Pi Zero
  • Composite Video via Raspberry Pi Zero
  • HDMI Video via Raspberry Pi Zero
  • Support for 27256 or AT28C256 ROM
  • Compact Flash
  • 8 LED indicators
  • Built-in USB to serial converter @ 9600 baud

Raspberry Pi Zero (Optional)

As part of the project I wanted to have a composite video output however, there was not sufficient space to have a native composite video interface. As an alternative I have used a Raspberry Pi Zero running pigfx which acts as a terminal emulator providing a USB keyboard input and composite video output.

Raspberry Pi Installation

To the underside of the PCB solder in the Raspberry Pi using the pins from a 2.54mm header so that the Pi is flat against the PCB. Only the circles and yellow need to be soldered. Back on the top side of the PCB you will see some pads that need to be connected to some test points on the Pi, connect them using some wire cuts offs.

Screenshot

ROM Jumper Configuration

This system supports the W27C257, 27256 and AT28C256 ROM chips. The W27C257 and 27256 are read-only and need to have jumpers set in the topmost position. The AT28C256 is read/write and needs two jumpers in the lower position.

Screenshot

Software Compiler

My assembler of choice for this project has been the Retro Assembler by Peter Tihanyi. There is a VSCode plugin available.

Serial Bootloader

The early version of the monitor includes a utility "sboot" that will fetch data over the UART and store it in the lower 32k and jump to the start of memory.

For the serial bootloader to work you must be running the server utility that will provide the files for sboot to load. You can find it in software/server.

The sboot command can be configured to auto start on boot by setting UART_AUTO_BOOT to True in monitor.z80.asm and re-building.

Memory Address Space

This system has 64K of RAM and 32K of ROM. However, the Z80 can only ever address 64K at a time. When the system starts up the top 32K of memory maps to RAM, and the lower 32K maps to ROM. The system can, when ready, swap the lower 32K of ROM for RAM.

Screenshot

IO Address Space

AddressDeviceR/WDescription
0x10SIOR/WUART A Data Register
0x11SIORUART A Status Register
0x12SIOR/WUART B Data Register
0x13SIORUART B Status Register
0x208-bit LatchWLED Output
0x30-37Compact FlashR/WCompact Flash Registers
0x70Flip-flopWRAM/ROM Page

Schematics

Z80 Main Board Schematics - PDF

Screenshot

Compact Flash & Raspberry Pi Board - PDF

Screenshot

BOM

Z80 Board

IdDesignatorFootprintQuantityDesignationSupplier and ref
1J2PinHeader_1x04_P2.54mm_Vertical1Conn_01x04_Male
2C3,C2,C4,C5,C17,C12,C14,C6,C7,C16,C9,C13,C8,C10,C11,C15C_Disc_D3.0mm_W1.6mm_P2.50mm160.1ufhttps://www.digikey.co.nz/en/products/detail/kemet/C320C104K5R5TA7303/3726160
3R2,R1,R3,R4R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal42k7
4R5R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal11k
5C1C_Disc_D3.0mm_W1.6mm_P2.50mm1150pFhttps://www.digikey.co.nz/en/products/detail/vishay-beyschlag-draloric-bc-components/K151J15C0GF5TL2/286469
6U1DIP-40_W15.24mm_Socket1Z80CPU
7U7DIP-40_W15.24mm1Z8440
8U14, U2DIP-28_W15.24mm1KM62256CLP
9U13DIP-20_W7.62mm_Socket174LS374
10U5DIP-14_W7.62mm_Socket174LS04
11U9DIP-16_W7.62mm_Socket174LS161
12U3DIP_Socket-28_W11.9_W12.7_W15.24_W17.78_W18.5_3M_228-1277-00-0602J127256
13X1Oscillator_DIP-81CXO_DIP8https://www.digikey.co.nz/en/products/detail/abracon-llc/ACH-8-000MHZ-EK/675379
14U15TO-921DS1233https://www.digikey.co.nz/en/products/detail/analog-devices-inc-maxim-integrated/DS1233-5-T-R/1017808
15D2LED_D3.0mm1LED
16U11,U8DIP-14_W7.62mm_Socket274LS74
17SW2SW_THT_SK-12F17-G_7-01SW_SPDThttps://www.digikey.co.nz/en/products/detail/c-k/SK-12F17-G-7/2747163
18U4DIP-14_W7.62mm_Socket174LS00
19SW1SW_PUSH_6mm_H4.3mm1SW_Pushhttps://www.digikey.co.nz/en/products/detail/cui-devices/TS02-66-70-BK-160-LCR-D/15634243
20U6DIP-16_W7.62mm_Socket174LS138
21J1PinSocket_2x16_P2.54mm_Vertical1Conn_01x32_Pin
22J4BarrelJack_CUI_PJ-037A1Jack-DChttps://www.digikey.co.nz/en/products/detail/cui-devices/PJ-037A/1644545
23U12DIP-14_W7.62mm_Socket174LS32
24J7PinSocket_2x06_P2.54mm_Vertical1Conn_01x12_Male
25J3PinHeader_2x03_P2.54mm_Vertical1Conn_02x03_Odd_Even

CompactFlash

IdDesignatorFootprintQuantityDesignationSupplier and ref
1R2R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal1100R
2J2PinHeader_2x06_P2.54mm_Vertical1Conn_01x12_Male
3J7,J8SolderWirePad_1x01_SMD_1x2mm2Conn_01x01_Pin
4R8,R9,R7,R10R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal410k
5J5SWITCHCRAFT_PJRAN1X1U04X1RCA_Videohttps://www.digikey.co.nz/en/products/detail/switchcraft-inc/PJRAN1X1U04X/969899
6U1CF-Card_101D-TAAB-R011Compact_Flashhttps://www.digikey.co.nz/en/products/detail/attend-technology/101D-TAAB-R01/17633884
7U2DIP-20_W7.62mm174LS541
8Q2,Q1TO-92_Inline22N7000https://www.digikey.co.nz/en/products/detail/diotec-semiconductor/2N7000/13164314
9D2,D8,D6,D1,D4,D7,D5,D9,D3LED_D3.0mm_Horizontal_O1.27mm_Z2.0mm9LED
10R1,R5,R6,R3,R4R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal51K
11U3SOP-8_3.9x4.9mm_P1.27mm1CH340Nhttps://vi.aliexpress.com/item/1005004980156804.html
12R19,R20R_0805_2012Metric21khttps://www.digikey.co.nz/en/products/detail/stackpole-electronics-inc/RNCP0805FTD1K00/2240229
13R14,R15,R18,R11,R13,R16,R17,R12R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal81k
14J1Raspberry_Pi_Zero_Socketed_THT_FaceDown_MountingHoles1Raspberry_Pi_Zero
15J4PinSocket_2x16_P2.54mm_Vertical1Conn_01x32_Pin
16J6USB_Mini-B_Wuerth_65100516121_Horizontal1USB_B_Microhttps://www.digikey.co.nz/en/products/detail/amphenol-cs-commercial-products/GMSB0532112YEU/13683104
17J36291041901211USB_Ahttps://www.digikey.co.nz/en/products/detail/w%C3%BCrth-elektronik/629104190121/6644275
18J10PinSocket_1x04_P2.54mm_Vertical1Conn_01x04_Pin
19C1C_Disc_D3.0mm_W1.6mm_P2.50mm1100pF
20C2C_0805_2012Metric1100nFhttps://www.digikey.co.nz/en/products/detail/samsung-electro-mechanics/CL21B104KBCNNNC/3886661

Parts

49
QtyValueFootprintReferences
81kResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR11, R12, R13, R14, R15, R16, R17, R18
51KResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR1, R3, R4, R5, R6
410kResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR7, R8, R9, R10
4MountingHoleMountingHole:MountingHole_3.2mm_M3H1, H2, H3, H4
21kResistor_SMD:R_0805_2012MetricR19, R20
22N7000Package_TO_SOT_THT:TO-92_InlineQ1, Q2
2Conn_01x01_PinConnector_Wire:SolderWirePad_1x01_SMD_1x2mmJ7, J8
1100RResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR2
1100nFCapacitor_SMD:C_0805_2012MetricC2
1100pFCapacitor_THT:C_Disc_D3.0mm_W1.6mm_P2.50mmC1
174LS541Package_DIP:DIP-20_W7.62mmU2
1CH340NPackage_SO:SOP-8_3.9x4.9mm_P1.27mmU3
1Compact_FlashZ80:CF-Card_101D-TAAB-R01U1
1Conn_01x04_PinConnector_PinSocket_2.54mm:PinSocket_1x04_P2.54mm_VerticalJ10
1Conn_01x12_MaleConnector_PinHeader_2.54mm:PinHeader_2x06_P2.54mm_VerticalJ2
1Conn_01x32_PinConnector_PinSocket_2.54mm:PinSocket_2x16_P2.54mm_VerticalJ4
1D0LED_THT:LED_D3.0mm_Horizontal_O1.27mm_Z2.0mmD2
1D1LED_THT:LED_D3.0mm_Horizontal_O1.27mm_Z2.0mmD3
1D2LED_THT:LED_D3.0mm_Horizontal_O1.27mm_Z2.0mmD4
1D3LED_THT:LED_D3.0mm_Horizontal_O1.27mm_Z2.0mmD5
1D4LED_THT:LED_D3.0mm_Horizontal_O1.27mm_Z2.0mmD6
1D5LED_THT:LED_D3.0mm_Horizontal_O1.27mm_Z2.0mmD7
1D6LED_THT:LED_D3.0mm_Horizontal_O1.27mm_Z2.0mmD8
1D7LED_THT:LED_D3.0mm_Horizontal_O1.27mm_Z2.0mmD9
1LEDLED_THT:LED_D3.0mm_Horizontal_O1.27mm_Z2.0mmD1
1RCA_VideoZ80:SWITCHCRAFT_PJRAN1X1U04XJ5
1Raspberry_Pi_ZeroZ80:Raspberry_Pi_Zero_Socketed_THT_FaceDown_MountingHolesJ1
1USB_AZ80:629104190121J3
1USB_B_MicroConnector_USB:USB_Mini-B_Wuerth_65100516121_HorizontalJ6

Questions

How big is the CompactFlash PCB?

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

What parts does the CompactFlash use?

49 parts, built around the CH340N. 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 CompactFlash KiCad files?

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

Can I use the CompactFlash 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).

More from ashlin4010/simple_Z80_computer

1
  • 4 layers100 × 100 mmDesign files, the printed circuit board in 3D

    Design files

    ashlin4010/simple_Z80_computer

    Minimally complex Z80 computer while still being usable

    48 partsMIT

Similar boards

  • 2 layers50.5 × 94.7 mmSwordOfSecretsUSBProd, the printed circuit board in 3D

    SwordOfSecretsUSBProd

    gili-yankovitch/SwordOfSecrets

    To solve the challenge you will need to discover a series of flags, hidden inside the sword. Each one will help you unlock the next step in the challenge, to finally reveal the ultimate secret the sword holds.

    16 parts47MIT
  • 2 layers76 × 72 mmPanel, the printed circuit board in 3D

    Panel

    NandXor96/USBWLEDC

    USB WLED Controller

    184 parts40
  • 2 layers96 × 26 mmHack clock, the printed circuit board in 3D

    Hack clock

    hack-apollo/hack_clock

    A matrix LED WiFi clock.

    28 parts23GPL-3.0
  • 4 layers115.5 × 96.2 mmClosed deck x4, the printed circuit board in 3D

    Closed deck x4

    OpenLogicEFI/Hardware

    Hardware is based off an open source project called Speeduino by Josh Stewart.

    245 parts19
  • 6 layers129.8 × 57.4 mmIIsiA7 Mini, the printed circuit board in 3D

    IIsiA7 Mini

    MelkhiorVintageComputing/IIsiFPGA

    Stuff to put a FPGA in a Macintosh IIsi

    219 parts18
  • 4 layers60 × 95 mmDevboard, the printed circuit board in 3D

    Devboard

    tjclement/ecsc23-badge

    This repo contains the hardware designs and firmware developed for the ECSC23 hardware challenge by Curious Supplies.

    147 parts10
  • 4 layers48 × 96 mmMain Control Board, the printed circuit board in 3D

    Main Control Board

    baoqi-zhong/Awesome-SMT-Machine

    A single head 🔥SMT Machine🔥 based on FOC stepper motors. Pure self-developed and fully open-sourced.

    188 parts9
  • 2 layers75.3 × 33.8 mm24-ch relay driver kicad, the printed circuit board in 3D

    24-ch relay driver kicad

    dilshan/24ch-usb-high-voltage-driver

    24-Channel USB high voltage driver.

    35 parts5MIT