Skip to the content
2 layers98.3 × 95.3 mmAsm pong, the printed circuit board in 3D

An implementation of Pong in assembly (pic-as) running on a PIC16F18346

Size
98.3 × 95.3 mm
Copper layers
2
Thickness
1.6 mm
Parts
52
Nets
59
Pads
186
Tracks, vias
433, 53
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
3 Aug 2026
Updated
23 Oct 2026

Overview

Asm pong is an open-source printed circuit board by tecknet-gg, from the tecknet-gg/asm-pong repository on GitHub, published under the MIT licence. It is a 2-layer board of 98.3 × 95.3 mm with 52 parts on 59 nets, routed with 433 tracks and 53 vias.

It is built around the 74HC595. Its parts include 20 resistors, 9 capacitors, 7 ICs, 4 connectors and 2 switches. It belongs with the PIC boards of this library.

Main components

1

README

README.md

asm-pong

pong implemented in assembly!

What!?

Basically what the subheading said! The classic game of pong implemented in assembly, running on a PIC16F18346 based console(-ish).

The PIC16F18346 console boasts a whopping 2KB of RAM, and a massive 28KB of flash memory, clocked at a blazing 32MHz! The game is displayed on a 128x64px OLED screen, with the player paddles being controlled by two potentiometers. Scores are displayed on two dedicated seven segment displays, with the sound effects being generated by a singular active buzzer. The console uses 3.3V, supplied by a regulated (up to 6V) power supply. Also features a dedicated ICSP header for easy programming using a PICkit3 or similar.

Hardware Overview

  • PIC16F18346: Enhanced 8 bit, 20 pin mid-range PIC
  • SSD1306: 128x64 pixel SPI OLED screen
  • Alps RK09: Input potentiometers
  • MCP1700-3302E: 3.3V regulated input
  • 74HC595N: Daisy chained shift registers
  • LD3161-AS: 0.36" red seven segment displays

BOM

The detailed bill of materials file can be found under pcb/production/bom.csv. All the components were sourced from AliExpress besides the PIC, since LCSC has much better pricing for the same. The table is reproduced below for convenience.

[!Note] The capacitor and resistor pricing is the entire bundle price, including all the required values for this project.

ItemQuantityDescriptionPriceSource
PIC16F18346-I/P1Microcontroller£1.81LCSC
100nF Ceramic Capacitor7Decoupling capacitor£1.93AliExpress
1µF Electrolytic Capacitor2Bulk capacitor£1.96AliExpress
SSD13061OLED screen£2.33AliExpress
SN74HC5952Shift registers£0.80AliExpress
LD-3161-AS2Seven-segment display£2.33AliExpress
Tactile Buttons2Push buttons£1.16AliExpress
RV09 Potentiometers2Potentiometers£1.08AliExpress
Buzzer1Active buzzer£1.80AliExpress
2N2222 NPN1Buzzer transistor£1.00AliExpress
1N4148 Diode1Flyback diode£1.00AliExpress
Knurled Metal Tone Knob2Potentiometer knob£2.01AliExpress
MCP1700-3302E/TO13.3V LDO£2.39AliExpress
DC Power Barrel1VIN input£1.00AliExpress
220Ω THT Resistor16Current limiting£2.69AliExpress
10kΩ THT Resistor3RC/MCLR pull-up£2.69AliExpress
1kΩ THT Resistor1Transistor base resistor£2.69AliExpress
PICkit 31ICSP programmer£14.19AliExpress
PCB5Custom PCB~pcb/production

Schematic

image

PCB

image

Assembly

PCB production files can be found under pcb/production. Board is under 100x100mm, so should cost less than $5 for five boards from either PCBWay or JLCPCB. I personally sourced them from JLC. All components are THT, so they should be very easy to solder. Follow the component references as given by the schematic pdf. Its a straightforward assembly, there isn't much else to say!

The case can be found in the case directory. The taper angle is 15º, so I would recommend printing the model angled at 15º such that the top face is parallel to the bed, with ironing turned on for the best finish. PLA is the recommended material.

