Working with Lattice FPGAs recently, I had a need to program one but couldn’t find my ‘proper’ (Chinese clone, bought from eBay) programming adapter. When I started the Diamond Programmer software, though, it claimed it could see a USB programming adapter. It turned out that I’d left an FTDI ‘FT2232H Mini Module‘ attached to the PC. I use the module for all sorts of little debugging exercises: most often as a dual serial port forĀ serial port debugging, but it also works for programming Parallax Propeller microcontrollers.
As luck would have it, the Diamond software recognises the unadulterated FT2232H as a legitimate USB programmer, and pressing the ‘Detect Cable’ button findsĀ it. Note that if you plug in a new USB device, the Diamond Programmer software needs restarting before it can see it.
The FT2232H has two ports, A and B, and these appear as ports FTUSB-0 and FTUSB-1 in the Diamond software. All that remained was to figure out the wiring. Fortunately, there are a lot of clues in the schematics of various Lattice evaluation boards, particularly the MachXO2 Pico Board and the iCE40 Ultra Breakout Board.
Here’s the wiring, both for SPI and JTAG, referred to the pins on the Mini Module. I chose to use port B since it was more convenient for my prototype board. Translating the wiring to port A is left as an exercise for the reader.
SPI JTAG FT2232H Mini Module SO TDI DBUS1 CN3-25 SI TDO DBUS2 CN3-24 SCK TCK DBUS0 CN3-26 SS_B ISPEN DBUS4 CN3-21 CRESET TRST DBUS7 CN3-18 GND GND GND CN3-2,4
It works well, and does exactly what it should.