Lattice HW-USBN-2B: A Practical Guide to the USB Programming Cable for Lattice FPGAs
How the HW-USBN-2B works, how to wire it for JTAG, Slave SPI and I²C, and the board-design details that make in-system programming reliable.

Figure: Lattice HW-USBN-2B USB Programming Cable
Introduction
Every FPGA or CPLD design ends the same way: a bitstream must get from the PC into the device on the board. For Lattice Semiconductor devices, that link is the HW-USBN-2B USB Programming Cable — Lattice's current USB cable for in-system programming of all Lattice programmable products, from ispMACH CPLDs to the latest Nexus-based CrossLink-NX, Certus-NX and MachXO5-NX FPGAs.
In this post we look at the HW-USBN-2B's architecture and specifications, walk through its pin definitions and wiring for each configuration port, and summarise the target-board design rules from Lattice's Programming Cables User Guide (FPGA-UG-02042) that help avoid the most common programming failures.
Key features
Supports all Lattice programmable products through JTAG, Slave SPI and I²C configuration ports.
1.2 V to 3.3 V JTAG and SPI programming — covering modern low-voltage I/O banks.
2.5 V to 3.3 V I²C programming for devices with an I²C configuration port.
Dual-channel USB — Port A for JTAG programming, Port B for UART/I²C access.
5 V OUT pin to power the iCEprogM1050 programmer.
Versatile colour-coded flywires with an included 1 × 8 (0.100") and 2 × 5 (0.100") adapters for organised header connections.
6 feet (about 2 metres) of cable from PC to target board.
Lead-free, RoHS-compliant construction.
Where the cable fits in the design flow
Once the logic design is complete and a programming file has been generated in Lattice Radiant®, Lattice Diamond® or ispLEVER® Classic, the device is programmed on the board using Radiant Programmer, Diamond Programmer or ispVM™ System software:
Design and implement in Radiant, Diamond or ispLEVER Classic and generate the programming file.
Load the file into the programmer software. The software automatically generates the programming commands, addresses and data from the file and the user-selected parameters.
Programming signals are generated from the PC's USB port and routed through the HW-USBN-2B to the target device.
Program and verify — no additional components are required on the board beyond a suitable header and the recommended pull resistors.
The HW-USBN-2B is not just a one-way download path. It also provides two-way communication for on-chip debug tools such as the Reveal Logic Analyzer and the MicoSystem Debugger, so the same cable that programs the FPGA can capture internal signals during debug.

