Skip to the content
4 layers62 × 67 mmAdapter, the printed circuit board in 3D

TinyGo firmware for an RP2350-based USB/PoE-LAN instrument gateway: bridges USBTMC/USB488 and HiSLIP to GPIB

Size
62 × 67 mm
Copper layers
4
Thickness
1.61 mm
Parts
92
Nets
116
Pads
381
Tracks, vias
1,208, 102
Pours
3
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
23 Sep 2026
Updated
14 Oct 2026

Overview

Adapter is an open-source printed circuit board by tridentsx, from the tridentsx/tmc-gateway repository on GitHub. It is a 4-layer board of 62 × 67 mm with 92 parts on 116 nets, routed with 1,208 tracks and 102 vias.

It is built around the RP2354A, SN75160BDW and SN75161BDW, with the DP9900LPB-5V1.4A, AP2114H-3.3TRG1 and W5500 among its other parts. Its parts include 30 resistors, 26 capacitors, 6 ICs, 4 connectors and 3 diodes. It belongs with the interfaces and adapters boards and the RP2350 boards of this library.

Main components

12

README

README.md

tmc-gateway

A PoE Ethernet- and USB-attached GPIB instrument gateway: one small board, plugged directly into an instrument's IEEE-488 connector, that exposes it to the network and to USB simultaneously.

What it does

One RP2354A-based adapter per GPIB instrument, acting as that instrument's GPIB System Controller and Controller-in-Charge, reachable over:

  • HiSLIP (IVI-6.1) over Ethernet/PoE, TCP port 4880
  • USBTMC and its USB488 subclass over USB
  • Raw SCPI over TCP port 5025 (planned; not yet built)

The central architectural rule, carried over from the design specification:

HiSLIP, USBTMC/USB488, raw SCPI, and any future management interface never manipulate GPIB pins directly. They submit operations to one serialized GPIB engine.

That engine is gpib.Instrument — see Software below.

Hardware

MCURP2354A (RP2350 family, 2 MB integrated flash), QFN-60
EthernetWIZnet W5500 (SPI)
PoEDP9900LPB isolated PD module, IEEE 802.3af, with a USB-C alternate power path (§30.1)
GPIB transceiversTI SN75160B (data bus) + SN75161B (management bus)
GPIB connector24-pin IEEE-488, NorComp 112-024-113R001
USBUSB-C (USBTMC/USB488, plus alternate power input)

Board is 62×68 mm, 4 copper layers. Schematic is complete and verified — confirmed by actually running the checks below, not just citing an old note: scripts/netlist-check.py reports 124 checks, 0 failures; ERC reports 3 pin_not_driven errors, all on W5500 (U2) SPI inputs (SCS/SCLK/MOSI) flagged because the driving RP2354A pins are bidirectional across a hierarchical sheet link — a severity-policy question, not a wiring defect. PCB has all 93 footprints placed but is not yet routed.

  • docs/design-spec.md — the master design specification. One document by design: Part I is the HiSLIP library (tridentsx/hislip, developed in that separate repository), Part II is this hardware, Part III is this firmware, and Parts IV–VII (milestones, acceptance criteria, design decisions, risk register) span all three. Source comments in hislip cite it by section, e.g. "§5.1".
  • docs/netlist-spec.md / docs/netlist-spec.nets — the canonical net table scripts/netlist-check.py verifies the exported schematic netlist against.
  • docs/rp2354a-pinmap.md — the RP2354A GPIO assignment: 8 data lines and the DAV/NDAC/NRFD handshake lines suggested for PIO, ATN/SRQ/REN/IFC/EOI as plain GPIO, SPI0 to the W5500.

Software

text
gpib/            the Instrument abstraction every front end drives (no
                  firmware, no bus driver -- just the interface)
hislipfront/      adapts gpib.Instrument to tridentsx/hislip's server.Device
usbtmcfront/      adapts gpib.Instrument to USBTMC/USB488 Bulk-OUT messages
usbep/            portable, unit-tested USB packet reassembly (host->device)
                  and chunking (device->host) usbtmcfront's messages ride on
cmd/firmware/     the real (skeleton) RP2354A firmware entry point --
                  tinygo-only, gated by the "tinygo" build tag
cmd/tinygocheck/  not firmware -- exists so `just tinygo` has a real main
                  package to build and link, exercising gpib/hislipfront/
                  usbtmcfront together under mainline go's dependency
                  graph but a real tinygo build
cmd/debugconsole/ host-side only (plain go build, no tinygo tag): a
                  terminal UI for cmd/firmware's CDC debug console

