Différences entre versions de « RASP-FT232H-MPSSE-Windows »

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
(Page créée avec « {{RASP-FT232H-NAV}} {{traduction}} {{RASP-FT232H-TRAILER}} »)
 
Ligne 2 : Ligne 2 :
  
 
{{traduction}}
 
{{traduction}}
 +
 +
= Installation sous Windows =
 +
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 [https://www.python.org/downloads/windows/ 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, either 32-bit or 64-bit, 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.
 +
 +
== Installation de libusb ==
 +
Download the appropriate Zadig tool for your version of Windows [http://zadig.akeo.ie/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:
 +
 +
{{ADFImage|RASP-FT232H-MPSSE-Windows-10.png}}
 +
 +
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.
 +
 +
{{ADFImage|RASP-FT232H-MPSSE-Windows-11.png}}
 +
 +
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.
 +
 +
{{ADFImage|RASP-FT232H-MPSSE-Windows-12.png}}
 +
 +
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.
 +
 +
== Installation libftdi ==
 +
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 [https://sourceforge.net/projects/picusb/files/ picusb USB resources project].
 +
 +
{{download-box|libftdi1-1.0_devkit_mingw32_17Feb2013.zip|http://downloads.sourceforge.net/project/picusb/libftdi1-1.0_devkit_mingw32_17Feb2013.zip}}
 +
 +
Unzip the archive and you should see a series of folders like below:
 +
 +
{{ADFImage|RASP-FT232H-MPSSE-Windows-20.png}}
 +
 +
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:
 +
* '''bin\libftdi1.dll'''
 +
* '''bin\libftdipp1.dll'''
 +
* '''bin\libgcc_s_dw2-1.dll'''
 +
* '''bin\libiconv-2.dll'''
 +
* '''bin\libintl-8.dll'''
 +
* '''bin\libstdc++-6.dll'''
 +
* '''bin\libusb-1.0.dll'''
 +
 +
Then also copy in the files from the python2.7 folder of the libftdi archive into the Python site-packages folder:
 +
* '''python2.7\_ftdi.pyd'''
 +
* '''python2.7\ftdi1.py'''
 +
 +
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):
 +
 +
{{ADFImage|RASP-FT232H-MPSSE-Windows-21.png}}
 +
 +
That's all you need to do to install libftdi.  Let's move on to install the Adafruit Python GPIO library next.
 +
 +
== Bibliothèque Adafruit Pyhton GPIO ==
 +
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:
 +
 +
{{download-box|Adafruit Python GPIO Library|https://github.com/adafruit/Adafruit_Python_GPIO/archive/master.zip}}
 +
 +
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:
 +
 +
<nowiki>python setup.py install</nowiki>
  
 
{{RASP-FT232H-TRAILER}}
 
{{RASP-FT232H-TRAILER}}

Version du 19 février 2017 à 21:03


MCHobby investit du temps et de l'argent dans la réalisation de traduction et/ou documentation. C'est un travail long et fastidieux réalisé dans l'esprit Open-Source... donc gratuit et librement accessible.
SI vous aimez nos traductions et documentations ALORS aidez nous à en produire plus en achetant vos produits chez MCHobby.

Installation sous Windows

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, either 32-bit or 64-bit, 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.

Installation de libusb

Download the appropriate Zadig tool for your version of Windows 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:

{{{2}}}
Crédit: AdaFruit Industries www.adafruit.com

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.

{{{2}}}
Crédit: AdaFruit Industries www.adafruit.com

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.

{{{2}}}
Crédit: AdaFruit Industries www.adafruit.com

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.

Installation libftdi

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.

Download-icon.pnglibftdi1-1.0_devkit_mingw32_17Feb2013.zip

Unzip the archive and you should see a series of folders like below:

{{{2}}}
Crédit: AdaFruit Industries www.adafruit.com

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:

  • bin\libftdi1.dll
  • bin\libftdipp1.dll
  • bin\libgcc_s_dw2-1.dll
  • bin\libiconv-2.dll
  • bin\libintl-8.dll
  • bin\libstdc++-6.dll
  • bin\libusb-1.0.dll

Then also copy in the files from the python2.7 folder of the libftdi archive into the Python site-packages folder:

  • python2.7\_ftdi.pyd
  • python2.7\ftdi1.py

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):

{{{2}}}
Crédit: AdaFruit Industries www.adafruit.com

That's all you need to do to install libftdi. Let's move on to install the Adafruit Python GPIO library next.

Bibliothèque Adafruit Pyhton GPIO

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:

Download-icon.pngAdafruit Python GPIO Library

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

Source: Adafruit FT232H Breakout Add a serial protocol 'swiss army knife' to your computer and talk directly to devices with SPI, I2C, serial UART, GPIO's, and more!
Créé par Toni DiCola pour AdaFruit Industries.

Traduction réalisée par Meurisse D pour MCHobby.be.

Toute référence, mention ou extrait de cette traduction doit être explicitement accompagné du texte suivant : «  Traduction par MCHobby (www.MCHobby.be) - Vente de kit et composants » avec un lien vers la source (donc cette page) et ce quelque soit le média utilisé.

L'utilisation commercial de la traduction (texte) et/ou réalisation, même partielle, pourrait être soumis à redevance. Dans tous les cas de figures, vous devez également obtenir l'accord du(des) détenteur initial des droits. Celui de MC Hobby s'arrêtant au travail de traduction proprement dit.

Traduit avec l'autorisation d'AdaFruit Industries - Translated with the permission from Adafruit Industries - www.adafruit.com