Skip to the content
PCBKitNew board
2 layers59.4 × 37.1 mmProgrammateur, the printed circuit board in 3D

Custom In-System Programmer (ISP) for AVR microcontrollers. Built from scratch with an ATmega16U2, LUFA, and libusb.

Size
59.4 × 37.1 mm
Copper layers
2
Thickness
1.6 mm
Parts
29
Nets
35
Pads
99
Tracks, vias
189, 8
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
28 Jun 2026
Updated
11 Oct 2026

Overview

Programmateur is an open-source printed circuit board by mot-prog, from the mot-prog/avr-programmer repository on GitHub, published under the MIT licence. It is a 2-layer board of 59.4 × 37.1 mm with 29 parts on 35 nets, routed with 189 tracks and 8 vias.

It is built around the ATMEGA8U2-AU. Its parts include 8 resistors, 4 capacitors, 4 diodes, 3 connectors and 2 switches. It belongs with the interfaces and adapters boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

1

README

README.md

AVR ISP Programmer

fr

Because this was a french project, most of the code was written in French

A custom In-System Programmer (ISP) designed to flash AVR microcontrollers via USB. This project encompasses the full stack: custom hardware design (PCB), USB firmware (LUFA), and a host PC tool (libusb).

Features

  • Custom PCB: Designed with KiCad, featuring an ATmega16U2 microcontroller.
  • Low-Level USB Communication: Replaces the standard CDC class with raw IN/OUT endpoints using the LUFA stack.
  • SPI ISP Protocol: Implements the Atmel AVR910 specification for reading device signatures and erasing/writing flash memory.
  • Page Mode Writing: Supports modern AVR targets (like ATmega328P) using SPI page-mode flashing.
  • CLI Host Tool: A custom C program using libusb-1.0 to parse Intel HEX files and flash targets directly from a Linux terminal.

Architecture

1. Hardware (/hardware)

The board is built around an ATmega16U2. It exposes a standard ISP interface (MISO, MOSI, SCK, RESET) to connect to target AVRs.

  • Includes status LEDs and user buttons.
  • KiCad schematics and PCB routing files are available in the hardware/ directory.

2. Firmware (/firmware)

The brain of the programmer. Written in C using the LUFA library.

  • Processes OUT packets from the PC to execute SPI commands.
  • Transmits AVR responses (signatures, flash reads) back to the PC via IN packets.

3. PC Software (/software)

A Linux command-line interface written in C.

  • Communicates with the ATmega16U2 via libusb-1.0.
  • Parses .hex files.
  • Includes a dynamic target database to adjust page sizes and memory limits based on the detected target's ISP signature.

4. Tests with another card (/ISP_tests)

Functions to test the hardware by ISP:

  • blink.c: test the leds
  • boutons.c: test the boutons

Installation & Build

Prerequisites

You need the AVR toolchain and libusb installed on your system:

  • Arch based
bash
sudo pacman -S avr-gcc avr-libc avrdude libusb
  • Debian based
bash
sudo apt-get install gcc-avr avr-libc avrdude libusb-dev

Building the Project

A root Makefile orchestrates the cross-compilation for both the PC host and the AVR firmware.

bash
# Build firmware, PC software, and test examples
make all

Flashing the Programmer Firmware

Connect the programmer to your PC via USB. Put the ATmega16U2 board into DFU mode (Hardware RESET), then flash the compiled LUFA firmware:

  • For minicom (debugging):
bash
make minicom
  • For the main program
bash
make prog

Unplugging and replugging the USB cable it sometimes necessary to detect the AVR with the new firmawre.

Usage

Connect the programmer to your PC via USB, and wire the ISP header to your target AVR (e.g., an Arduino Uno / ATmega328P).

1. Where you put your C files In code_to_flash you put your C files. When you compile all the files (make) your C files are stored in the hex folder.

2. Read Target Flash:

bash
make read

Usefull to be sure that the code is properly written into the card