With the case printed, the PCB mounts using the M2 mounting holes. No extra hardware needed, it just slots into the case. The case also has small indents in the bottom for rubbery grips. Just fill the indents with hot-glue, then overfill the indent very slightly to make a rubber grip.

Modifying source code

If you would like to make your own changes to the source code, you'll obviously have to recompile to get the new .hex! To get you started on that, here are a few recommendations.

First, I would lean towards using VSCode over MPLABX IDE. VSCode does require a fair bit more setup, over MPLABX, which is just plug and play, but in my opinion, the overall developer experience is worth that effort, since you get access to all of VSCode's quality of life features.

If you end up using VSCode, you'll need to install the MPLAB extension pack. Using the MCC that comes installed with this pack, you can configure your config bits and such. With that, you then set the compiler to PIC Assembly (PIC-AS/XC8). I would also then recommend you make a custom build task in .vscode/task.json, similar to this:

json
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Build PIC HEX",
            "type": "shell",
            "command": "cmake --build _build/asm-pong/default && cp $(find out -name '*.hex' | head -n 1) out/output.hex",
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "problemMatcher": [],
            "presentation": {
                "echo": true,
                "reveal": "always",
                "focus": false,
                "panel": "shared",
                "showReuseMessage": false,
                "clear": false
            }
        }
    ]
}

Hitting the build shortcut will then produce the output.hex that you can then flash.

If you choose to go down the MPLABX IDE, all the build tasks and such should work natively without any setup. You also have easier access to the simulators and such.

Flashing firmware

To flash the firmware to the PIC, you need to use the ICSP header. The easiest way to flash the firmware is with a PICkit3 or above, and the MPLAB IPE Software (you may have to install the PIC16F1xxxx pack manually).

[!NOTE] MPLAB IPE support for legacy PICkits (2 and 3) was dropped after v6.20. These PICkits are cheaper to purchase, and work just fine for this use case. To use with MPLAB IPE, install v6.20 or prior. My PIC was flashed with a PICkit3 using MPLAB IPE v6.00. Alternatively, you can use a terminal utility like ipecmd, pkcmd-lx or similar.

[!NOTE] You can also flash the PIC by bit banging the ICSP protocol on another microcontroller. You do not need a level shifting circuit since Low Voltage Programming should be supported by the PIC16F18346. This has NOT been verified.

Assuming you're using a PICkit with MPLAB IPE, select the PIC16F18346 under devices, and your tool in the tool selection menu. If the software isn't detecting your PICkit, unplug it, hold down the button, then plug it back in, keeping the button pressed for a few more seconds. Then double check if is being detected as connected to a port on your system information panel. Once you have it connected, enable the advanced mode (under Settings > Advanced Mode). With this enabled, you should see various settings appear on the sidebar. Go to the power setting, and tick the box saying "Power target circuit from PIC". Ensure the PIC16F18346 (and the console by extension), is powered by 3.3V before proceeding.

[!NOTE] If you can't see the PIC under the device options, you probably don't have the pack installed and linked. Download the pack here. Locate the .mchp_packs directory, and drop the file in there.

[!WARNING] If you fail to check "Power target circuit from PIC", you may damage either the PICkit, or the PIC itself. Double check this setting is enabled, and read the output logs as the PICkit connects to the PIC.

With all that setup, plug in the PICkit's headers into the ICSP header on the board. The top pin of the header (pin closest to the screen) is MCLR. Match that with the pinout of your PICkit. Now download and load the .hex file into the IPE, and click program. Et voila, you should have a fully programmed PIC!

[!NOTE] If you see glitchy behaviour, or the screen not starting up, make sure the PCB is disconnected from the programmer. When the headers are still connected, it behaves oddly. After that, hit the reset button to re-boot the PIC.

Demo

A demo video of an entire game being played out can be found on my YouTube channel. Here is a picture of the completed build!

IMG_20260828_135939

Parts

