To access the MPSSE mode of the FT232H on Windows we need to install special drivers and software. We'll use a tool called Zadig to replace the FTDI driver for the FT232H with a libusb-based driver required by libftdi. Then we'll download a libftdi binary and install it for Python to access. Finally we'll install the Adafruit Python GPIO library. Carefully follow the steps below to setup the software.
Note: When you enable MPSSE mode the serial UART driver will be disabled. If you want to disable MPSSE mode and enable the serial UART again I'll show instructions at the end of the page.
First before you get started make sure you have Python 2.7 installed. You can download the latest Python 2.7 installer here (at the time of writing it's version 2.7.8, but any 2.7.x version should work--unfortunately the 3.x series isn't supported yet).
Download the MSI installer for your version of Windows, you must install the 32-bit version, and run the installer. Install Python into its standard location, typically C:\python27. Also make sure to install the option to add Python to the system path so you can easily call the Python interpretor from a command terminal.
Download the appropriate Zadig tool for your version of Windows at its homepage. This tool simplifies the installation of a libusb driver for the FT232H device.
Before you run the tool unplug all FTDI devices from your computer. This includes devices likebArduinos which include an FTDI chip as a USB to serial converter. You want to unplug these devices to make sure you don't accidentally select one with the tool and replace its driver.
After all the FTDI devices are unplugged, plug in your FT232H breakout to the computer so it is the only FTDI device connected to the computer.
Now run the Zadig tool executable you just downloaded (there is no installation necessary, the executable is the program). Click the Options menu and select the List All Devices item below:
The list box of devices should populate with many devices. Select the USB Serial Converter device shown below.
Note: Make sure to select the device with Driver equal to FTDIBUS and USB ID equal to 0403 6014! If you pick the wrong device you might accidentally uninstall another device's driver and make it inoperable.
Click the up/down arrows on the driver select box to the right of the green arrow and select the libusbK driver as shown above.
Now click the Replace Driver button to replace the FTDI driver with the libusb-based driver. After the driver replacement finishes you can close Zadig tool.
To check that the driver was successfully replaced, open Device Manager from Control Panel or searching in the Start menu. You should see a new top level node libusbK USB Devices and the USB Serial Converter underneath it as shown below.
If you see the libusbK node and USB serial device, move on to the next step to install libftdi.
If you don't see the libusbK node, try unplugging and plugging back in the FT232H breakout. If you still don't see the node, run Zadig tool again and follow the steps above again to make sure you replace the FTDI driver for the device with the libusbK driver.
This step will install libftdi's Python library. Carefully follow the steps below to make sure the library is installed.
Start by downloading the binary version of the libftdi library by clicking the button below. This binary is provided by the picusb USB resources project.
Unzip the archive and you should see a series of folders like below:
We need to copy some files from libftdi into Python's package directory. Open another Explorer window and navigate to the location you installed Python earlier, typically C:\python27. Inside the Python directory navigate to the Lib > site-packages folder. Files you copy into this folder will be available globally as packages that your Python scripts can use.
From the libftdi archive folder, copy all the .DLL files from the bin folder into the Python site-packages folder, specifically:
Then also copy in the files from the python2.7 folder of the libftdi archive into the Python site-packages folder:
To double check you copied in the right files, your Python site-packages folder should have at least the files below inside it (you might see other files & directories, but don't worry they can be ignored):
That's all you need to do to install libftdi. Let's move on to install the Adafruit Python GPIO library next.
Finally let's install the Adafruit Python GPIO library which will allow your Python scripts to access the MPSSE functionality of the FT232H breakout
First download an archive of the library by clicking the button below:
Unzip the contents and then open a command terminal and navigate to the directory where the library was unzipped. Execute the following command to install the library:
python setup.py install
python setup.py install
Note if you see an error that Python can't be found then make sure you installed Python 2.7 as mentioned at the top of the page, and that it was added to your system path. Here's more details on how to manually add Python to your system path.
You should see the Python library install itself with text similar to the below:
Now let's test if both the libftdi and Adafruit Python GPIO libraries were correctly installed. In the command terminal run Python by executing:
Once the Python interpretor has loaded, type the following at the >>> prompt:
import Adafruit_GPIO import ftdi1
import Adafruit_GPIO import ftdi1
You should see no response from the Python interpretor after entering each command like below:
No response from the Python interpretor is a good sign because it means Python was able to successfully load the libraries.
If you see an error message or failure after entering a command, unfortunately something went wrong with the installation of the library. Go back through the steps above and carefully check that nothing was missed. You want to make sure all the libftdi files are copied into the Python site-packages folder, and that the Adafruit Python GPIO library installed itself successfully.
Once you've confirmed Python can load the libraries, exit the Python interpretor by typing:
Congratulations, the MPSSE mode drivers and Python libraries are installed and ready to use! Move on to the next section to see how to use the MPSSE mode to access GPIO, SPI, I2C, etc.
Should you ever want to disable the MPSSE mode for the FT232H and return to its serial UART mode follow the steps below.
First make sure the FT232H breakout is plugged in to the computer. Then open Device Manager and find the libusbK USB Devices node and the USB Serial Converter child of that node. Right click the device and select Uninstall as shown below:
In the dialog that appears make sure the 'Delete the driver software for this device.' option is checked as shown below:
Click OK and the libusb driver should be completely uninstalled for the device.
Now unplug the FT232H breakout board and go back to the Serial UART page to find the instructions for installing the Windows serial driver. Follow those instructions again and you should be set with the device acting as a USB serial UART again.