

65C02 Computer
DB6502: 65C02 based computer inspired by BE6502
- Size
- 203.2 × 149.9 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 68
- Nets
- 133
- Pads
- 497
- Tracks, vias
- 1,400, 164
- Pours
- 2
- Routed
- Yes
- KiCad
- KiCad 5 (file 20171130)
- Created
- 30 Dec 2019
- Updated
- 4 Oct 2023
Overview
65C02 Computer is an open-source printed circuit board by dbuchwald, from the dbuchwald/6502 repository on GitHub, published under the MIT licence. It is a 2-layer board of 203.2 × 149.9 mm with 68 parts on 133 nets, routed with 1,400 tracks and 164 vias.
It is built around the ATTINY4313-PU, FT230XS-R and 74HC00D, with the 74HC02, 74HC21D and NE555 among its other parts. Its parts include 17 capacitors, 13 resistors, 12 ICs, 11 connectors and 4 diodes. It belongs with the retro computing and games boards and the AVR (ATmega, ATtiny) boards of this library.
Main components
6ATTINY4313-PU
PDIP-20-40℃~+85℃ 1.8V~5.5V 18 20MHz 256Byte 256Byte 4KB 8 Bit AVR Built-in FLASH PDIP-20 Microcontrollers (MCU/MPU/SOC) ROHSMicrochip TechnologyMicrocontrollers (MCU/MPU/SOC)FT230XS-R
SSOP-16-150mil-40℃~+85℃ 125uA 3.3V~5V 8mA USB 2.0 USB to UART SSOP-16-150mil USB Converters ROHSFTDIUSB Converters74HC00D
SOP-14-40℃~+125℃ 1.5V、3.15V、4.2V 1.9V、3.7V、5.9V 100mV、400mV、400mV 2 2V~6V 4 40uA 5.2mA 5.2mA 500mV~1.8V 74HC Series 7ns@6V,50pF NAND Gate SOIC-14 Logic Gates ROHSNexperiaLogic Gates74HC02
-- Logic Gates ROHSonsemiLogic Gates74HC21D
SOP-14-40℃~+125℃ 1.5V~4.2V 1.9V、3.98V、4.4V、5.48V、5.9V 100mV、260mV、400mV 19ns@6V,50pF 2 2V~6V 2uA 4 5.2mA 5.2mA 500mV~1.8V 74HC Series AND Gate SOIC-14 Logic Gates ROHSNexperiaGatesNE555
SOP-8-20℃~+70℃ 1 1.5mA 200mA 4.5V~15V Adjustable duty cycle oscillation、Reset function、Duty cycle stabilization SOP-8 555 Timers / Counters ROHSGRTimers / Counters
README
README.mdDB6502 - Dawid Buchwald's 6502 Computer
This repository contains all the work in progress during my build of Ben Eater's inspired 6502 8-bit computer similar to typical machines of the early 1980s. If you haven't seen Ben's videos, I would strongly suggest you start there:
As stated above, this build is not 100% compatible with what Ben had done - and for a reason, described in next section.
If I had to explain shortly "what it is", the answer would be: simple, yet easy to expand, 8-bit CPU based computer designed and built with one goal only: to use it as a learning and tinkering platform to understand how computers really work. You can use it for simple things like understanding buses, clock cycles, instruction execution, but it also demonstrates more complex concepts like interrupts, interfaces to external components and device handling. More on that below. Everything, hopefully, is simple enough to wrap your head around by one person in couple of weeks.
Why build something different
Ben's videos on 6502 computer are absolutely awesome - it's one of the best sources in the whole Internet explaining how any computer works. The build he introduced is probably sufficient for most of the things you might ever want to build, and yet I decided to deviate from his design.
The rationale behind this project is pretty simple - the best way to test your understanding of certain subject is to try to expand on what you have learned. You never know if you understood something until you test it by introducing changes to original design - and I used this approach in this project to learn a lot. It was my first proper electronics project, so I would like to apologize for any mistakes. If you think something is off or could have been done differently - please go ahead and raise issue for the repo! All improvements are welcome!
Why would you bother using DB6502 instead of BE6502
Basically, it gives you almost all the flexibility of Ben's buid without the hassle of breadboard connections for the critical components. You can still run all of Ben's programs (using second VIA port), but the days of looking for loose wire between RAM and CPU are over :) You can, obviously, still experiment with peripherals and breadboard connections using extension port and second VIA.
On top of that you get additional features like extra screen (via onboard connector), keyboard for more versatile input and finally all-in-one serial over USB terminal. You also get easy to use software ready to be installed on the machine to jumpstart your tinkering. When using bootloader you don't even have to flash the EEPROM more than once!
Important note: All of the content here is, and always will be open source and free to use, and I don't intend to make any profit out of it. The only way I get anything at all (and it's only small commission to be used for future PCBWay orders) is when you order my boards from PCBWay using the links posted below, but you are welcome to grab these gerber files and order the boards from another provider, or even from PCBWay, just by uploading gerbers to your account, if you don't want me to get the commission :)
What is different
Compared to Ben's 6502 build I introduced the following changes:
- Added automatic power-up reset circuitry,
- Changed address decoder logic (very important from compatibility perspective),
- Changed LCD interface from 8-bit to 4-bit (very important from compatibility perspective),
- Added additional VIA chip to provide easy expansion of the system,
- Added ACIA chip for serial communication,
- Added (optional - more on that later) USB-UART interface for easy connectivity with PC,
- Added PS/2 keyboard port and ATtiny4313-based keyboard controller to provide proper replacement for five pushbuttons in Ben's design,
- Added expansion port (not really deviation from Ben's build, save for one detail - unlike Ben's build, my version can support various interrupt sources, including the expansion port),
- Modified clock module (external),
- Changed compilator from VASM to CC65,
- Added simple way to choose clock source.
You might be wondering if this means that you can't run Ben's programs on DB6502 - and the answer is YES YOU CAN. Indeed, some changes to the code are necessary, but thanks to the additional VIA chip and with some changes to the addressing mode you can run any program from Ben's videos. If you want to use LCD in 8-bit mode, you can also use the additional VIA for it, ignoring the built-in LCD connector.
By the way, the opposite is also true - you can compile and run my programs on Ben's computer. There are special compilation flags that enable usage of Ben's address decoder. I will describe this in more detail in software section.
Detailed description and rationale for each change is discussed in Schematics README.
Getting started
Okay, so it should be pretty clear what this project is about, so how to start playing with it? That really depends on what you decide to do:
- Stick with BE6502 and just use subset of provided software (either to install it in EEPROM, or just use it as reference for your own hacking),
- Build your own breadboard design based on this one with any modifications you can think of,
- Order PCBs of DB6502, solder the components and run provided software to see how it works and get started with your own designs.
To start from scratch it's actually easiest to select last option - after some waiting you will end up having pretty solid base to extend your design on.
Using provided software with BE6502
If you decide to go down that route, head straight to the Software folder, where you will find several programs either identical or similar to what Ben has shown in his videos, but built with much more versatile toolchain.
If you want to read more, go ahead and read Software folder section. Make sure to check out the building software subsection, as it explains how to compile programs to run on BE6502 directly.
Build your own breadboard design
Maybe you have already started expanding on Ben's build, or maybe you are just considering it now. If you want to check out how I did certain things, jump right into Schematics folder, where you will find KiCAD projects for all the components used in this project. Obviously the most important one is the 65C02_Computer project, but there are some additional goodies there.
Please note: This part is not very well documented, I have assumed that anybody willing to dig into these schematics already knows how to read them.
Most of the decisions made during the schematic design were explained above. Justification for anything not covered here can be probably found in the invaluable 6502 primer.
Using my PCB design
This will be explained in the most detail, obviously. Start with getting the PCBs. Please note: clock module is entirely optional, but really useful for single stepping or slow clocking required by Ben Eater's design of Arduino Mega based bus analyzer. As explained in number of places here, you can either order PCBs from PCBWay directly or use your manufacturer of choice - it should have no impact on the final result.
What's in the repo
Everything, basically. Schematics of the 6502 board, modified clock module, address decoder and other circuits I built during the project. Arduino sketches I used for debugging and simple programs used to test different features.
And, last but not least, full set of sample programs to follow Ben's videos on DB6502 plus my own bootloader/OS. The last two things are coming soon :)
Arduino folder
There are several sketches there, and their full description is available is separate README.
AVR folder
There are several projects there, used to experiment with pure avr-gcc development for Atmel AVR chips. While it has been interesting adventure that I plan to explore further in the future, it was easier to stick to standard Arduino tools for now and simply restructure code to work there.
Datasheets folder
All the datasheets I used when designing DB6502, attached for reference.
Schematics folder
All the KiCAD schematics for the 6502 computer, modified clock module and several others:
- 65C02_Computer - main schematic, including PCB design for DB6502 computer,
- Clock_module - schematic for the modified clock module, including PCB design,
- 555_troubleshoot - schematic of circuit used in troubleshooting of clock module monostable noise issue,
- Address_decoder_basic - schematic of Ben Eater's address decoder for 6502 project,
- Address_decoder_basic_v2 - slightly modified version of the above,
- Address_decoder_extended - schematic of my own address decoder, used in the DB6502 computer.
There is dedicated README in the folder, containing all the build-related details.
Software folder
This one is the most important folder, as it contains range of different programs to play with the 6502 computer. Large subset of this programs can be built for Ben Eater's version of the 6502 computer without any changes. Some of them, however, use features available only in DB6502, like ACIA or keyboard connector. These can still be ran on Ben Eater's 6502 computer, assuming that compatible hardware is added to it.
The Software folder is currently divided into four main parts:
build- temporary folder where all the build artifacts are created, including ROM binaries to be uploaded to EEPROM,common- common sources: include files with common constants, sources with shared function, configuration files for different address decoder logic modes, shared makefile used by all projects and small python script to optimize size of loadable modules,rom- set of projects used to create various ROM images to follow Ben's videos, test different features of the board and some day complete operating system for the computer,load- set of project containing loadable modules. These can be uploaded at runtime, without the need to flash the EEPROM. Basic bootloader is required, obviously, and the usage instructions are provided below.
There is also one "master" makefile located directly in the Software folder - it will build all the projects in rom and load subfolders.
There is dedicated README in the folder, containing all the software-related details.
Credits
This project would not be possible if not inspiration, support and help from many, many people:
- Ben Eater - his videos inspired me to learn all this,
- Dirk Grappendorf - awesome documentation of his own 6502 project,
- Wilson Mines Co. - the best source of 6502-related information,
- Dane Creek Photography - for all his support and test driving the project,
- u/transistorykris - his KrisOS is a great inspiration for my own OS development,
- r/beneater community - for all the great ideas, feedback, creative spirit and exceptional support.
Parts
68| Qty | Value | Footprint | References |
|---|---|---|---|
| 12 | 0.1uF | Capacitor_THT:C_Disc_D3.4mm_W2.1mm_P2.50mm | C1, C2, C3, C4, C5, C7, C12, C13, C14, C15, C16, C17 |
| 4 | 270 | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal | R9, R10, R11, R12 |
| 4 | 4K7 | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal | R6, R7, R8, R13 |
| 2 | 27 | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal | R4, R5 |
| 2 | 47pF | Capacitor_THT:C_Disc_D3.4mm_W2.1mm_P2.50mm | C9, C10 |
| 2 | 65C22S | Package_DIP:DIP-40_W15.24mm_Socket | U11, U12 |
| 1 | 1.8432MHz | Oscillator:Oscillator_DIP-14 | X2 |
| 1 | 1000uF | Capacitor_THT:CP_Radial_D10.0mm_P5.00mm | C11 |
| 1 | 10K | Potentiometer_THT:Potentiometer_Piher_PT-10-V10_Vertical | RV1 |
| 1 | 10K | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal | R3 |
| 1 | 10nF | Capacitor_THT:C_Disc_D3.4mm_W2.1mm_P2.50mm | C8 |
| 1 | 10uF | Capacitor_THT:CP_Radial_D5.0mm_P2.50mm | C6 |
| 1 | 1M | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal | R1 |
| 1 | 1MHz | Oscillator:Oscillator_DIP-14 | X1 |
| 1 | 28C256 | Package_DIP:DIP-28_W15.24mm_Socket | U8 |
| 1 | 47K | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal | R2 |
| 1 | 62256 | Package_DIP:DIP-28_W15.24mm_Socket | U9 |
| 1 | 65C02S | Package_DIP:DIP-40_W15.24mm_Socket | U7 |
| 1 | 65C51N | Package_DIP:DIP-28_W15.24mm_Socket | U5 |
| 1 | 74HC00 | Package_DIP:DIP-14_W7.62mm_Socket | U2 |
| 1 | 74HC02 | Package_DIP:DIP-14_W7.62mm_Socket | U3 |
| 1 | 74HC21 | Package_DIP:DIP-14_W7.62mm_Socket | U1 |
| 1 | ATtiny4313-PU | Package_DIP:DIP-20_W7.62mm_Socket | U10 |
| 1 | AVR-ISP-10 | Connector_PinHeader_2.54mm:PinHeader_2x03_P2.54mm_Vertical | J8 |
| 1 | BLINK | LED_THT:LED_D5.0mm_Clear | D4 |
| 1 | CLK Jumper | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J1 |
| 1 | Expansion port | Connector_PinSocket_2.54mm:PinSocket_2x16_P2.54mm_Vertical | J7 |
| 1 | FT230XS | 65C02_Computer:SSOP-16_3.9x4.9mm_P0.635mm_long_pads | U6 |
| 1 | Ferrite_Bead_Small | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal | FB1 |
| 1 | LCD Connector | Connector_PinSocket_2.54mm:PinSocket_1x16_P2.54mm_Vertical | J11 |
| 1 | Mini-DIN-6 | 65C02_Computer:mini_din-6 | J6 |
| 1 | NE555 | Package_DIP:DIP-8_W7.62mm_Socket | U4 |
| 1 | Optional UART Port | Connector_PinSocket_2.54mm:PinSocket_1x06_P2.54mm_Vertical | J2 |
| 1 | PWR | LED_THT:LED_D5.0mm_Clear | D1 |
| 1 | Power Connector | Connector_BarrelJack:BarrelJack_Horizontal | J5 |
| 1 | RESET | Button_Switch_THT:SW_PUSH_6mm_H4.3mm | SW1 |
| 1 | RX | LED_THT:LED_D5.0mm_Clear | D3 |
| 1 | TX | LED_THT:LED_D5.0mm_Clear | D2 |
| 1 | USB_B | Connector_USB:USB_B_OST_USB-B1HSxx_Horizontal | J4 |
| 1 | USB_B_Micro | Connector_USB:USB_Micro-B_Molex-105017-0001 | J3 |
| 1 | VIA2PA | Connector_PinHeader_2.54mm:PinHeader_1x12_P2.54mm_Vertical | J9 |
| 1 | VIA2PB | Connector_PinHeader_2.54mm:PinHeader_1x12_P2.54mm_Vertical | J10 |
The 62 most common of 68 parts.
Questions
How big is the 65C02 Computer PCB?
It measures 203.2 × 149.9 mm and has 2 copper layers, 1.6 mm thick.
What parts does the 65C02 Computer use?
68 parts, built around the ATTINY4313-PU, FT230XS-R, 74HC00D and 74HC02. 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 65C02 Computer KiCad files?
From the dbuchwald/6502 repository on GitHub, at the commit this page was made from: the board is Schematics/65C02_Computer/65C02_Computer.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Can I use the 65C02 Computer 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 dbuchwald/6502
1- 2 layers101.6 × 78.7 mm

Similar boards
- 2 layers241.3 × 149.9 mm

- 2 layers177.8 × 130.8 mm

- 2 layers208 × 175 mm

- 2 layers180 × 67.5 mm

- 2 layers

- 2 layers102.5 × 75 mm

- 2 layers80 × 100 mm

P2000t slot2-datacartridge
ifilot/p2000t-tape-monitor
P2000T cartridge software for reading out tapes and copying them to external rom chip
28 parts - 4 layers99.8 × 99.8 mm