gpib.Instrument is deliberately not a copy of hislip/server.Device, despite both stating the identical "must not know it's GPIB" principle: RemoteEnable, LocalLockout, and GoToLocal are three separate methods here, because USB488's own control requests (REN_CONTROL, GO_TO_LOCAL, LOCAL_LOCKOUT) are three separate requests, not HiSLIP's one combined RemoteLocal(mode) call. Both front ends translate onto the same granular primitives instead of one needing to reconstruct a combined mode it never actually received.

Status

PieceState
gpib.Instrument abstractionDefined
hislipfront (HiSLIP → gpib.Instrument)Implemented, unit-tested
usbtmcfront (USBTMC/USB488 → gpib.Instrument)Core Bulk-OUT dispatch implemented, unit-tested — see scope below
usbep (USB packet reassembly/chunking)Implemented, unit-tested — real edge cases (exact-multiple-of-packet-size, empty message, byte-at-a-time feed)
cmd/firmware (real USB descriptor + endpoint wiring)Skeleton exists and actually builds: tinygo build -target=pico2 produces a real, well-formed flashable UF2. Backed by a stub gpib.Instrument — no real GPIB bus driver yet. Verified on real hardware (a W5500-EVB-Pico2, RP2350): descriptor enumerates exactly as designed, and a real USBTMC RequestDevDepMsgIn round trip over EP3 OUT/IN produces a correctly encoded response — see below.
GPIB bus driver (the concrete gpib.Instrument)Not started
Raw SCPI front endNot started

Real, load-bearing constraints found by reading TinyGo 0.42.0's actual machine/usb source (not assumed): it hardcodes a maximum of 3 USB interfaces total (a fixed-size array, not a slice), so a USB CDC debug console (2 interfaces) plus USBTMC (1) exactly fills the budget, with no room left for anything else on this port. Its outgoing-transfer path does not itself split a payload larger than one packet across multiple packets — that's what usbep.ChunkSender and cmd/firmware's TxHandler callback do, deliberately, rather than being handled for free by the framework.

usbtmcfront's stated scope, deliberately not (yet) covered:

  • Works on one already-reassembled logical USBTMC message, not raw USB transfers — splitting a message across several USB packets and the alignment padding USBTMC requires between messages is a transport-framing concern for whatever wires it to a real USB endpoint later, the same split hislip/server's Stream abstraction makes.
  • TermChar-based early read termination is decoded but ignored.
  • Every control-transfer-based USBTMC/USB488 request — GET_CAPABILITIES, INITIATE_CLEAR, READ_STATUS_BYTE, REN_CONTROL, GO_TO_LOCAL, LOCAL_LOCKOUT, the abort requests — is not implemented at all; only the three Bulk-OUT message types (DevDepMsgOut, RequestDevDepMsgIn, Trigger) are.

One real, non-mechanical piece of protocol work is still open before the bus driver can start: the real IEEE-488.1 three-wire handshake and ATN-based addressing. Nothing here has been verified against real GPIB hardware yet; treat any bus-timing claim in this repo's history as reasoned from the spec text, not measured.

Real-hardware findings (cmd/firmware, W5500-EVB-Pico2 / RP2350)

Confirmed by actually flashing and exercising the board, not just building for it:

  • The composed descriptor (CDC debug console + USBTMC/USB488) enumerates exactly as designed: 3 interfaces, correct classes (CDC 0x02/0x02/0x01
    • 0x0A/0x00/0x00, USBTMC/USB488 0xFE/0x03/0x01), correct endpoint addresses (0x03/0x83 for the shared USBTMC bulk endpoint).
  • A real RequestDevDepMsgIn Bulk-OUT write followed by a Bulk-IN read, issued from the host with go-usb, round-trips correctly end to end through usbtmcRxHandler → usbep.Reassembler → usbtmcfront.Handler → usbep.ChunkSender → usbtmcTxHandler.
  • Two real firmware bugs were found and fixed this way, both specific to running inside TinyGo's bare-metal USB interrupt handlers, not to the protocol logic itself:
    1. main() called machine.EnableCDC a second time. TinyGo's own runtime (initUSB, which runs before main) already calls it via machine/usb/cdc.EnableUSBCDC with working handlers; the redundant call overwrote them with no-op stubs, silently breaking the debug console.
    2. usbtmcRxHandler called println, reasm.Feed, append, and usbtmcfront.Handler.HandleBulkOut directly — all either blocking or allocating — from inside a USB interrupt handler. TinyGo's bare-metal allocator is not interrupt-safe, so this corrupted state the moment a real bulk transfer arrived. The handler now only copies the raw packet into a fixed-size ring with a plain array copy (no allocation, no blocking); reassembly, dispatch, and response encoding all run in the main loop instead, which drains that ring alongside a lightweight event log and a heartbeat print, giving an unambiguous liveness signal during this kind of debugging.

