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

8-bit homebrew computer; version 2

Size
100 × 100 mm
Copper layers
4
Thickness
1.6 mm
Parts
94
Nets
209
Pads
672
Tracks, vias
2,260, 321
Pours
5
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
31 Mar 2017
Updated
6 Jun 2024

Overview

Pda6502v2 is an open-source printed circuit board by pda, from the pda/pda6502v2 repository on GitHub. It is a 4-layer board of 100 × 100 mm with 94 parts on 209 nets, routed with 2,260 tracks and 321 vias.

It is built around the ICE40HX4K-TQ144, AS6C4008-55PCN and DS1818-5+, with the SC28L92A1B, TLV1117-33DCY and 1N4148W among its other parts. Its parts include 32 capacitors, 20 resistors, 11 ICs, 11 diodes and 9 connectors. It belongs with the retro computing and games boards and the FPGA and CPLD boards of this library.

Main components

6

README

README.md

pda6502v2

pda6502v2 is a single-board homebrew computer built around the 8-bit 6502 CPU, varitions of which powered the venerable Commodore 64, Apple II, Nintendo Entertainment System and lots more.

This repository contains all aspects of its development:

DirectoryDescriptionLanguage / Tool
kicad/hardware schematic / PCB designKiCad
bifröst/BIFRÖST FPGA system controllerVerilog
os/pda6502v2 firmware/OS/software6502 assembly
emu/pda6502v2 emulatorRust
eeprog/SPI EEPROM in-circuit programmerC, Arduino C++

Hardware specifications

Compared to original pda6502

pda6502v2 is redesigned from scratch to address the pain points encountered creating and programming the original pda6502 several years earlier:

  • Tedious software/bootloader development cycle, physically removing and slowly reprogramming an EEPROM on every software iteration.
  • Limited, very slow SPI communications (bit-banged via 6522 GPIO) not viable for SPI displays etc.
  • No UART for serial console or other communications with modern systems.
  • Inflexible address bus mapping with hard-wired logic gates.

These issues and more have been improved:

pda6502pda6502v2
Bootloader / firmwareEEPROMIn-circuit programmable Flash EEPROM
SPI6522 bit-bangFPGA hardware accelerated
UARTnoneDual UART (SC28L92)
GPIO6522 VIADual 6522 VIA
SoundnoneARMSID (SID emulation)
RAM32 KiB512 KiB (FPGA can bank-switch)
Clock1 MHz oscillatorFPGA generated; variable
Address decode logic7400-series chipsFPGA programmable
Voltage5.0V3.3V
Schematic/layout toolEAGLEKiCad

FPGA system controller: BIFRÖST

An FPGA (Lattice ICE40HX4K-TQ144) acts as a system controller (dubbed BIFRÖST) with three primary functions;

System startup

Startup code is stored in an on-board SPI serial EEPROM (Microchip AT25M01) which can be written from an external computer via SPI ICSP header.

(Microchip AT25M01 replaced by ON Semiconductor CAT25M01 due to availability).

BIFRÖST bootstraps the system by copying a fixed size/location bootloader from serial EEPROM into main RAM before starting CPU. The bootloader may load further code/data from the serial EEPROM.

This solves the main pain point of version one, in which program/bootloader development involved removing and rewriting an EEPROM on every development iteration.

Address logic

Mapping of the address space to SRAM and I/O chips is also handled by BIFRÖST. This provide very low propagation time allowing for fast clock speed, and is in-circuit programmable for flexible address space / logic design without hardware changes.

BIFRÖST has the entire address bus, data bus, control signals and clock, allowing for arbitrary address mapping. For example a control register could be exposed for state-based mapping, e.g. memory layer switching like the Commodore 64.

BIFRÖST chip selection / considerations

BIFRÖST is implemented as a Lattice ICE40HX4K-TQ144 FPGA with a Microchip AT25M01 SPI flash EEPROM for configuration storage. The EEPROM also acts as the 6502 system ROM, loaded into RAM by BIFRÖST during boot.

