Skip to the content
PCBKitNew board
2 layers297.2 × 180.3 mm8bit computer, the printed circuit board in 3D

Schematics & code for my 74LS-based 8-bit MK1 CPU

Size
297.2 × 180.3 mm
Copper layers
2
Thickness
1.6 mm
Parts
377
Nets
574
Pads
2,141
Tracks, vias
11,197, 441
Pours
3
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
1 Mar 2020
Updated
12 Dec 2022

Overview

8bit computer is an open-source printed circuit board by vascofazza, from the vascofazza/8bit-cpu repository on GitHub, published under the MIT licence. It is a 2-layer board of 297.2 × 180.3 mm with 377 parts on 574 nets, routed with 11,197 tracks and 441 vias.

It is built around the 74HCT245, 74HCT157D and 74HCT273D, with the 74HCT08D, 74HCT32D and 74LS157PC among its other parts. Its parts include 134 diodes, 81 ICs, 45 capacitors, 32 resistors and 7 switches. It belongs with the retro computing and games boards and the NXP (LPC, Kinetis, i.MX RT) boards of this library.

Main components

12

README

README.md

MK1 8bit Computer

Schematics and code for my home-made 8-bit CPU and its companion boards.

Articles about this project:

Hackaday.com

Hackster.io

InformaticaLab.com

Overview

During the past month, I designed and built a programmable 8-bit CPU from scratch, out of basic series 74LS logic ICs.

This repository contains pictures, schematics, and code for this project and its companion boards.

  • V 1.0 assembled:
  • V 2.0b assembled:
  • Helix Display Interface in action:
  • V 1.0 in action:

DEMO VIDEO (YouTube)

MK1 Computer - home-made Programmable 8bit CPU

Architecture

The MK1 CPU is composed of several modules, all connected trough a common 8-bit BUS, the status of each module is shown by dedicated LEDs.

  • The clock module is designed to allow step-by-step execution; in automatic mode the clock speed can be adjusted from 1Hz up to 32KHz.
  • The computer programs are stored in RAM and the CPU can be programmed both manually, by inserting binary machine code through dip-switches, and automatically via a USB PC interface.
    • The Programming interface is designed to be used in conjunction with an Arduino Nano or the Start9 programming board.
    • The Start9 programming board allows the loading of multiple programs stored on an on-board flash memory without the aid of an external computer device.
  • The Addressable memory space is 1024 byte, data, stack and code spaces are separated, the code address space is not writable.
  • The instructions are variable-length (see instruction-set here) 1 or 2 bytes long (first byte for the opcode, the second one for the argument), there are 4 general purpose registers (A, B, C, D) and a stack pointer register for subroutine calls.
  • The Arithmetic Logic Unit has a dedicated register for the second operand and supports the following operations:
    • Addition
    • Subtraction
    • OR
    • AND
    • NOT
    • Left/Right Shift
    • Left/Right Rotation
  • The Control Unit combinatory logic is implemented using EEPROMs (see microcode here) whilst each instruction is realized through a variable number of micro-instruction for a maximum of 6 micro-steps per instruction, including the fetch cycle. The instruction-set supports both direct and indirect memory access as well as absolute and conditional jumps on carry (CF) and zero (ZF) ALU flags.
  • The computation output can be visualized on a 4-digit display, with a dedicated register, able to represent positive and 2-complement negative numbers both in decimal and hexadecimal format.
  • The CPU can be extended thanks to the external BUS interface capable of handling up to 2 peripheral. The communication is bidirectional, the devices can send interrupts to the CPU to notify when new data is available. Interrupts are cleared once the data has been processed.
    • The only available peripheral at the moment is the Helix display interface, an ATmega328-driven 2x16 LCD output display.

Structure

  • MK1 CPU/:
    • 8bit-computer/: KiCad project, schematics and PCB design of the MK1 CPU.
    • code/:
      • microcode.py: generates the binary EEPROM microcode.
      • out_display.py: generates the binary output display EEPROM code.
      • uploader.py: uploads a binary MK1 program to the CPU.
      • mk1_computer_uploader/: Arduino programmer interface sketch.
    • assembler/: fork of the hlorenzi's assembler, improved and customized for the MK1
    • programs/: a collection of programs for the MK1 CPU plus the assembler definition
  • start9_programming_interface/:
    • programming_interface/: KiCad project, schematics and PCB design of the Start9 programming board.
    • code/start9_programming_interface/: Arduino code for the programming interface.
  • helix_display_interface/:
    • display_interface/: KiCad project, schematics and PCB design of the Helix display interface board.
    • code/helix_display_interface/: Arduino code for the display interface.
  • eeprom_programmer/: KiCad project, schematics and PCB design of a simple Arduino-based eeprom programmer
  • bus_breakout/: KiCad project, schematics and PCB design of the external bus connector breakout board.

