FTDI FT232x

Fast USB multi-protocol connectivity

Overview

Package d2xx provides support for FT232H/FT232R devices via the Future Technology “D2XX” driver.

The driver implements:

  • GPIO
  • I²C
  • SPI

Installation

Debian

This includes Raspbian and Ubuntu.

  1. Configure cgo as explained at /platform/linux/#cgo.

Temporary

Run this command after connecting your FTDI device:

sudo rmmod ftdi_sio usbserial

Permanent

Run these commands before connecting your FTDI device:

cd $GOPATH/src/periph.io/x/extra/hostextra/d2xx
sudo cp debian/98-ft232h.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules
sudo udevadm trigger --verbose

macOS

  1. Configure cgo as explained at /platform/macos/#cgo.
  2. Unload the AppleUSBFTDI kernel driver with one of the two following ways:

Temporary

This temporarily unload Apple’s FTDI driver. This needs to be done after each OS startup:

sudo kextunload -b com.apple.driver.AppleUSBFTDI

Permanently

This permanently disable Apple’s FTDI driver.

  1. Download D2xxHelper.
  2. Run D2xxHelper_xxx.pkg you just downloaded.
  3. Reboot.

Windows

  1. Connect the device.
  2. Windows Update should install the FTDI D2XX driver automatically. Wait for it to occur.

Example

Please edit this page on GitHub to complete the example. Thanks!

package main

func main() {
  // TODO 😳
}

Buying

These links are for the FT232H, which is higher speed than the FT232R for nearly the same price:

It is not recommended to buy chips on AliExpress or Amazon (except for the adafruit branded boards). Most of these are cheap counterfeit that have incomplete support. They are often sold under the brand “CJMCU”.

The periph authors do not endorse any specific seller. These are only provided for your convenience.