Built for the next real-hardware session, not just this one: cmd/firmware's CDC console is now interactive (help/version/ stats/last/clear/uptime/ping), backed by persistent counters (packets in, messages reassembled, responses sent, ring overflows, TX failures) and a bounded hex dump of the last message/response — confirmed working on real hardware, including the counters incrementing correctly across a real bulk transfer and last showing the exact bytes exchanged. See cmd/firmware/debug.go. version reports the exact git commit (plus -dirty if built from an uncommitted tree) and build time, baked in by just firmware's -ldflags -X, so it's possible to confirm which build is actually running on a given board.

cmd/debugconsole is the host-side companion: a terminal UI (go run ./cmd/debugconsole, or just debugconsole) with a menu of the commands above plus a free-text box for anything not in that list yet, so a real-hardware session doesn't mean hand-typing into screen/ picocom/a pyserial script. Plain go build, no tinygo tag — runs on the development machine against an already-flashed, already-connected board, never on the RP2350 itself.

Related repositories

  • tridentsx/hislip — the HiSLIP protocol/server/client library this board's Ethernet-side front end is built on. Intended, once finished, to be offered to the gotmc organisation.
  • tridentsx/usbtmc — a fork of gotmc/usbtmc adding a driver backed by tridentsx/go-usb (no cgo, no libusb), intended to be contributed upstream. Its new wire subpackage is the USBTMC wire-format vocabulary this board's USB-side front end will build on.
  • tridentsx/go-usb — the pure-Go USB backend behind the usbtmc driver above.

Building what exists today

sh
go build ./...
go vet ./...
go test ./...
sh
kicad-cli sch export netlist --format kicadsexpr -o build/adapter.net hardware/adapter.kicad_sch
python3 scripts/netlist-check.py docs/netlist-spec.nets build/adapter.net   # expect 131/0
kicad-cli sch erc --severity-error -o /tmp/erc.rpt hardware/adapter.kicad_sch

Parts

92
QtyValueFootprintReferences
9100nCapacitor_SMD:C_0805_2012MetricC2, C3, C4, C8, C9, C10, C12, C18, C22
810kResistor_SMD:R_0805_2012MetricR2, R7, R9, R15, R25, R26, R27, R28
54u7Capacitor_SMD:C_0805_2012MetricC5, C6, C7, C13, C17
43R3Resistor_SMD:R_0805_2012MetricR20, R21, R22, R23
449R9Resistor_SMD:R_0805_2012MetricR10, R12, R13, R17
31uCapacitor_SMD:C_0805_2012MetricC16, C23, C24
20RResistor_SMD:R_0805_2012MetricR1, R11
2100kResistor_SMD:R_0805_2012MetricR6, R8
215pCapacitor_SMD:C_0805_2012MetricC25, C26
218pCapacitor_SMD:C_0805_2012MetricC14, C15
2330Resistor_SMD:R_0805_2012MetricR16, R24
24k7Resistor_SMD:R_0805_2012MetricR4, R5
25k1Resistor_SMD:R_0805_2012MetricR29, R30
2MB6S-TPadapter:MBS_L4.7-W4.0-P2.50-LS7.0-TLD1, D2
2MountingHole_PadMountingHole:MountingHole_3.2mm_M3_PadH1, H2
110RResistor_SMD:R_0805_2012MetricR3
110nCapacitor_SMD:C_0805_2012MetricC19
110uCapacitor_SMD:C_0805_2012MetricC11
1112-024-113R001adapter:CONN_112-024-113R001_NRCJ1
112MHzCrystal:Crystal_SMD_3225-4Pin_3.2x2.5mmX1
112k4Resistor_SMD:R_0805_2012MetricR19
11MResistor_SMD:R_0805_2012MetricR14
11kResistor_SMD:R_0805_2012MetricR18
11nCapacitor_SMD:C_0805_2012MetricC1
122nCapacitor_SMD:C_0805_2012MetricC21
125MHzCrystal:Crystal_SMD_3225-4Pin_3.2x2.5mmX2
12N7002Package_TO_SOT_SMD:SOT-23Q2
13u3Inductor_SMD:L_0805_2012MetricL1
147u/16VCapacitor_SMD:C_1206_3216MetricC20
1AO3401APackage_TO_SOT_SMD:SOT-23Q1
1AP2114H-3.3TRG1adapter:SOT-223_L6.7-W3.5-P2.30-BRU5
1DP9900LPB-5V1.4Aadapter:COMM-SMD_DP9900LPB-5V1.4AM1
1HH-1M1608-121JTInductor_SMD:L_0603_1608MetricL2
1HR871150Cadapter:RJ45-TH_HR871150CJ2
1PWR_SELConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ4
1RP2354Aadapter:QFN-60_L7.0-W7.0-P0.40-TL-EP3.4U1
1SN75160BDWPackage_SO:SOIC-20W_7.5x12.8mm_P1.27mmU3
1SN75161BDWPackage_SO:SOIC-20W_7.5x12.8mm_P1.27mmU4
1TPS3839G33DBZRPackage_TO_SOT_SMD:SOT-23U6
1TP_3V3TestPoint:TestPoint_Pad_D1.5mmTP_3V3
1TP_5VTestPoint:TestPoint_Pad_D1.5mmTP_5V1
1TP_ATNTestPoint:TestPoint_Pad_D1.5mmTP_ATN1
1TP_DAVTestPoint:TestPoint_Pad_D1.5mmTP_DAV1
1TP_DCTestPoint:TestPoint_Pad_D1.5mmTP_DC1
1TP_GNDTestPoint:TestPoint_Pad_D1.5mmTP_GND1
1TP_GPIO22TestPoint:TestPoint_Pad_D1.5mmTP_GPIO221
1TP_IFCTestPoint:TestPoint_Pad_D1.5mmTP_IFC1
1TP_NDACTestPoint:TestPoint_Pad_D1.5mmTP_NDAC1
1TP_NRFDTestPoint:TestPoint_Pad_D1.5mmTP_NRFD1
1TP_SRQTestPoint:TestPoint_Pad_D1.5mmTP_SRQ1
1TP_SWCLKTestPoint:TestPoint_Pad_D1.5mmTP_SWCLK1
1TP_SWDIOTestPoint:TestPoint_Pad_D1.5mmTP_SWDIO1
1TP_TETestPoint:TestPoint_Pad_D1.5mmTP_TE1
1USB-Cadapter:USB-C_SMD-TYPE-C-31-M-12_1J3
1W5500Package_QFP:LQFP-48_7x7mm_P0.5mmU2
1greenLED_SMD:LED_0805_2012MetricLED1