Changelog

V2.0d:
  • minor hardware revision
  • revisited PCB design
  • new memory architecture, code memory section is read-only, stack and data live on separated spaces
V2.0b:
  • minor hardware revision
  • Variable-length instructions (1 or 2 bytes)
  • new custom assembler, thanks to https://github.com/hlorenzi/customasm
  • few new instructions
  • revisited microcode and instruction-set
V2.0:
  • 4 general purposes registers (A, B, C, D)
  • Stack Pointer implemented as an up-down counter
  • External interface and interrupt handling
  • Output display decodes HEX and ASCII values
  • Clock speed multipliers
  • Control Unit extended with 4 EEPROMs
  • Variable step microcode counter length (each instruction uses the minimum amount of micro-steps)
  • revisited microcode and instruction-set
V1.0:
  • Bugfixes.
  • HL and STK address signals available in the MAR dip-switch.
V0.1:
  • Initial release

Parts

377
QtyValueFootprintReferences
43BLUELED_THT:LED_D3.0mmD10, D100, D101, D102, D103, D104, D105, D106, D107, D108, D109, D110, D111, D112, D113, D114 +27
41GREENLED_THT:LED_D3.0mmD11, D12, D13, D14, D15, D16, D17, D18, D127, D128, D129, D130, D131, D132, D133, D134 +25
25REDLED_THT:LED_D3.0mmD1, D2, D3, D21, D22, D23, D24, D25, D26, D27, D28, D29, D30, D31, D32, D33 +9
21YELLOWLED_THT:LED_D3.0mmD38, D39, D40, D41, D42, D43, D44, D45, D48, D55, D56, D57, D58, D59, D60, D61 +5
190.1µFCapacitor_THT:C_Disc_D4.3mm_W1.9mm_P5.00mmC10, C11, C12, C14, C15, C18, C22, C23, C25, C28, C29, C30, C34, C36, C37, C40 +3
151KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR3, R5, R6, R7, R8, R9, R10, R11, R14, R15, R17, R25, R26, R27, R28
141KResistor_THT:R_Array_SIP9RN3, RN7, RN9, RN10, RN11, RN12, RN13, RN14, RN15, RN16, RN17, RN18, RN19, RN20
1174HCT245Package_DIP:DIP-20_W7.62mmU8, U14, U42, U48, U49, U52, U56, U59, U65, U70, U80
10*Capacitor_THT:C_Disc_D4.3mm_W1.9mm_P5.00mmC13, C16, C21, C26, C31, C32, C33, C35, C38, C43
1010KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR12, R18, R19, R20, R21, R22, R29, R30, R31, R32
974HCT157Package_DIP:DIP-16_W7.62mmU17, U18, U20, U23, U45, U62, U63, U67, U68
80.01µFCapacitor_THT:C_Disc_D4.3mm_W1.9mm_P5.00mmC3, C6, C7, C9, C19, C20, C39, C45
874HCT273Package_DIP:DIP-20_W7.62mmU9, U19, U32, U34, U57, U61, U66, U81
774HCT08Package_DIP:DIP-14_W7.62mmU5, U10, U26, U27, U29, U58, U64
574HCT32Package_DIP:DIP-14_W7.62mmU1, U2, U12, U25, U28
4220Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1, R2, R23, R24
474LS157Package_DIP:DIP-16_W7.62mmU30, U31, U50, U51
47SEGMENT_CCDisplay_7Segment:7SegmentLED_LTS6760_LTS6780U37, U39, U40, U41
4AM29F040Housings_LCC:PLCC-32_THT-SocketU73, U74, U75, U76
4MountingHole_3.2mm_M3MountingHole:MountingHole_3.2mm_M3MH0, MH1, MH2, MH3
4NE555Package_DIP:DIP-8_W7.62mmU3, U6, U7, U33
4WHITELED_THT:LED_D3.0mmD19, D20, D88, D89
30.01µfCapacitor_THT:C_Disc_D4.3mm_W1.9mm_P5.00mmC24, C27, C44
3470Resistor_THT:R_Array_SIP9RN2, RN4, RN5
374HCT161Package_DIP:DIP-16_W7.62mmU43, U44, U72
374HCT86Package_DIP:DIP-14_W7.62mmU21, U22, U24
3REG-ITestPoint:TestPoint_Pad_1.0x1.0mmTP5, TP27, TP41
3~REG-OTestPoint:TestPoint_Pad_1.0x1.0mmTP4, TP26, TP40
210µFCapacitor_THT:CP_Radial_D5.0mm_P2.00mmC1, C2
21µFCapacitor_THT:CP_Radial_D5.0mm_P2.00mmC4, C8
2220Resistor_THT:R_Array_SIP9RN6, RN8
274HCT00Package_DIP:DIP-14_W7.62mmU46, U55
274HCT02Package_DIP:DIP-14_W7.62mmU13, U69
274HCT04Package_DIP:DIP-14_W7.62mmU4, U60
274HCT107Package_DIP:DIP-14_W7.62mmU35, U71
274HCT193Package_DIP:DIP-16_W7.62mmU53, U54
274HCT238Package_DIP:DIP-16_W7.62mmU78, U79
274HCT283Package_DIP:DIP-16_W7.62mmU15, U16
10.01Capacitor_THT:C_Disc_D4.3mm_W1.9mm_P5.00mmC17
1100KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR16
110KResistor_THT:R_Array_SIP9RN1
11MPotentiometer_THT:Potentiometer_Bourns_PTV09A-1_Single_VerticalRV1
128C64Package_DIP:DIP-28_W15.24mm_SocketU36
1330KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR4
1470Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR13
174HCT138Package_DIP:DIP-16_W7.62mmU77
174HCT139Package_DIP:DIP-16_W7.62mmU38
174HCT173Package_DIP:DIP-16_W7.62mmU11
1AITestPoint:TestPoint_Pad_1.0x1.0mmTP29
1ANDTestPoint:TestPoint_Pad_1.0x1.0mmTP10
1AddressButton_Switch_THT:SW_DIP_SPSTx10_Slide_9.78x27.58mm_W7.62mm_P2.54mmSW5
1Arduino NanoModule:Arduino_NanoA1
1Arduino_VINJumper:SolderJumper-2_P1.3mm_Bridged_RoundedPad1.0x1.5mmJP1
1Barrel_Jack_SwitchConnector_BarrelJack:BarrelJack_HorizontalJ2
1CFTestPoint:TestPoint_Pad_1.0x1.0mmTP8
1CLKTestPoint:TestPoint_Pad_1.0x1.0mmTP2
1CLK_INTestPoint:TestPoint_Pad_1.0x1.0mmTP1
1CY62256Package_DIP:DIP-28_W15.24mm_SocketU47
1DataButton_Switch_THT:SW_DIP_SPSTx08_Slide_9.78x22.5mm_W7.62mm_P2.54mmSW9
1E0TestPoint:TestPoint_Pad_1.0x1.0mmTP34
1E1TestPoint:TestPoint_Pad_1.0x1.0mmTP36
1EITestPoint:TestPoint_Pad_1.0x1.0mmTP11
1EXT-CONNConnector_PinHeader_2.54mm:PinHeader_2x09_P2.54mm_VerticalJ4
1EXT_INTestPoint:TestPoint_Pad_1.0x1.0mmTP35
1IITestPoint:TestPoint_Pad_1.0x1.0mmTP28
1KiCad-Logo2_8mm_SilkScreenSymbol:KiCad-Logo2_8mm_SilkScreenG2
1LOGOSymbol:parrotG0
1MITestPoint:TestPoint_Pad_1.0x1.0mmTP15
1ManualButton_Switch_THT:SW_NKK_GW12LJPSW3
1ModeButton_Switch_THT:SW_DIP_SPSTx03_Slide_9.78x9.8mm_W7.62mm_P2.54mmSW6
1MultiplierButton_Switch_THT:SW_DIP_SPSTx03_Slide_9.78x9.8mm_W7.62mm_P2.54mmSW1
1NOTTestPoint:TestPoint_Pad_1.0x1.0mmTP13
1OITestPoint:TestPoint_Pad_1.0x1.0mmTP16
1ORTestPoint:TestPoint_Pad_1.0x1.0mmTP9
1OSHW-Logo_11.4x12mm_SilkScreenSymbol:OSHW-Logo_11.4x12mm_SilkScreenG3
1PETestPoint:TestPoint_Pad_1.0x1.0mmTP18
1ProgButton_Switch_THT:SW_DIP_SPSTx01_Slide_9.78x4.72mm_W7.62mm_P2.54mmSW4
1PulseButton_Switch_THT:SW_PUSH_6mm_H5mmSW2
1RGTTestPoint:TestPoint_Pad_1.0x1.0mmTP31
1RITestPoint:TestPoint_Pad_1.0x1.0mmTP21