52
QtyValueFootprintReferences
8330Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR4, R6, R8, R10, R12, R14, R16, R18
7100nFCapacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mmC1, C2, C3, C4, C5, C6, C7
6330ΩResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR5, R7, R9, R13, R15, R17
4MountingHoleMountingHole:MountingHole_2.2mm_M2H1, H2, H3, H4
310kΩResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1, R2, R19
21uFCapacitor_THT:C_Radial_D4.0mm_H7.0mm_P1.50mmC8, C9
2220ΩResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR3, R11
274HC595Package_DIP:DIP-16_W7.62mm_Socket_LongPadsU2, U4
2R_PotentiometerPotentiometer_THT:Potentiometer_Alps_RK09K_Single_VerticalPaddle1, Paddle2
11kΩResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR20
12N2222Package_TO_SOT_THT:TO-92_Inline_WideQ1
1BuzzerBuzzer_Beeper:Buzzer_12x9.5RM7.6BZ1
1D_SmallDiode_THT:D_DO-35_SOD27_P7.62mm_HorizontalD1
1Debug 1Connector_PinHeader_2.54mm:PinHeader_2x02_P2.54mm_VerticalJ2
1Debug 2Connector_PinHeader_2.54mm:PinHeader_2x02_P2.54mm_VerticalJ3
1ICSPConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ1
1LOGOLOGOG***
1MCP1700x-330xxTOPackage_TO_SOT_THT:TO-92_InlineU7
1PIC16F18346-PPackage_DIP:DIP-20_W7.62mm_SocketU1
1PowerConnector_BarrelJack:BarrelJack_HorizontalP1
1RESETButton_Switch_THT:SW_PUSH-12mmSW2
1SCORE 1Display_7Segment:0.36in 3161ASU3
1SCORE 2Display_7Segment:0.36in 3161ASU5
1SSD1306Connector_PinSocket_2.54mm:PinSocket_1x07_P2.54mm_VerticalU6
1STARTButton_Switch_THT:SW_PUSH-12mmSW1

Similar boards

  • 2 layers45.7 × 31.8 mmLEDx16 board, the printed circuit board in 3D

    LEDx16 board

    tardate/LittleArduinoProjects

    a collection of "Little Electronic & Arduino Projects", most involving electronics or an Arduino in one way or another!

    36 parts803MIT
  • 2 layers228.6 × 100 mmMongus48, the printed circuit board in 3D

    Mongus48

    ChrisChrisLoLo/beyblock20

    The magnetic, modular, 20-key macropad that can join together to form an ortholinear board

    124 parts335GPL-3.0
  • 2 layers245.1 × 160 mm8-Bit CPU 32k, the printed circuit board in 3D

    8-Bit CPU 32k

    slu4coder/Minimal-64x4-Home-Computer

    My DIY TTL home computer with VGA and PS/2 and 4x the processing power of a Commodore C64 or Apple II.

    139 parts326
  • 2 layers100 × 95.1 mmProtoboard-6x4-breakout, the printed circuit board in 3D

    Protoboard-6x4-breakout

    electroniceel/protoboard

    Advanced protoboard layout with 1.27mm pitch for smd parts

    4,745 parts311CC-BY-4.0
  • 4 layers140 × 100 mmDc usv, the printed circuit board in 3D

    Dc usv

    TobleMiner/DC-UPS

    A small DC UPS, designed to keep small appliances like consumer network equipment running during power outages

    351 parts223CERN-OHL-P-2.0
  • 2 layers100.5 × 218.3 mmTraktorino, the printed circuit board in 3D

    Traktorino

    silveirago/traktorino

    The open-source DIY MIDI Controller for DJs.

    96 parts220
  • 2 layers287.8 × 126.7 mmNoName, the printed circuit board in 3D

    NoName

    AlaaSaadAbdo/battoota

    Keyboards

    267 parts188
  • 2 layers100 × 100 mmTommyPROM32-595, the printed circuit board in 3D

    TommyPROM32-595

    TomNisbet/TommyPROM

    Simple Arduino-based EEPROM programmer

    36 parts187

Questions

How big is the Asm pong PCB?

It measures 98.3 × 95.3 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Asm pong use?

52 parts, built around the 74HC595. 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 Asm pong KiCad files?

From the tecknet-gg/asm-pong repository on GitHub, at the commit this page was made from: the board is pcb/pcb.kicad_pcb and its schematic pcb/pcb.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

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