Any signal that can be routed through / controlled by BIFRÖST should be, so that design decisions are pushed from hardware schematic and into FPGA HDL which can be easily altered after assembly.

BIFRÖST needs the following signals:

SignalsCount
Bus: ADDR 0..15 + extended ADDR 16..1819
SPI: MISO, MOSI, SCLK, SS x 811
6502: CLK RWB BE IRQB MLB NMIB RDY SOB SYNC VPB RESB10
UART: CS, IM, IRQ, RDN, RXAIRQ, RXBIRQ, TXAIRQ, TXBIRQ, WRN9
Bus: DATA 0..78
VIA1 & VIA2: CS, IRQ4
SRAM CS1
CLOCKSRC (in from oscillator)1
~RESET1

This brings the total I/O pin requirement to at least 64.

The ICE40HX1K-VQ100 FPGA lacks PLL; PLL could be useful?

The TQ144 package includes PLL and has the same 0.5 mm pitch, so shouldn't be materially harder to hand-solder.

The ICE40HX4K is bigger/better, with immaterial cost difference at this volume.

RAM

Alliance Memory AS6C4008-55PCN 512K x 8 SRAM with 55ns access time at 2.7~5.5V in a PDIP-32 package provides 512 KiB RAM.

This is 8 times larger than the 6502's 16-bit address space; access to RAM beyond the first 64 KiB is managed by BIFRÖST.