The 354 most common of 377 parts.

Questions

How big is the 8bit computer PCB?

It measures 297.2 × 180.3 mm and has 2 copper layers, 1.6 mm thick.

What parts does the 8bit computer use?

377 parts, built around the 74HCT245, 74HCT157D, 74HCT273D and 74HCT08D. 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 8bit computer KiCad files?

From the vascofazza/8bit-cpu repository on GitHub, at the commit this page was made from: the board is MK1_CPU/8bit-computer/8bit-computer.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the 8bit 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 vascofazza/8bit-cpu

4
  • 2 layers96.5 × 55.2 mmDisplay interface, the printed circuit board in 3D

    Display interface

    vascofazza/8bit-cpu

    Schematics & code for my 74LS-based 8-bit MK1 CPU

    16 parts317MIT
  • 2 layers53.3 × 48.3 mmProgramming interface, the printed circuit board in 3D

    Programming interface

    vascofazza/8bit-cpu

    Schematics & code for my 74LS-based 8-bit MK1 CPU

    15 parts317MIT
  • 2 layers68.7 × 53.5 mmArduino eeprom programmer, the printed circuit board in 3D

    Arduino eeprom programmer

    vascofazza/8bit-cpu

    Schematics & code for my 74LS-based 8-bit MK1 CPU

    9 parts317MIT
  • 2 layers57.1 × 41.9 mmBus breakout, the printed circuit board in 3D

    Bus breakout

    vascofazza/8bit-cpu

    Schematics & code for my 74LS-based 8-bit MK1 CPU

    4 parts317MIT

