
Z80DevBoard
dbuchwald/Z80DevBoard
Simple Z80 based prototyping and development board designed as extension to Arduino Mega 2560

KiCad schematic for Clementina, a 3.3V W65C02S computer with a Raspberry Pi Pico 2 W (MIA) handling video, audio, storage and I/O.
Clementina hardware is an open-source printed circuit board by fran150, from the fran150/clementina-hardware repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 172.7 × 108.6 mm with 48 parts on 105 nets, routed with 1,360 tracks and 272 vias.
It is built around the 74AC138SC, 74AC00 and 74AC08PC, with the AS6C4008-55PCN, AS6C62256-55PCN and BAT85 among its other parts. Its parts include 14 capacitors, 11 resistors, 8 ICs, 5 connectors and 2 diodes. It belongs with the audio and music boards and the RP2040 boards of this library.
KiCad 9 schematic and board for Clementina, a 3.3 V homebrew computer built around a W65C02S CPU. A Raspberry Pi Pico 2 W, called MIA, runs the machine: it generates the CPU clock, boots the kernel, and provides video, audio, storage and input.
Status: the rev 1 schematic is complete and ERC-clean, and the rev 1 board is laid out, fully routed and DRC-clean. The first build is planned on protoboard, using the same parts as the board.
Open clementina-hardware.kicad_pro in KiCad 9.
clementina.kicad_sym (listed in sym-lib-table) holds the parts KiCad's
own libraries lack, currently the AS6C62256 SRAM.PCM_65xx-library). The schematic carries copies, so it opens
without that library. Install it to keep ERC's library check clean.clementina-hardware.kicad_dru holds one custom DRC rule: the audio jack's
barrel hangs over the board edge on purpose, so its silkscreen outline may
cross the edge.Sheets:
| Sheet | Contents |
|---|---|
clementina-hardware.kicad_sch (A3) | CPU, VIA, RAM, MIA, IRQ and reset circuits, expansion headers, user port, audio output, microSD, power and decoupling |
CS Logic.kicad_sch | Address decoding (74AC138 x2, 74AC08, two gates of the 74AC00) |
OE_RW_PHI2_Sync.kicad_sch | Read and write strobes: ~OE from R/W, ~WE qualified by PHI2 (two gates of the 74AC00) |
| Part | Role |
|---|---|
| W65C02S (U1) | CPU. MIA drives PHI2: 1.2 MHz by default, up to 8 MHz. |
| AS6C62256 (U4) | 32 KB base RAM |
| AS6C4008 (U2) | 512 KB extended RAM, seen through a 16 KB window |
| W65C22S (U3) | VIA. Port A selects the extended RAM bank; port B and CA/CB go to the user port. |
| Raspberry Pi Pico 2 W (A1) | MIA: clock, boot loader, video over Wi-Fi, audio, microSD, input, reset |
| 74AC138 x2, 74AC08, 74AC00 | Glue logic (see Glue logic timing) |
Memory map:
| Range | Device |
|---|---|
$0000-$7FFF | Base RAM |
$8000-$BFFF | Extended RAM window (32 banks, selected by VIA PA0-PA4) |
$C000-$DFFF | I/O: eight 1 KB slots. Slot 0 ($C000) is the VIA; slots 1-7 go to the expansion headers. |
$E000-$FFFF | MIA (registers at $FFE0-$FFFF) |
MIA's pins:
| GPIO | Signal |
|---|---|
| GP0-GP3 | microSD (SPI0: MISO, CS, SCK, MOSI) |
| GP4, GP5 | Audio left and right (PWM) |
| GP6 | MIA chip select |
| GP7 | R/W |
| GP8-GP15 | D0-D7 |
| GP16-GP20 | A0-A4 |
| GP21 | PHI2 |
| GP22 | IRQ |
| GP26 | RESB (MIA holds the CPU and VIA in reset) |
| GP27 | Reset request from the RESET button |
| GP28 | Unused |
The glue logic is 74AC, not 74HC, because 74HC is slow at 3.3 V (roughly 13 ns per gate typical, up to about 30 ns). Two places depend on it:
~WE = NAND(PHI2, ~OE) in one 74AC00 gate, so ~WE
rises within about 10 ns of PHI2 falling. The W65C02S only guarantees its
address and data for 10 ns after PHI2 falls, and the SRAMs need both held
until ~WE rises. This timing doesn't depend on clock speed, so running
slower doesn't help. The Picocomputer RP6502 makes WE# the same way.With 74AC parts, the chip-select paths meet the datasheets up to about 6.5 MHz with worst-case parts, and typical parts reach 8 MHz. 74HC parts give the same logic but lose the write-strobe guarantee, and the VIA's chip select limits them to about 3.5 MHz worst case.
Interrupts are wired-AND: MIA and the VIA each pull ~IRQB low through a BAT85
Schottky diode against a 4.7 kΩ pull-up. ~NMI (4.7 kΩ) and RDY (2.2 kΩ) are
also pulled up, so expansion cards can use them. RDY is also an output: the
CPU pulls it low while it executes WAI. The W65C02S only guarantees 1.6 mA
at 0.4 V there, so the RDY pull-up can't be stronger than about 2 kΩ.
Everything runs from the Pico's USB. Its 3V3 output supplies the whole board,
and VBUS supplies the +5V pins on the headers.
J1, J2: expansion bus (2x20 keyed box headers, identical)
| Pin | Signal | Pin | Signal |
|---|---|---|---|
| 1 | GND | 2 | +3.3V |
| 3 | A0 | 4 | A1 |
| 5 | A2 | 6 | A3 |
| 7 | A4 | 8 | A5 |
| 9 | A6 | 10 | A7 |
| 11 | A8 | 12 | A9 |
| 13 | GND | 14 | PHI2 |
| 15 | GND | 16 | RWB |
| 17 | ~OE | 18 | ~WE |
| 19 | ~RESB | 20 | ~IRQB |
| 21 | ~NMI | 22 | RDY |
| 23 | D0 | 24 | D1 |
| 25 | D2 | 26 | D3 |
| 27 | D4 | 28 | D5 |
| 29 | D6 | 30 | D7 |
| 31 | ~IOCS1 | 32 | ~IOCS2 |
| 33 | ~IOCS3 | 34 | ~IOCS4 |
| 35 | ~IOCS5 | 36 | ~IOCS6 |
| 37 | ~IOCS7 | 38 | +5V |
| 39 | GND | 40 | +3.3V |
J3: user port (2x10 keyed box header, VIA port B)
| Pin | Signal | Pin | Signal |
|---|---|---|---|
| 1 | GND | 2 | +3.3V |
| 3 | PB0 | 4 | PB1 |
| 5 | PB2 | 6 | PB3 |
| 7 | PB4 | 8 | PB5 |
| 9 | PB6 | 10 | PB7 |
| 11 | CB1 | 12 | CB2 |
| 13 | CA1 | 14 | CA2 |
| 15 | ~RESB | 16 | GND |
| 17 | GND | 18 | +5V |
| 19 | GND | 20 | +3.3V |
Rules for cards on J1-J3:
~IOCS1-~IOCS7.~IRQB, ~NMI and RDY: pull them low through a Schottky diode or an
open-drain output, and never drive them high.WAI. Don't read RDY low as a
wait request from another card.~RESB is driven by MIA: read it, never drive it.J4: audio out. A stereo 3.5 mm jack (CUI SJ1-3533NG, through-hole, round pins): tip left, ring right. Each channel uses the same output stage as the Picocomputer RP6502: a 220 Ω / 100 Ω divider, a 100 nF filter capacitor, a 47 µF DC block and a 1.8 kΩ bleed resistor. It gives about 1 Vpp line level and drives headphones directly. MIA mixes at 48 kHz.
J5: microSD. A 1x9 female header for the Adafruit 4682 microSD breakout (3 V only), used in SPI mode on MIA's SPI0: 400 kHz to initialise, then 12 MHz. The breakout has its own pull-ups (CS, MISO, DAT1, DAT2) and bypass capacitors. DAT1, DAT2 and card detect stay unconnected.
| Pin | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|---|---|---|---|---|---|---|---|---|---|
| Breakout | 3V | GND | CLK | SO | SI | CS | DAT1 | DAT2 | DET |
| Signal | +3.3V | GND | SD_SCK | SD_MISO | SD_MOSI | SD_CS | - | - | - |
clementina-hardware.kicad_pcb: 172.7 x 108.6 mm, 2 layers, every part
through-hole. The chips sit in sockets and the Pico plugs into female headers,
so the same parts move from the protoboard build to the board.
Power), 0.2 mm clearance, and 0.6 / 0.3 mm vias. The top layer runs mostly
horizontal and the bottom mostly vertical. Both layers carry a GND pour,
stitched with vias. Any hobby PCB fab can make it (1.6 mm FR-4, 1 oz copper).Every part has two schematic fields that keep the bill of materials generic, so you can source parts yourself (for the protoboard build) or hand them to an assembly service:
bom/factory-bom.csv lists everything that's
soldered: passives, diodes, sockets, headers, the jack and the button. With
those soldered (by you or the factory), the board needs no more soldering;
plug in these parts:
| Ref | Part |
|---|---|
| U1 | WDC W65C02S CPU, DIP-40 (W65C02S6TPG-14) |
| U3 | WDC W65C22S VIA, DIP-40 (W65C22S6TPG-14) |
| U4 | Alliance AS6C62256-55PCN, 32K x 8 SRAM, DIP-28 |
| U2 | Alliance AS6C4008-55PCN, 512K x 8 SRAM, DIP-32 |
| U6, U8 | 74AC138, DIP-16 |
| U7 | 74AC08, DIP-14 |
| U9 | 74AC00, DIP-14 |
| A1 | Raspberry Pi Pico 2 WH (the version with pins already soldered) |
| J5 | Adafruit 4682 microSD breakout, 3 V |
The Adafruit 4682 ships with its header loose: solder the 9 pins to the module once, or use a breakout sold with the header fitted.
The "A1" row of the factory BOM is two headers, one per side of the Pico.
To regenerate the factory BOM after changing parts:
kicad-cli sch export bom --fields 'Factory,${QUANTITY},Reference' --labels 'Part,Qty,References' --group-by Factory --sort-field Reference --sort-asc -o bom/factory-bom.csv clementina-hardware.kicad_schThe Gerbers are generated from the board, so they aren't committed: git
ignores fabrication/. Rebuild them after any board change:
mkdir -p fabrication/gerbers
kicad-cli pcb export gerbers --no-x2 --no-netlist --subtract-soldermask -l F.Cu,B.Cu,F.Mask,B.Mask,F.Silkscreen,Edge.Cuts -o fabrication/gerbers/ clementina-hardware.kicad_pcb
kicad-cli pcb export drill --excellon-separate-th -o fabrication/gerbers/ clementina-hardware.kicad_pcb
rm fabrication/gerbers/*.gbrjob
zip -j -FS fabrication/clementina-rev1-gerbers.zip fabrication/gerbers/*Upload fabrication/clementina-rev1-gerbers.zip to the fab. It holds eight
files: both copper layers, both masks, the front silkscreen, the board outline,
and separate drill files for plated and unplated holes.
--no-x2 --no-netlist: PCBWay's KiCad guide asks for Gerbers without X2
attributes. With them, its upload preview showed only the holes.--subtract-soldermask keeps silkscreen ink off the pads..gbrjob job file.zip -FS also removes files that are no longer in fabrication/gerbers/.When you order boards, tag the commit you ordered from and attach the zip you uploaded to a GitHub release on that tag. That keeps a record of exactly what was made.
GPLv3. See LICENSE.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 10 | 100nF | Capacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mm | C2, C4, C6, C7, C8, C9, C10, C11, C12, C13 |
| 4 | MountingHole_3.2mm_M3 | MountingHole:MountingHole_3.2mm_M3 | H1, H2, H3, H4 |
| 3 | 100 | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R4, R7, R10 |
| 2 | 1.8K | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R8, R11 |
| 2 | 220 | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R6, R9 |
| 2 | 4.7K | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R2, R5 |
| 2 | 47uF | Capacitor_THT:CP_Radial_D5.0mm_P2.50mm | C3, C5 |
| 2 | 74AC138 | Package_DIP:DIP-16_W7.62mm_Socket | U6, U8 |
| 2 | BAT85 | Diode_THT:D_DO-34_SOD68_P7.62mm_Horizontal | D1, D2 |
| 2 | Expansion | Connector_IDC:IDC-Header_2x20_P2.54mm_Vertical | J1, J2 |
| 2 | MountingHole_2.7mm_M2.5 | MountingHole:MountingHole_2.7mm_M2.5 | H5, H6 |
| 1 | 10K | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R3 |
| 1 | 1uF | Capacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mm | C1 |
| 1 | 2.2K | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R1 |
| 1 | 22uF | Capacitor_THT:CP_Radial_D5.0mm_P2.50mm | C14 |
| 1 | 74AC00 | Package_DIP:DIP-14_W7.62mm_Socket | U9 |
| 1 | 74AC08 | Package_DIP:DIP-14_W7.62mm_Socket | U7 |
| 1 | AS6C4008-55PCN | Package_DIP:DIP-32_W15.24mm_Socket | U2 |
| 1 | AS6C62256-55PCN | Package_DIP:DIP-28_W15.24mm_Socket | U4 |
| 1 | Audio Out | Connector_Audio:Jack_3.5mm_CUI_SJ1-3533NG_Horizontal_CircularHoles | J4 |
| 1 | RESET | Button_Switch_THT:SW_PUSH_6mm | SW1 |
| 1 | RaspberryPi_Pico_W | Module:RaspberryPi_Pico_Common_THT | A1 |
| 1 | User Port | Connector_IDC:IDC-Header_2x10_P2.54mm_Vertical | J3 |
| 1 | W65C02SxP | Package_DIP:DIP-40_W15.24mm_Socket | U1 |
| 1 | W65C22SxP | Package_DIP:DIP-40_W15.24mm_Socket | U3 |
| 1 | microSD | Connector_PinSocket_2.54mm:PinSocket_1x09_P2.54mm_Vertical | J5 |
It measures 172.7 × 108.6 mm and has 2 copper layers, 1.6 mm thick.
48 parts, built around the 74AC138SC, 74AC00, 74AC08PC and AS6C4008-55PCN. 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.
From the fran150/clementina-hardware repository on GitHub, at the commit this page was made from: the board is clementina-hardware.kicad_pcb and its schematic CS Logic.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

dbuchwald/Z80DevBoard
Simple Z80 based prototyping and development board designed as extension to Arduino Mega 2560

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

rosco-6502/rosco_6502
Design, documentation and software for the Really Old School Computer (6502)