(Earlier during system design, a pair of AS6C62256 32K x 8 PDIP-28 was chosen to provide a less overkill and more era-appropriate 64 KiB of RAM, then lure of 1 MiB RAM made that 2 x 512 KiB, then the second 512 KiB was removed to make PCB space for SID.

I/O

  • SPI: 8 devices
  • GPIO: 2 x 6522 VIA providing total of 4 x 8-bit ports
  • Dual UART
  • SID (ARMSID) sound

SPI

BIFRÖST maps registers into the 6502 address space, implementing SPI master similar to http://6502.org/users/andre/spi65b/index.html

This hardware SPI communication is orders of magnitude faster than 6522 bit-banging, making SPI display output more viable.

GPIO

A pair of WDC W65C22S (6522) VIA provide two 8-bit GPIO ports each, as well as timers etc.

UART

NXP SC28L92 3.3V dual UART (SC28L92A1A: PLC44-44 package)

Useful information on UARTs: REPLACING THE 65C51 on 6502.org forums.

SID Sound

ARMSID emulates MOS6581 or MOS8580 SID.

I believe this will only function correctly when running at ~1 MHz.

An email reply from the creator re. voltage and clock:

The ARMSID has its own LDO regulator, so it needs at least 3.45 V (max. 5.5 V) on pin 24 for proper operation. The value of the output signals is logic 3.3 V, the inputs are tolerant to 5 V. Therefore, it is not a problem to connect it to a 3.3 V system. The clock signal is designed for use in the C64, so it is guaranteed in the range of 0.985 to 1.023 MHz and directly controls the emulation rate (just like the original SID). Lower frequencies are not a problem, higher frequencies can disable emulation. All write and read operations should take at least 350ns for proper operation.

Power supply & reset

TLV1117-33 LDO linear regulator brings 4.75V–15V down to the main 3.3V / 800mA supply, used for all internal/external I/O.

LT3030 dual LDO linear regulator brings the 3.3V supply down to 2.5V / 750mA and 1.2V / 250mA for the additional FPGA voltage requirements.

The In-Circuit System Programming (ICSP) header can power the AT25M01 SPI flash EEPROM (1.7–5.5V) only, isolated from the rest of the system via 1N4148 Diode.

Maxim DS1818-5 “3.3V EconoReset with Pushbutton” handles holding RESET active-low during power-on, brown-out, and when a RESET button is pressed.

Memory map

Memory mapping is controlled by BIFRÖST, so it may be reconfigured. Currently, everything is RAM except 0xD000–DFFF.

  • 0xD400 SID (nobomi ARMSID)
  • 0xDC00 VIA1 (WDC 65C22)
  • 0xDC10 VIA2 (WDC 65C22)
  • 0xDC20 UART (NXP SC28L92)

This roughly matches Commodore 64's I/O space.

Errata

R26 (0 ohm) and R27 (open) labels are swapped. The one closer to LT3030 vreg is R26 and should be 0 ohm (jumper/shorted). The one further from the LT3030 vreg is R27 and should be open (not connected).

EEPROM triple drama:

  • 128 KiB isn't nearly enough; iCEstick has 4 MiB.
  • missing pull-up on SPI CS to put FPGA into SPI master mode.
  • MISO/MOSI lines from FPGA to EEPROM are swapped :( The best solution to this mess is to leave the EEPROM footprint unpopulated, and attach a small board to ICSP header with:
  • a larger EEPROM,
  • a 10K pull-up resistor on CS,
  • a MISO/MOSI-correct ICSP header. A prototype of this works using a Winbond W25Q80BVAIG 8Mbit SPI EEPROM. (Silver lining: attempts to program the EEPROM while it's connected to the FPGA have failed, despite efforts to make the FPGA tristate those SPI lines when not in use. Being able to disconnect the EEPROM from the FPGA is useful. However one of the pda6502v2 goals was uploading new 6502 code without touching the board. Hopefully this can be fixed in Verilog.

RESET lines for BIFRÖST FPGA and the 6502 system are coupled. This is a terrible idea; BIFRÖST needs to reset the CPU without resetting itself. Workaround: use a knife to physically cut the RESET trace coming from top-right pin of RESET switch, next to pin 1 of ARMSID, and then airwire from EXT[0] to 6502 RESET.

Parts

94
QtyValueFootprintReferences
220.1μFpda6502v2:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC1, C2, C3, C10, C11, C14, C15, C16, C17, C22, C23, C24, C25, C26, C27, C32 +6
91Kpda6502v2:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR28, R29, R30, R31, R32, R33, R34, R35, R36
8LEDpda6502v2:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolderD3, D4, D5, D6, D7, D8, D9, D10
710Kpda6502v2:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR1, R2, R3, R4, R21, R22, R23
210nFpda6502v2:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC18, C19
210uFpda6502v2:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC20, C21
210uFpda6502v2:CP_EIA-3528-15_AVX-H_Pad1.50x2.35mm_HandSolderC29, C30
21800 pfpda6502v2:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC28, C31
2W65C22SxPpda6502v2:DIP-40_W15.24mmU2, U3
10pda6502v2:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR26
1100uFpda6502v2:CP_Radial_D5.0mm_P2.00mmC12
110uFpda6502v2:CP_Radial_D5.0mm_P2.00mmC13
11N4148WDiode_SMD:D_SOD-123D11
11N5819Diode_THT:D_DO-41_SOD81_P10.16mm_HorizontalD1
1243kpda6502v2:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR25
1255kpda6502v2:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR24
13.6864 MHzpda6502v2:Oscillator_SMD_5.0x3.2mm_HandSolderX2
18 MHzpda6502v2:Oscillator_SMD_5.0x3.2mm_HandSolderX1
1ARMSIDPackage_DIP:DIP-28_W15.24mm_SocketU6
1AS6C4008-55PCNPackage_DIP:DIP-32_W15.24mmU5
1AT25M01Package_SO:SOIC-8_3.9x4.9mm_P1.27mmU7
1Conn_02x04_Odd_EvenConnector_PinHeader_2.54mm:PinHeader_2x04_P2.54mm_VerticalJ5
1DS1818Package_TO_SOT_SMD:SOT-23_HandsolderingU4
1FPGA_EXTConnector_PinHeader_2.54mm:PinHeader_2x08_P2.54mm_VerticalJ8
1GPIO1Connector_PinHeader_2.54mm:PinHeader_2x12_P2.54mm_VerticalJ1
1GPIO2Connector_PinHeader_2.54mm:PinHeader_2x12_P2.54mm_VerticalJ2
1ICE40HX4K-TQ144Package_QFP:TQFP-144_20x20mm_P0.5mmU8
1ICSPConnector_PinHeader_2.54mm:PinHeader_2x03_P2.54mm_VerticalJ6
1LEDLED_THT:LED_D3.0mmD2
1LOGOpda6502v2:pda6502_v2_silkG***
1LOGOpda6502v2:PA_initialsG***
1LOGOpda6502v2:pda6502_v2_maskG***
1LT3030Package_SO:HTSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP2.85x4mmU10
1SC28L92A1BPackage_QFP:PQFP-44_10x10mm_P0.8mmU11
1SIDConnector_PinHeader_2.54mm:PinHeader_2x04_P2.54mm_VerticalJ9
1SPIConnector_PinHeader_2.54mm:PinHeader_2x10_P2.54mm_VerticalJ7
1SW_PushConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalSW2
1SW_PushButton_Switch_THT:SW_PUSH_6mm_H5mmSW1
1Screw_Terminal_01x02TerminalBlock_Phoenix:TerminalBlock_Phoenix_MPT-0,5-2-2.54_1x02_P2.54mm_HorizontalJ4
1TLV1117-33Package_TO_SOT_SMD:SOT-223U9
1UARTConnector_PinHeader_2.54mm:PinHeader_2x06_P2.54mm_VerticalJ3
1W65C02SxPpda6502v2:DIP-40_W15.24mmU1
1openpda6502v2:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR27

The 90 most common of 94 parts.

Questions

How big is the Pda6502v2 PCB?

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

What parts does the Pda6502v2 use?

94 parts, built around the ICE40HX4K-TQ144, AS6C4008-55PCN, DS1818-5+ and SC28L92A1B. 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 Pda6502v2 KiCad files?

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

Can I use the Pda6502v2 design in my own project?

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

Similar boards

  • 6 layers243.8 × 243.8 mmRaven, the printed circuit board in 3D

    Raven

    agranlund/raven

    Homemade MC68060 + DSP56303 Atari-compatible computer. Hardware, firmware, and software stack

    331 parts87
  • 2 layers73.9 × 73.2 mmSkyFax, the printed circuit board in 3D

    SkyFax

    ME-IRL/SkyFax

    Fax and data modems built around Skyworks's ISOModem chips.

    98 parts13
  • 4 layers160 × 100.2 mmCsa ultracpu, the printed circuit board in 3D

    Csa ultracpu

    fachat/csa_ultracpu

    The CPU board for a 17MHz Colour-PET clone with modern interfaces

    175 parts9GPL-3.0
  • 4 layers224 × 120.1 mmISA65816, the printed circuit board in 3D

    ISA65816

    kitspace-test-repos/kicad6-file-collection

    69 partsMIT
  • 2 layers75 × 75 mmDenton rain maker, the printed circuit board in 3D

    Denton rain maker

    alexanderenrique/denton-rain-maker

    Four-channel 24 VAC ESP32 sprinkler controller — KiCad schematic/PCB for Denton's Rainmaker

    64 parts
  • 2 layers95 × 85 mmFiberboard logic min, the printed circuit board in 3D

    Fiberboard logic min

    nguyenduchan/fiberboard

    Fiberboard là bo mạch điều khiển logic tích hợp (AIO), không có driver stepper Nema. Cùng chức năng module ESP32 công nghiệp thông dụng: 4 ngõ vào cách ly + 4 relay + RS485.

    108 parts
  • 4 layers76.8 × 56.5 mmDac, the printed circuit board in 3D

    Dac

    schenkmi/electronic-projects

    misc electronic projects

    86 parts6CERN-OHL-W-2.0