Similar boards

  • 4 layers244.5 × 393.4 mm8-bit cpu, the printed circuit board in 3D

    8-bit cpu

    nurk/8-bit-cpu

    8-bit CPU

    458 parts
  • 2 layers368.3 × 215.9 mmTTL 6510 Computer fab, the printed circuit board in 3D

    TTL 6510 Computer fab

    StefansAI/TTL-6510-Computer

    Yet another CPU made from TTL chips

    330 parts1
  • 2 layers235 × 158.8 mmGigatron, the printed circuit board in 3D

    Gigatron

    flypie/Gigatron

    This is a version of the files from https://gigatron.io/ altered to work on a vanilla KiCAD 5.1.6. Changes are minimal in the schematic and PCB, layout has only been changed where dimensions or orientations changed as a…

    151 parts2
  • 2 layers214.6 × 123.2 mmFISC2, the printed circuit board in 3D

    FISC2

    DoctorWkt/2FISC

    FISC2: A TTL CPU with Some 16-bit Capabilities

    73 parts10GPL-3.0
  • 4 layers161.1 × 82.9 mmAll in one smc, the printed circuit board in 3D

    All in one smc

    nojan1/project-wrass

    The purpose of Project Wrass is to develop the Wrass 1.

    150 parts
  • 2 layers300 × 200 mmModel 150, the printed circuit board in 3D

    Model 150

    Julesc013/project-carbon

    Hardware and software for custom CPUs, FPUs, and computer systems.

    377 parts
  • 2 layers200 × 150 mmMSX ONE, the printed circuit board in 3D

    MSX ONE

    jdgabbard/MSX-ONE-Computer

    MSX 1 Computer from discrete parts

    114 parts28GPL-3.0
  • 2 layers102 × 96 mmPc sp, the printed circuit board in 3D

    Pc sp

    TomNisbet/nqsap-pcb

    NQSAP 8-bit computer PCB version

    65 parts18MIT