Similar boards

  • 2 layers85 × 56 mmGrasPiB v1, the printed circuit board in 3D

    GrasPiB v1

    an-ven/graspib

    GPIB interface board for Raspberry Pi

    45 parts14
  • 2 layers160 × 100 mmCsa petio v1, the printed circuit board in 3D

    Csa petio v1

    fachat/csa_cbmio

    IO Board for CS/A bus, to implement Commodore B-Series I/O

    99 partsGPL-3.0
  • 2 layers58 × 99.8 mmSenior Capstone, the printed circuit board in 3D

    Senior Capstone

    achihuahua22/Alex-Harris-Capstone

    This project builds on an-ven’s graspib project by adding more RS232 support and a UART breakout pin.

    38 parts1MIT
  • 2 layers90.2 × 72.8 mmIEEE488-VIE, the printed circuit board in 3D

    IEEE488-VIE

    schenkmi/Cartridges

    Repository for retro computer cartridges

    12 partsGPL-3.0
  • 2 layers119.4 × 96.5 mmGizmo, the printed circuit board in 3D

    Gizmo

    gizmo-platform/hardware

    143 parts5CERN-OHL-P-2.0
  • 4 layers280 × 80 mmIteration3, the printed circuit board in 3D

    Iteration3

    Arjit40/Underwater-ROBOT-PCB-with-stm32h473vit6-and-ethernet-W5500-IC--iteration-3

    165 parts
  • 4 layers50 × 21.4 mmEthernet, the printed circuit board in 3D

    Ethernet

    sneakylizard123-4/Ethernet_module

    A small SPI Ethernet breakout for the W5500.

    35 parts
  • 2 layers37.3 × 63.9 mmZero r2 mini w5500, the printed circuit board in 3D

    Zero r2 mini w5500

    mean00/swindle

    A custom version of the blackMagic probe with rust in it

    53 parts22

Questions

How big is the Adapter PCB?

It measures 62 × 67 mm and has 4 copper layers, 1.61 mm thick.

What parts does the Adapter use?

92 parts, built around the RP2354A, SN75160BDW, SN75161BDW and DP9900LPB-5V1.4A. 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 Adapter KiCad files?

From the tridentsx/tmc-gateway repository on GitHub, at the commit this page was made from: the board is hardware/adapter.kicad_pcb and its schematic hardware/adapter.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Adapter design in my own project?

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