3. Write Hex File to Target:

bash
# Example
make write hex/blind.hex

Parts

29
QtyValueFootprintReferences
4510Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR2, R3, R4, R10
4LEDLED_SMD:LED_0603_1608Metric_Pad1.05x0.95mm_HandSolderD1, D2, D3, D4
210kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR1, R5
222Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR7, R9
222pCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC1, C2
2SW_PushButton_Switch_SMD:SW_SPST_TL3342HWB, RST
2SW_PushButton_Switch_THT:SW_PUSH_6mm_H4.3mmSW22, SW23
1100nCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC4
11uCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC3
1ATmega8U2-APackage_QFP:TQFP-32_7x7mm_P0.8mmU1
1AVR-ISP-6Connector_PinSocket_2.54mm:PinSocket_2x03_P2.54mm_VerticalJ1
1Conn_01x03_PinConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ3
1CrystalCrystal:Crystal_SMD_HC49-SD_HandSolderingY1
1GroundTestPoint:TestPoint_THTPad_1.0x1.0mm_Drill0.5mmTP4
1Hardware BootTestPoint:TestPoint_THTPad_1.0x1.0mm_Drill0.5mmTP3
1ResetTestPoint:TestPoint_THTPad_1.0x1.0mm_Drill0.5mmTP1
1USB_AUSB-A:USB-A-PCBJ2
1VccTestPoint:TestPoint_THTPad_1.0x1.0mm_Drill0.5mmTP2

Questions

How big is the Programmateur PCB?

It measures 59.4 × 37.1 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Programmateur use?

29 parts, built around the ATMEGA8U2-AU. 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 Programmateur KiCad files?

From the mot-prog/avr-programmer repository on GitHub, at the commit this page was made from: the board is hardware/programmateur.kicad_pcb and its schematic hardware/programmateur.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

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

Similar boards

  • 4 layers63 × 35.6 mmKibot variants arduprog, the printed circuit board in 3D

    Kibot variants arduprog

    INTI-CMNB/kibot_variants_arduprog

    A test/example of how to use KiBot assembly variants

    47 parts9MIT
  • 2 layers310 × 35 mmTrace, the printed circuit board in 3D

    Trace

    chanulee/lovelace-ruler

    LOVELACE PCB ruler: 55x25 mm reference ruler, KiCad + Figma silkscreen

    100 partsCC-BY-SA-4.0
  • 2 layers125.7 × 64.9 mmSnowBOARD, the printed circuit board in 3D

    SnowBOARD

    egeozgul/SnowBOARD

    Key features include an integrated SD card slot for data storage, a comprehensive battery power management circuit for portable applications, a USB Type-C interface for modern connectivity, and a built-in USB-to-UART…

    85 parts
  • 4 layers265 × 171.4 mmT1-panel, the printed circuit board in 3D

    T1-panel

    INTI-CMNB/kibot_variants_arduprog_site

    Example of KiBot navigate results deployment using --quick-start

    1,163 parts
  • 2 layers25 × 28 mmSerial light pro, the printed circuit board in 3D

    Serial light pro

    CRImier/MyKiCad

    My KiCad boards. Can't be bothered uploading individually anymore, so here you go.

    20 parts253GPL-3.0
  • 2 layers61.5 × 34.3 mmDwtk ice u2, the printed circuit board in 3D

    Dwtk ice u2

    dwtk/dwtk-ice

    An USB-connected In-Circuit Emulator for dwtk.

    29 parts6GPL-2.0
  • 2 layers17.5 × 107.3 mmUsb to midi, the printed circuit board in 3D

    Usb to midi

    rafaelmartins/eurorack

    Designing and building an Eurorack synthesizer at home.

    22 parts2
  • 2 layers100 × 54 mmArduinoMega2560, the printed circuit board in 3D

    ArduinoMega2560

    muhardianab/ArduinoMega2560

    Making a new Arduino Mega 2560 Board

    73 parts