FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Author Topic: FT232H GPIO use as I2C SDA  (Read 487 times)

Dete

  • Newbie
  • *
  • Posts: 3
    • View Profile
FT232H GPIO use as I2C SDA
« on: May 27, 2020, 07:27:32 PM »

Hello,

is it possible to use a GPIO C0..C9 as an I2C SDA?
I want to connect 2 or more same I2C Devices on the ft232h. The Address from the devices are not changeable.
The SCL are split to every devices and the every devices get his own SDA . In the software i want to switch beetween the devices.


Had anyone an example code in c# for te MPSSE mode?

Greets Dete
Logged

FTDI Community

  • Administrator
  • Sr. Member
  • *****
  • Posts: 469
    • View Profile
Re: FT232H GPIO use as I2C SDA
« Reply #1 on: May 28, 2020, 02:51:45 PM »

Hello,

It is possible to use AC0-AC7 as GPIO but AC8/9 are not controllable in MPSSE mode.

You can use MPSSE bit-bang to implement I2C although it will be slower than the usual MPSSE-assisted I2C as it is entirely bit-banged.

We have a small example below which was originally for FT2232H/FT4232H where users wanted open-drain but as it uses MPSSE bit-bang it may be a starting point. it uses the default I2C pins but you could re-code the values so that it drives other pins instead. if using multiple sets of SDA and SCL you would need to implement the I/O writes as mask values so that using one set of pins does not affect to the others (or have a copy of the functions for each pair of I2C pins and just make all other lines an input in each function and call only one at a time). Note that this is just an unofficial example and is not guaranteed or fully evaluated,

BitBang Example

Alternatively, you can get I2C muxes which allow you to have more than one device of the same address, such as
http://www.ti.com/interface/i2c/switches-and-multiplexers/products.html

Hope one of these help,

Best Regards, FTDI Community




Logged

Dete

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: FT232H GPIO use as I2C SDA
« Reply #2 on: May 28, 2020, 06:31:37 PM »

Hello FTDI Community,

thanks for the answer and for the example. I will try it.

Greets Dete
Logged