Inside the HW-USBN-2B
Dual-channel USB architecture
The HW-USBN-2B enumerates as a two-port USB device. Port A is used for JTAG programming — Radiant Programmer detects the cable through this USB function. Port B is used for UART/I²C interface access. With the FTDI driver installed, Windows Device Manager shows the cable as USB Serial Converter A and Converter B.
Target-referenced I/O
The cable does not power the target board. Instead, the board supplies the cable's VCC reference (typical ICC ≈ 10 mA), so the cable's logic levels automatically match the board's programming bank anywhere from 1.2 V to 3.3 V. The internal I²C lines include 3.3 kΩ pull-ups to this VCC.
Specification | HW-USBN-2B |
Host interface | USB (v1.0, v2.0) — dual channel: Port A JTAG, Port B UART/I²C |
Programming ports | JTAG (IEEE 1149.1), Slave SPI, I²C |
JTAG / SPI voltage | 1.2 V to 3.3 V |
I²C voltage | 2.5 V to 3.3 V |
VCC reference current | Typical 10 mA, supplied by target board |
Auxiliary output | 5 V OUT for iCEprogM1050 |
Connectors | Flywire, 1 × 8 adapter, 2 × 5 adapter (0.100" pitch) |
Cable length | 6 ft (≈ 2 m) PC to DUT |
Software | Radiant Programmer, Diamond Programmer (3.1 or later), ispVM System |
Compliance | Lead-free, RoHS compliant |
Pin definitions and flywire colours
The functions provided by the cable map to the programming features of the selected device; the programmer software automatically chooses which ones to use. The HW-USBN-2B flywire assignments are:
Cable pin | Flywire colour | Type | Function |
VCC | Red | Input | Reference from target VCCIO / VCCJ; typical ICC = 10 mA |
GND | Black | Input | Connect to target ground plane |
TDI/SI | Orange | Output | JTAG test data in / SPI serial in |
TDO/SO | Brown | Input | JTAG test data out / SPI serial out |
TMS | Purple | Output | Controls the IEEE 1149.1 state machine |
TCK/SCLK | White | Output | JTAG test clock / SPI clock |
ISPEN/PROG | Yellow | Output | Programming enable; SN/SSPI chip select for SPI |
DONE | Blue | Input | Configuration status |
TRST | Green | Output | Optional IEEE 1149.1 state-machine reset |
I²C SCL | Yellow/White | Output | I²C clock (open drain) |
I²C SDA | Green/White | Output | I²C data (open drain) |
5 V OUT | Red/White | Output | 5 V supply for iCEprogM1050 |
For basic JTAG programming only six wires are required: VCC, GND, TDI, TDO, TMS and TCK.

Figure: HW-USBN-2B flywire connections to a target board
Wiring for each configuration port
JTAG
JTAG is supported across the Lattice portfolio — ECP5™, LatticeECP3™, MachXO2™/MachXO3™/MachXO3D™, the Nexus families (CrossLink™-NX, Certus™-NX, CertusPro™-NX, Mach™-NX and MachXO5™-NX), ispMACH® CPLDs, Platform Manager™ devices and more. Connect TDI, TDO, TMS and TCK to the device's JTAG pins, plus VCC and GND. PROGRAMN, INITN, DONE and TRST connections are optional and are defined under Custom I/O settings in the programmer software.
Slave SPI
For Slave SPI configuration, TDI/SI drives the device's MOSI/SI, TDO/SO reads MISO/SO, TCK/SCLK drives the SPI clock (CCLK, SPI_SCK or SCLK depending on the family) and ISPEN/PROG serves as the chip select (SN, SPI_SS or SCSN). Supported families include ECP5, LatticeECP3, MachXO2/3/3D, iCE40™ variants, CrossLink LIF-MD6000 and CrossLink-NX/Certus-NX/CertusPro-NX. On iCE40 and CrossLink, CDONE and CRESET_B can optionally be connected.
I²C
I²C programming is supported for MachXO2/MachXO3/MachXO3D, Platform Manager II, L-ASC10 and CrossLink LIF-MD6000. Note that the I²C programming ports of the Nexus and Avant™ families are not supported by the cable — use JTAG or Slave SPI for those devices.
Cable signal | JTAG port | Slave SPI port | I²C port |
TDI/SI | TDI | MOSI / SI | — |
TDO/SO | TDO | MISO / SO | — |
TMS | TMS | — | — |
TCK/SCLK | TCK | CCLK / SPI_SCK / SCLK | — |
ISPEN/PROG | Optional | SN / SPI_SS / SCSN | — |
I²C SCL / SDA | — | — | SCL / SDA |
VCC / GND | Required | Required | Required |
Target board design checklist
Most "cable not working" problems are actually board-design problems. The user guide's recommendations are worth building into every schematic:
TCK pull-down: place a 4.7 kΩ pull-down on TCK to prevent inadvertent clocking of the TAP controller from fast edges or while VCC ramps up. This applies to all Lattice families.
TMS pull-up: the pin reference table recommends a 4.7 kΩ pull-up on TMS.
I²C pull-ups: SCL and SDA are open drain. A ~2.2 kΩ pull-up to the same plane as the cable's VCC is required on the board, in addition to the cable's internal 3.3 kΩ pull-ups. Only 3.3 V and 2.5 V are supported for I²C.
VCC reference: connect the cable's VCC to VCCJ where the device has one, otherwise to the VCCIO bank that governs the programming port (which may differ from the core supply). Add a 0.1 µF decoupling capacitor close to the device.
Very low-power boards: for low-power Lattice families, a 500 Ω resistor between VCCJ and GND during programming is recommended when the USB cable is connected to a very low-power design.
TCK speed: long PCB routing or long daisy chains may need a slower TCK. The programming software can reduce the TCK rate for debug or noisy environments. Power Manager I devices (POWR604, POWR1208, POWR1208P1) require TCK slowed by a factor of two with the USB cable.
Header: use a standard 0.100" pitch header; Lattice recommends a pin length of 0.243" (6.17 mm). Compatible flywire housings include Samtec SSQ-108-02-T-S (1 × 8) and SSQ-105-02-T-D (2 × 5).

Figure: PC to the System Board
Connecting the cable safely
Power down the target board before connecting, disconnecting or reconnecting the cable.
Connect GND (black) first, before any other JTAG wire. Skipping these two steps can damage the target device.
Handle TRST correctly. Lattice recommends tying the board's TRST pin to VCC rather than to the cable. If you do connect it, enable TRST/Reset Pin Connected → Set High under Options → Cable and I/O Port Setup; otherwise, the software drives TRST low and holds the boundary-scan chain in reset.
Handle ispEN where required. The BSCAN pin of 2000VE devices and the ENABLE pin of certain MACH4A devices should be grounded or driven low from the cable by selecting ispEN/BSCAN Pin Connected → Set Low.
Software, drivers and firmware
Diamond Programmer, Radiant Programmer and ispVM System are included with all Lattice design tools and can also be downloaded separately from latticesemi.com/programmer. The HW-USBN-2B requires Diamond Programmer 3.1 or later. A few practical points:
Install the drivers before plugging in the cable. If the cable is connected first, Windows may load its own drivers, which may not work. If that happens, reinstall from Device Manager by browsing to the FTDI FTUSB driver folder (for Diamond: lscc/diamond/data/vmdata/drivers).
Firmware update: cables with firmware V001 can malfunction in certain scenarios, with the LEDs staying on permanently. Updating to HW-USBN-2B Firmware 2.0 or later (cable and FTDI firmware V002) resolves the issue. The firmware package and update guide are available on the product page.
Statement of Volatility: Lattice publishes a Statement of Volatility for the programming cable, useful for secure-lab and defence-programme paperwork.
Engineering note Because Port B of the HW-USBN-2B exposes a UART/I²C channel, the same cable can be used for both bitstreams download on Port A and simple board-level communication on Port B — handy on prototype boards that do not have a separate USB-UART bridge. |
The HW-USBN-2B is a small item, but it sits on the critical path of every Lattice FPGA and CPLD project. It brings JTAG, Slave SPI and I²C programming down to 1.2 V I/O, a dual-port USB architecture for debug communication, and support for everything from iCE40 to the Nexus families. Combine it with the board-level practices covered above — correct VCC reference, TCK pull-down, I²C pull-ups and a safe connection sequence — and in-system programming becomes a reliable, repeatable step of your workflow.






Comments