Bit Bang JTAG Programming of Xilinx CPLD using FT232 – Homebrew SVF Player

Connect Four (Well Six if You Count VDD and GND)

Now comes the easy part – just connect the boards and let it rip!  The JTAG interface of the CMOD board does NOT include a RESET pin, which seems to be typical.  So if you really munge things up in the state machine, remember there’s no hardware reset – so just unplug and replug USB.  By cutting the 5V USB supply to the FT232, you’ll also power down the CMOD.  You could alternately just disconnect the 3.3V supply to the CMOD, but it’s way easier to replug USB.

Below is the wiring used in the demo tool.  Remember, you have the freedom to switch around any of the JTAG lines to any of the FT232 bitbang pins if you don’t like this wiring below.  In these examples, we will pretend that the pinout is as it would be if the USB connecter were the IC notch.  We will not count the 4-pin header at the bottom, so pin 1 is top right below, and pin 18 is bottom right.  As it stands, the wiring diagram is as follows


Fig 3 – Wiring Diagram for Sparkfun FT232 as JTAG Programmer




Here’s that wiring diagram in text form for you colorblind hackers out there.

  1. CMOD VCC – FT232 +3.3V.  Either tie to the header we’ve shown here, or pin 5
  2. GND – FT232 GND.  Either tie to the header as we’ve shown here, or pin 16
  3. TCK – FT232 RI,  Pin  15
  4. TDO – FT232 DCD, Pin 18
  5. TDI – FT232 DSR, Pin 17
  6. TMS – FT232 RXD, Pin 14

If it’s the first time you’re running the tool with the CPLD connected, it’s best to single step.  That way, you can see each write/read of data and the device’s reply which is VERY useful for debugging.  After you have verified that the thing is working properly, go ahead and untick the Single Step checkbox and let it rip.

The software is more reliable when run from the .exe than it is in the VB6 debugger.  Specifically, single stepping the read data section – between the check for data in the buffer and the actual read of the buffer – can be unreliable if stepped.  No idea why, but that section of code is so bloody simple it must be something due to calling with VB6.  If you want to debug this section, then set a trap on the line AFTER the actual read of the buffer so the tool can query and read the buffer at a fairly quick pace.

Well folks, that’s pretty much it.  Please download and play around with the Openschemes_FT232_SVF_Player.  This download contains both source and executable, as well as a copy of the old version for reading and writing one byte at a time in case your interface is flaky and you can’t stand the RAW BIT BANG FURY!  Enjoy.

NOTE: The software in the link above is now outdated.

We will always update this section with a link to the newest version, and the release info on what the heck was changed.

Go to Openschemes FT232 SVF Player v0.11

This entry was posted in Projects and tagged , , , , , . Bookmark the permalink.

26 Responses to "Bit Bang JTAG Programming of Xilinx CPLD using FT232 – Homebrew SVF Player"

Leave a reply