# Debugging tool for the FTDI FT2232H in Sync FIFO mode

Does anyone know of any software available to take data from the FT2232H in 245 FIFO Sync mode and write it to screen or to a log file?

Basically, I am using the FT2232H IC to transfer a large amount of data from an FPGA over USB. I chose the IC because I've had some experience with FTDI chips before using their VCP (virtual com port) driver and because of the USB2 speeds available.

Unfortunately, it needs to use the D2XX driver, which doesn't allow it to show up as a virtual com port on my windows machine so I can no longer use TeraTerm to display data being sent through the IC.

It seems to me that the FT2232H in sync FIFO mode should be a popular enough option that someone has already written software for a windows machine that would let me see data coming off the USB - either on screen or to a text file. A google search didn't turn anything up and I figured this is a valuable enough question that others might be interested in the answer too.

• Maybe one of the code samples can be used or modified to do what you need? – JimmyB Feb 19 '14 at 21:11
• I thought about it, but I just don't have the time to spend on writing a HyperTerm-esqe debugging tool. Especially since it seems like it would be pretty broadly applicable and I am sure someone has already written it. Just trying to leverage the resources of this community to help me finish up my project. :) – Peter Feb 20 '14 at 22:46
• I've written a test program for an FT232H / FIFO245 Sync mode application in C# 2010 express. It's pretty specific to my application, but it's written in C# Express 2010 with Forms, so you could edit it to do whatever you want pretty quickly. If you're interested, I can upload it and post a link. – FL_Engineer Feb 22 '14 at 0:44
• That would be great. As I mentioned, just looking for something that will let me write out a log so that I can verify data is being clocked out correctly. – Peter Feb 22 '14 at 18:18

I've got a test utility that I made for an application that uses a 245 FIFO. You can download the source code for my test program here. It's written in Visual C# Express 2010, which you can download quickly and free to make whatever modifications you want.

As you can see in the picture below, the test utility is extremely specific to my application, so it won't be very useful to you without some minor mods, but my guess is that you could adapt it to do what you want in an hour or two. You can look at the ReadRegister and WriteRegister functions to see how to read/write from the device.

HOWEVER I use the D2XX drivers and I'm pretty sure that I can still access the virtual comm port through a terminal program. So I'm not sure that you really need a D2XX based tool.

Let me know if you need any guidance.

• Thanks for the starting point and the download. I've read through the code and I should be able to convert it to my needs this weekend. Regarding the D2XX driver, I tried both HyperTerm and Teraterm. I was unable to find a port to connect to unless I used the VCP driver. Have you had any other terminal software work for you? – Peter Feb 27 '14 at 7:00
• Does the device show up as a COM in the device manager when you plug it in? Mine shows up and I can communicate with it in either hyperterminal or the D2XX utility. I am using Windows XP, haven't tried this on my Win 7 computer yet. – FL_Engineer Mar 13 '14 at 21:29

I use the FTDI chipset daily as the UART interface of choice when interogating fpga's we use at work.

As such I have a python module that interfaces with the ftdi driver and provides a pythonic interface.

simply commands like:

get_device_info_list() will print all FTDI devices registered by windows/linux

open_ex(serial='') will open an FTDI device with the names serial port & return an FTD2XX

a FTD2XX object then has typical commands like:

FTD2XX.write(lpbuffer='some_ascii_string') # will write an ascii string to the device

FTD2XX.get_queue_status() # will return the number of bytes in the READ buffer

FTD2XX.read(NUM) #will read NUM number of bytes ... Plus a load of FTD2XX driver commands (purge, baud_rate... ). If you are willing to use python I can provide you the link to my python module.

A simple script like:

devices = list_devices()
ft = open_ex(devices[0])  # open the 1st regardless
ft.purge(to_purge='TXRX')
while True: