FTDI Application Note AN_411: FTx232H MPSSE I2C Master Example in C#

Version: 1.1

Issue Date: 2018-10-04

This application note demonstrates the implementation of a USB to I2C Master interface using FTDI's FT232H, FT2232H, and FT4232H devices with a C# Visual Studio project. It utilizes the MPSSE feature of these devices to create the interface and incorporates proximity and RGB colour sensors to detect objects and their colours.

Use of FTDI devices in life support and/or safety applications is entirely at the user's risk.

Manufacturer: Future Technology Devices International Limited (FTDI)

Contact: Unit 1, 2 Seaward Place, Glasgow G41 1HH, United Kingdom | Tel: +44 (0) 141 429 2777 | Fax: +44 (0) 141 429 2758 | Web Site: http://ftdichip.com

1 Introduction

This application note provides an example of using the MPSSE feature of the FT232H, FT2232H, and FT4232H devices to create a USB to I2C Master Device with a C# Visual Studio project. The system uses a proximity sensor and an RGB colour sensor as I2C peripherals to detect object presence and determine its colour.

The application code is written in C# and leverages the FTDI D2XX Drivers .NET wrapper. It offers a graphical user interface for displaying sensor data and includes functions to implement I2C protocol and GPIO via MPSSE. These can be customized for different sensors and data presentation methods.

The core components – proximity sensor, colour sensor, and FTDI FT232H / FT2232H / FT4232H devices – are available on development modules, facilitating rapid prototyping.

Key principles demonstrated include:

A significant advantage of MPSSE is the absence of firmware development, programming, and maintenance. FT232H and FTx232H devices act as hardware bridges controlled entirely by PC commands, allowing for easy updates and feature additions through software.

2 Hardware

2.1 Comparison of FT232H, FT2232H, FT4232H MPSSE Features

This application note's software is compatible with FT232H, FT2232H, and FT4232H devices, which share similar MPSSE feature sets. The table below highlights key features and differences relevant to I2C implementation. For more details, refer to AN_108, AN_135, and the respective FTx232H device datasheets.

FeatureFT232HFT2232HFT4232HNotes
Total Ports on device124
MPSSE capable ports122
Open Drain capabilityYNN
Three Phase ClockingYYYAllows data stability on both clock edges, required for I2C (see section 6.2.1).
GPIO per I2C port (ADBUS/ACBUS)5/85/85/0No ACBUS on FT4232H.
Default start up modeEEEEUARTEE indicates device starts in EEPROM selected mode (e.g., UART, FIFO).

Device selection depends on application requirements. FT232H is suitable for single-channel needs due to its open-drain feature and 13 GPIOs. FT2232H offers additional SPI, I2C, or UART interfaces on a single USB port. FT4232H provides four ports with up to two MPSSE interfaces.

Throughput is similar across all three devices. USB bandwidth is shared across connected devices on the same host controller. The Bulk USB transfer mode is optimized for high throughput and error checking but does not guarantee latency. Applications sensitive to latency should be tested under worst-case conditions.

MPSSE functions as a Master only and does not support I2C slave interfaces or multi-master operation. For USB to I2C slave conversion, FT200XD/FT201X devices are recommended.

2.2 Hardware Description

This section describes the hardware used in the example. The following diagram illustrates the schematic of the hardware unit.

[Diagram: Figure 2 - Schematics showing circuit diagrams for FT232H, FT2232H, FT4232H modules and sensor connections.]

2.2.1 FTDI Module

The demo supports FT232H, FT2232H, or FT4232H via the following modules:

  • FT232H: UM232H
  • FT2232H: FT2232H-56 Mini Module (or FT2232H Mini Module)
  • FT4232H: FT4232H-56 Mini Module (or FT4232H Mini Module)

These FTDI modules are designed for easy evaluation and include necessary components like the USB connector and external EEPROM.

A 28-pin IC socket is provided for UM232H. VIO and 5V0 power pins must be connected for PC recognition. Dual-row header sockets are for mini modules. The FT2232H/FT4232H 56Q version has on-board jumpers for VCC and VCCIO. The 64-pin module requires external connections for power-up.

2.2.2 Power

A small regulator provides a stable 3.3V supply to the sensor modules from the USB 5V supply. FTDI modules offer 3.3V out connections for external circuitry, with external LDOs available for higher current needs.

2.2.3 Proximity Sensor (VCNL4010)

The Proximity Click module from MikroElektronika, featuring the VCNL4010 IC, was used. It includes an IR emitter and PIN photodiode for proximity detection up to 20cm. It processes reflected light into a 16-bit register value representing distance. Additional registers allow configuration. The sensor's I2C address is 0x13 (7-bit notation).

More information available at the product page: MikroElektronika Proximity click

2.2.4 Colour Sensor (TCS34725)

The TCS34725 RGB colour sensor from Adafruit, with an IR filter and white LED, was selected. It connects easily and has supporting circuitry on-board. An on-board white LED illuminates the object, and the sensor measures reflected light through an IR filter for accurate colour readings. The LED is controlled via a MOSFET connected to an MPSSE GPIO line. Accurate readings require the object to be very close (1-2 cm). The sensor's I2C address is 0x29 (7-bit notation).

More information available at the product page: Adafruit Colour Sensor

2.2.5 GPIO

A GPIO line controls the colour sensor's white LED. Another line acts as an activity indicator, toggling on each sensor reading. Both use ADBUS, available on FT232H, FT2232H, FT4232H, and C232HM cables. ACBUS lines (not on FT4232H/C232HM) offer up to 8 additional I/Os, totaling 13 GPIO lines besides I2C.

2.2.6 I2C

The I2C bus uses AD2:0 pins. AD0 is the MPSSE clock out pin (SCL). The MPSSE is always the I2C Master. ADBUS 1 (Data Out) and ADBUS 2 (Data In) are connected for the bi-directional data line.

For FT232H, AD0 is output (clock) and AD1 is output (data out), AD2 is input (data in). FT232H supports drive-only-zero for open-drain selection on AD7:0 and AC7:0. FT2232H/FT4232H simulate open-drain by tristating AD1 (data out) via GPIO writes.

2.2.7 EEPROM Settings

Configuration EEPROM is recommended for optimizing settings. FTDI modules often have them pre-fitted. FTDI's FT_PROG software can update EEPROM settings via USB.

  • For FT232H and FT2232H, FIFO mode is recommended. ADBUS lines start as tristate. MPSSE mode can be entered from UART or FIFO.
  • Note that some ACBUS lines are driven even in FIFO mode (e.g., TxE#).
  • It is suggested to disable the VCP option in EEPROM to prevent accidental port opening by other applications.
  • EEPROM allows changing device description and serial number for easier identification.

2.3 Prototype Hardware

[Image: Figure 3 - Prototype Hardware showing the assembled circuit with FTDI module, sensors, and breadboard.]

3 Software

The software is developed in Visual Studio 2013 using C#. The code is organized into four main areas:

  • Application code: The main application handling the user interface and sensor configuration/reading.
  • Sensor Interface Functions: Utilize generic I2C functions to build I2C transactions for sensors.
  • I2C Functions: A generic I2C library that converts I2C calls into MPSSE commands for the D2xx driver.
  • D2xx Driver and C# Wrapper: Provides a C# wrapper to interface with FTDI's D2XX driver functions. Similar applications exist for VB.NET (AN_355) and C++ (AN_255, AN_113).

3.1 Sample code package

The source code for the sensor application is provided. The #define at the top of the code must be set to configure it for the specific FTDI device (FT232H, FT2232H, or FT4232H), accounting for open-drain capabilities and GPIO usage.

[Code Snippet: Example #defines for device selection, e.g., //#define FT232H, #define FT2232H]

The application displays the compiled device type in the GUI. Auto-detection based on device properties can be implemented for universal use.

Note: This application demonstrates MPSSE programming for an I2C Master interface. While it includes basic error checking, it is not a comprehensive guide to Windows application programming best practices.

The provided functions serve as a basis for further development and may require customization for specific applications and I2C peripherals.

4 Software - Application Code

This section outlines the demo application, comprising a main window with button handlers.

The user interface features:

  • Status indication (Open, Ready, Closed, Running).
  • Proximity value readout (0-65535).
  • Red, Green, and Blue value readouts (0-255).
  • A horizontal bar graph showing relative proximity.
  • A coloured background indicating the object's colour when in close proximity.

[Image: Figure 4 - Application window showing the GUI with display, interface status, sensor readings, and control buttons.]

4.1 Form1_Load

This handler initializes the state of buttons and radio buttons when the form loads.

4.2 Button1_Click (Initialise button)

Clicking the Initialise button triggers D2xx calls to detect connected FTDI devices. The application opens the first available port (e.g., FT232H single port, or port A of FT2232H/FT4232H). An alternative method using device description is commented out.

The I2C_ConfigureMpsse function is then called to set up the device for MPSSE operation. On completion, a status LED on ACbus6 is illuminated (for FT232H/FT2232H).

The ProximitySensorConfig and ColourSensorConfig functions are called to configure the sensors via I2C.

4.3 Button2_Click (Start button)

When the Start button is clicked, the application enters a loop to read the proximity sensor. The reading is converted to a string and displayed. Under ambient conditions, readings are typically up to 2500. A Log10 transformation is applied for readings above an idle level to provide a more linear relationship with distance.

If proximity exceeds 10,000 (approx. 2cm), the colour sensor becomes usable. The white illumination LED on the colour sensor is activated via ADbus3. The application's background colour changes to reflect the RGB data from the colour sensor.

On FT232H and FT2232H, GPIO line AC6 toggles to indicate activity. The loop continues as long as the 'Running' variable is true.

4.4 Button3_Click (Stop button)

The Stop button sets the 'Running' variable to false, halting sensor readings. It calls myFtdiDevice.Close() to close the FTDI device port and then exits the application.

5 Software - Sensor Interface Functions

These functions manage sensor configuration and reading, using a common I2C operation sequence adaptable to various sensors. Consult sensor datasheets for specific protocols and registers.

5.1 Proximity Sensor

The proximity sensor uses the following I2C transactions for writing and reading:

[Diagram: Figure 5 - I2C transfers for Proximity sensor, showing write command to VCNL4010 and read data from VCNL4010, including start, stop, address, ACK/NAK, and data bytes.]

5.1.1 Configuration (ProximitySensorConfig())

This function performs basic proximity sensor configuration. The example demonstrates writing to a register, which is a general method for I2C device register writes.

[Code Snippet: Example C# code for configuring the proximity sensor, involving I2C_SetStart, I2C_SendDeviceAddrAndCheckACK, I2C_SendByteAndCheckACK, and I2C_SetStop.]

The process involves sending an I2C start condition, the device address (write mode), the register index, the data byte, and finally an I2C stop condition, with error checking at each step.

5.1.2 Reading (ProximitySensorReading())

To read the proximity sensor, the Config register is first checked to determine if a valid reading is ready. The application polls the sensor in a loop until a reading is available.

The read transaction begins with an I2C Start, followed by an I2C write of the sensor's address (write bit set) and the register to be read (REGISTER_COMMAND).

A repeat start is sent to read data without releasing the bus. The sensor's I2C address is sent again (read bit set). A call to I2C_ReadByte clocks in a byte, with a NAK parameter (false) indicating it's the last byte.

[Code Snippet: Example C# code for reading the proximity sensor, including polling for data ready and reading the 16-bit value.]

The proximity value is read as a 16-bit integer. The code can be enhanced using functions like I2C_Read2BytesWithAddr for combined operations.

5.2 Colour Sensor

This section details the configuration and reading of the colour sensor, showing I2C transfers.

[Diagram: Figure 6 - I2C Transfers for Colour sensor, illustrating I2C Write Protocol, I2C Read Protocol, and Combined Format.]

5.2.1 Configuration (ColourSensorConfig())

Colour sensor configuration uses the same register writing technique as the proximity sensor, allowing minimal or extensive configuration via I2C writes to various registers.

5.2.2 Reading (ColourSensorReading())

Reading the colour sensor is similar to the proximity sensor but involves eight bytes for the result (16-bit clear, red, green, and blue values). Many I2C devices support reading multiple registers in a single transaction, incrementing the internal pointer automatically.

[Code Snippet: Example C# code for reading colour sensor data, involving multiple I2C_ReadByte calls for clear, red, green, and blue values.]

The values are stored in corresponding variables, and the final 16-bit colour values are calculated. These calls could be replaced by a combined function like I2C_Read2BytesWithAddr.

6 Software - I2C Functions

The I2C functions provide commands for I2C operations and create MPSSE command buffers for chip communication, abstracting MPSSE specifics from higher layers.

Provided functions include:

  • I2C_ConfigureMpsse
  • I2C_SendByteAndCheckACK
  • I2C_SendDeviceAddrAndCheckACK
  • I2C_ReadByte
  • I2C_Read2BytesWithAddr
  • I2C_SetStart
  • I2C_SetStop
  • I2C_SetLineStatesIdle
  • I2C_GetGPIOValuesLow
  • I2C_SetGPIOValuesHigh
  • I2C_GetGPIOValuesHigh

These functions are intended as a starting point and may require modification. Return code 0 indicates success; 1 indicates failure.

An I2C transaction is the period between I2C Start and Stop conditions.

6.1 MPSSE Commands

The application combines D2XX calls (e.g., myFtdiDevice.SetBitMode) and MPSSE commands to configure the device and implement I2C communications. The MPSSE commands are buffered and sent via MyFtdiDevice.Write after the device is in MPSSE mode.

Refer to the D2xx Programmer's Guide (Appendix A) and AN_108/AN_135 for MPSSE command details.

6.2 Function Descriptions

This section details the provided I2C functions, highlighting differences for FT232H and FT2232H/FT4232H.

6.2.1 I2C_ConfigureMpsse

Configures the MPSSE for I2C Master operation. It uses device API calls and MPSSE commands, requiring the device channel to be open. It sets the device to MPSSE mode and configures flow control.

The latency timer is set to 16ms for quick response. The function verifies MPSSE mode by sending invalid commands (0xAA, 0xAB).

6.2.2 3-phase clock

Enables 3-phase clock mode for I2C, ensuring data validity on both clock edges. This mode increases clock cycle length by 50% and reduces frequency to 2/3rds compared to two-phase mode, with a 33.3% duty cycle.

[Diagram: Figure 7 - Three-Phase clocking, showing oscilloscope traces comparing two-phase and three-phase clocking.]

6.2.3 Clock rate

The clock divider is set to achieve the desired I2C clock rate by dividing the internal 60MHz MPSSE clock. The calculation for a 400KHz I2C rate is provided, using 600KHz as a basis due to the 1/3rd frequency reduction in three-phase mode.

[Mathematical formula for Clock Rate calculation]

An optimized equation for three-phase clock mode is also provided.

Note: The Clock Divisor is an integer; rates may require rounding.

6.2.4 Open Drain

I2C_SetLineStatesIdle sets I2C lines to idle states and applies GPIO values to ADBUS. FT232H has a drive-only-zero feature for open-drain simulation on ACBUS/ADBUS pins. FT2232H/FT4232H simulate open-drain using GPIO writes (low data value, input direction).

6.2.5 I2C_SendByteAndCheckACK

Clocks out one byte to the I2C bus for writing. It requires the device to be addressed first. The function sends the data byte, a GPIO command to manage SDA state, and then clocks in the ACK bit from the peripheral. A 'Send Result Back Immediately' command (0x87) returns the ACK bit to the host.

The function returns 0 on success and 1 on failure. For FT2232H/FT4232H, additional GPIO writes manage ADBUS bit 1 for data output and ACK input.

6.2.6 I2C_SendDeviceAddrAndCheckACK

Sends an I2C address on the bus. It takes the 7-bit address and a boolean for read/write. It combines these into an 8-bit value and sends it, checking for ACK/NAK status via the global variable I2C_Ack.

Note: I2C peripheral documentation may quote addresses in 7-bit or 8-bit formats. This function accepts the 7-bit value with the R/W bit specified separately.

For FT2232H/FT4232H, GPIO writes manage ADBUS bit 1 to allow the I2C device to drive the line for ACK.

6.2.7 I2C_ReadByte

Reads a single byte from the I2C bus. It clocks in one byte from the peripheral and then clocks out an ACK (true) or NAK (false) bit. The result is stored in InputBuffer(0).

Note: Read the byte before calling the next I2C function to avoid overwriting.

6.2.8 I2C_Read2BytesWithAddr

Addresses the device and reads two bytes. It combines addressing and reading operations for efficiency, ACKing the first byte and NAKing the second. This is useful for 16-bit registers or sequential reads.

This function is not used in the example but serves as an illustration of combining operations. It does not allow checking ACK state before reading.

6.2.9 I2C_SetStart

Sends the I2C Start condition to begin a transaction or as a repeat start. It uses GPIO commands to manage SCK and SDA lines, bringing SDA low then SCL low.

FT2232H/FT4232H simulate open-drain by controlling data value and pin direction.

6.2.10 I2C_SetStop

Sends the I2C Stop condition to end a transaction. It pulls SCL and SDA down, then brings SCL high, followed by SDA high, leaving both in a high (open drain) state.

FT2232H/FT4232H simulate open-drain similarly.

6.2.11 I2C_SetLineStatesIdle

Sets I2C lines to idle states outside of transactions and writes ADbus GPIO values. This function is for setting GPIO when no transaction is active, as it releases the SCL line.

6.2.12 I2C_GetGPIOValuesLow

Retrieves GPIO values of ADbus bits 7:3. The function sends a GPIO low byte read command and a send-immediate command. The result is masked to isolate bits 7:3.

I2C_SetLineStatesIdle must be called first to set GPIO directions.

6.2.13 I2C_SetGPIOValuesHigh (FT232H and FT2232H Only)

Sets the data and direction of ACbus bits 7 to 0. It sends a 'Write GPIO High Byte' command with direction and value bytes. This function does not affect I2C lines.

FT232H: MPSSE controls/reads ACBUS bits 0-7. Bits 8 and 9 are configurable in EEPROM.

FT4232H: This function cannot be used as it only has 8 bits per port.

6.2.14 I2C_GetGPIOValuesHigh (FT232H and FT2232H Only)

Reads the values of ACbus bits 7 to 0. It sends a 'Read GPIO High Byte' command. The return value should be checked for success, and pin values read from InputBuffer(0).

It is recommended to call I2C_SetGPIOValuesHigh beforehand to set ACBUS pin directions.

FT232H: Controls/reads ACBUS bits 0-7. Bits 8 and 9 are configurable in EEPROM.

FT4232H: This function cannot be used.

7 Software - D2xx Driver and C# Wrapper

This section explains the use of FTDI's D2xx driver and C# wrapper for effective I2C communication. The wrapper provides functions like Send_Data and Receive_Data to simplify D2xx calls, including error checking and queue status management.

The application uses the managed C# wrapper (FTD2XX_NET.DLL and FT22XX_NET.XML). Further information and the wrapper source code are available on the FTDI website.

http://www.ftdichip.com/Support/SoftwareExamples/CodeExamples/CSharp.htm

7.1.1 Send_Data

Sends requested bytes to the FTDI device using myFtdiDevice.Write. The call blocks until completion. Setting a read timeout (e.g., 5 seconds) is recommended.

7.1.2 Receive_Data

Reads requested bytes from the driver buffer using myFtdiDevice.GetRxBytesAvailable. Data is buffered on-chip and sent back when the buffer is full, the latency timer expires, or a 'Send Immediate' command is issued.

This function reads data from the driver buffer, checking queue status. It handles data buffering and availability for the application.

7.1.3 FlushBuffer

Clears any bytes in the driver's receive buffer. This is typically used during device initialization for I2C.

7.1.4 Multiple Channels

The Send_Data, Receive_Data, and FlushBuffer functions are hard-coded for a single FTDI device instance. For multiple MPSSE channels (e.g., two I2C Masters on FT2232H), separate instances are required, and the functions would need modification or device references passed.

8 Further Development

The provided sample applications and I2C functions serve as a foundation for further development and customization. Additional error checking relevant to specific sensors and applications can be incorporated.

8.1 Other Languages

The MPSSE command set is portable to platforms supporting D2xx drivers. The method of sending/receiving data would need porting. The graphical interface also requires platform-specific adaptation.

FTDI offers I2C Master examples in C++ (AN_255) and Visual Basic .NET (AN_355). These can be modified for FT2232H/FT4232H support.

The sample code could also be structured as a C# class.

8.2 Clock Stretching

MPSSE does not natively support clock stretching. While it has adaptive clocking, it's not designed for I2C clock stretching and is not guaranteed or supported by FTDI. Reducing the SCL rate is a potential solution, as some peripherals may not require clock stretching at lower rates.

For peripherals requiring clock stretching, FTDI's FT4222H and FT260 bridging devices are recommended. Examples for interfacing with these are available.

8.3 Hardware

Hardware can be enhanced with an I2C isolation chip to electrically isolate the measurement side from the PC. The application can be adapted for a wide range of sensors and peripherals with I2C interfaces.

9 Using the Demo

This section outlines the steps to use the provided example on a Windows PC:

  1. Install FTDI Driver: Download and install the latest FTDI driver executable. The driver can also be loaded via Windows Update.
  2. Connect Hardware: Use a standard USB cable to connect the FTDI module to the PC's USB2 port. The white LED on the colour sensor module will illuminate until MPSSE is configured.
  3. Device Manager: Windows will install the driver, and the device will appear under Universal Serial Bus Controllers.
  4. Ready LED: The red Ready LED on the demo board illuminates once the driver is installed and enumeration completes.
  5. Run Application: Open the sample code executable (found in the bin > Release folder) or the solution file (.sln) in Visual Studio for debugging. Ensure the correct device type is selected via #define.

[Image: Figure 8 - Application window after opening the program, showing the GUI.]

  1. Initialize: Click the 'Initialise' button. The program finds and opens the FTDI device, configuring the MPSSE. The status changes to 'Open' then 'Ready'.
  2. Start Measurement: Click the 'Start' button. The green LED blinks to indicate measurements. The white LED on the colour sensor turns off if no object is nearby. Proximity values may show around 2500 without an object due to background levels.
  3. Object Approach: Slowly bring an object towards the sensors. The proximity bar graph increases proportionally (within approx. 20cm range).

[Image: Figure 9 - Application with object approaching, showing updated proximity readings.]

  1. Close Proximity: When the object is within approx. 2cm, the colour sensor's white LED turns on, and the background colour changes to indicate the measured colour (e.g., red).

[Image: Figure 10 - Application with red object in close proximity, showing colour change and readings.]

  1. Object Moves Away: The white LED turns off when the object moves away, as colour sensing is not valid at greater distances.
  2. Close Program: Click the 'Stop' button to halt measurements, close the FTDI device port, and exit the application.

10 Conclusion

This application note and example demonstrate the implementation of a USB-I2C Master interface using FTx232H devices and the FTDI C# wrapper for GUI control. It explains the MPSSE features used for I2C protocol implementation.

The code is intended for modification to suit various I2C interfacing and sensing applications. It is compatible with FTDI modules like UM232H, UM232H-B, FT2232H mini modules, FT4232H mini modules, and C232HM cables, as well as the IC itself on custom PCBs.

FTDI offers other bridging devices for I2C Master implementation, including the FT4222H and FT260. The FT260 is a HID class device usable without a separate D2xx driver. More information is available on the FTDI homepage.

11 Contact Information

Head Office – Glasgow, UK
Future Technology Devices International Limited
Unit 1, 2 Seaward Place, Centurion Business Park
Glasgow G41 1HH
United Kingdom
Tel: +44 (0) 141 429 2777
Fax: +44 (0) 141 429 2758
E-mail (Sales): sales1@ftdichip.com
E-mail (Support): support1@ftdichip.com
E-mail (General Enquiries): admin1@ftdichip.com

Branch Office – Tigard, Oregon, USA
Future Technology Devices International Limited (USA)
7130 SW Fir Loop
Tigard, OR 97223-8160
USA
Tel: +1 (503) 547 0988
Fax: +1 (503) 547 0987
E-mail (Sales): us.sales@ftdichip.com
E-mail (Support): us.support@ftdichip.com
E-mail (General Enquiries): us.admin@ftdichip.com

Branch Office – Taipei, Taiwan
Future Technology Devices International Limited (Taiwan)
2F, No. 516, Sec. 1, NeiHu Road
Taipei 114
Taiwan, R.O.C.
Tel: +886 (0) 2 8797 1330
Fax: +886 (0) 2 8751 9737
E-mail (Sales): tw.sales1@ftdichip.com
E-mail (Support): tw.support1@ftdichip.com
E-mail (General Enquiries): tw.admin1@ftdichip.com

Branch Office – Shanghai, China
Future Technology Devices International Limited (China)
Room 1103, No. 666 West Huaihai Road,
Shanghai, 200052
China
Tel: +86 21 62351596
Fax: +86 21 62351595
E-mail (Sales): cn.sales@ftdichip.com
E-mail (Support): cn.support@ftdichip.com
E-mail (General Enquiries): cn.admin@ftdichip.com

Web Site: http://ftdichip.com

Distributor and Sales Representatives: Please visit the Sales Network page of the FTDI Web site for contact details.

System and equipment manufacturers are responsible for ensuring their systems meet all applicable safety and regulatory requirements. FTDI disclaims liability for system designs and application assistance. Use of FTDI devices in life support/safety applications is at the user's risk. This document is subject to change without notice.

Appendix A - References

Document References

Product Pages

  • FT232H
  • FT2232H
  • FT4232H

IC Datasheets

  • FT232H Datasheet
  • FT2232H Datasheet
  • FT4232H Datasheet

Hardware

  • UM232H and UM232H Datasheet
  • USB Hi-Speed Cables and C232HM Cables Datasheet
  • UM232H-B and UM232H-B Datasheet
  • FT2232H Mini-Module and FT2232H Mini-Module Datasheet
  • FT2232H-56 Mini-Module and FT2232H-56Q Mini-Module Datasheet
  • FT4232H Mini-Module and FT4232H Mini-Module Datasheet
  • FT4232H-56 Mini-Module and FT4232H-56Q Mini-Module Datasheet

MPSSE Documents

  • AN_108 Command Processor for MPSSE and MCU Host Bus Emulation Modes
  • AN_135 MPSSE Basics (Link)

Application Notes

  • AN_355 FT232H MPSSE Example-I2C Master Interface with Visual Basic
  • AN_255 USB to I2C Example Using the FT232H and FT201x Devices (C++)
  • AN_113 Interfacing FT2232H Hi-Speed Devices to I2C Bus

Additional References

  • D2XX Drivers
  • C# .NET Wrapper
  • AN_411 Source Code

Acronyms and Abbreviations

TermDescription
GPIOGeneral Purpose Input Output
I2CInter-IC bus
LEDLight Emitting Diode
MPSSEMulti-Protocol Synchronous Serial Engine
USBUniversal Serial Bus

Appendix B – List of Tables & Figures

List of Tables

  • Table 1 - Features by device type

List of Figures

  • Figure 1 - Sensor hardware and application
  • Figure 2 - Schematics
  • Figure 3 - Prototype Hardware
  • Figure 4 - Application window
  • Figure 5 - I2C transfers for Proximity sensor
  • Figure 6 - I2C Transfers for Colour sensor
  • Figure 7 - Three-Phase clocking
  • Figure 8 - Application window after opening the program
  • Figure 9 - Application with object approaching
  • Figure 10 - Application with red object in close proximity

Appendix C – Revision History

RevisionChangesDate
1.0Initial Release2017-05-17
1.1Update to Clock Stretching section to refer to FT260 and FT4222H for applications needing this feature.2020-02-12
PDF AN 411 FTx232H-MPSSE-I2C-Master-Example-in-Csharp Microsoft Word 2013 Microsoft Word 2013

Related Documents

Preview FTDI H-Series USB2.0 High-Speed Bridge Solution Datasheet
Comprehensive datasheet for FTDI's H-Series USB2.0 high-speed bridge controllers, including FT232H, FT2232H, FT4232H, FT4232HA, and FT4222H. Details features, specifications, applications, and comparison tables for simplifying system design.
Preview FTDI Device Input/Output Pin States: A Comprehensive Guide
Explore the reset, suspend, and active states of input/output pins for a wide range of FTDI devices, including FT232R, FT245R, FT232H, and more. This application note details pin configurations and functions for optimal device integration.
Preview Python Support for FTDI Products: A Technical Guide
Explore how to leverage Python programming with FTDI products using VCP and D2XX drivers. This technical note provides examples and resources for integrating Python with FTDI hardware.
Preview FTDI UM232H USB Hi-Speed Development Module Datasheet
Datasheet for the FTDI UM232H, a single-channel USB Hi-Speed to Serial/FIFO development module. Details features, specifications, pinouts, and configuration options for integrating USB connectivity into electronic systems.
Preview FTDI Drivers Installation Guide for Linux (AN_220)
This application note provides a step-by-step guide for installing FTDI D2XX drivers on Linux systems. It covers downloading the driver archive, extracting files, installing shared object and static libraries, and compiling/running sample applications for FTDI devices.
Preview FTDI UMFT4222EV USB2.0 to Quad SPI/I2C Bridge Development Module Datasheet
Datasheet for the FTDI UMFT4222EV, a USB2.0 to Quad SPI/I2C bridge development module featuring the FT4222H chip. Details features, applications, pinouts, configuration, and power options for embedded systems.
Preview FT200XD USB I2C SLAVE IC Datasheet
Datasheet for the FT200XD, a USB to I2C slave interface IC from FTDI. Details features, specifications, pinouts, applications, and programming.
Preview FT234XD USB to BASIC UART IC Datasheet
Datasheet for the FT234XD, a compact USB to serial UART interface device from Future Technology Devices International. Features include optimized packaging, integrated MTP memory, clock generation, and support for various UART configurations.