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: A linux, a UM232H and a I2C device - now what do i do with it?  (Read 8842 times)

nroos

  • Newbie
  • *
  • Posts: 2
    • View Profile

Hello,

Is there maybe a guide what i actually have to do to connect a I2C slave device to a PC and communicate with the device in Linux? For the conversion i would use a UM232H module.

The application notes i found so far explained always just a part, not the big picture. With the research i have done so far i found out that using D2xx and libMPSSE should do it on the software side. Compiling was successful, running the static example (static_link) also until it waited for incoming data.

But now what do i do with the UM232H? Do i have to configure it somehow? To which of the 16 connections do i attach my I2C device? I looked at the wires with a scope; one wire obviously had a data transfer on it. But there was no wire with the clock...

It would be really helpful if there was a document which just says: Do this, do that and so on, to avoid all this time consuming research.

Kind regards

Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 891
    • View Profile
Re: A linux, a UM232H and a I2C device - now what do i do with it?
« Reply #1 on: May 21, 2020, 04:42:31 PM »

Hello,

To use I2C with FT232H, see AN_135 FTDI MPSSE Basics and our existing MPSSE Example projects:

http://www.ftdichip.com/Support/SoftwareExamples/MPSSE.htm

There are two options to use I2C modes with the MPSSE engine:

a. Use LibMPSSE libraries. Example code is provided with the download.

b. Use D2XX drivers direct. Example code is shown at I2C.
AN_108 Command Processor For MPSSE and MCU Host Bus Emulation Modes provides the necessary information.

Option b is the best option to use the D2XX drivers direct (no dependency on libMPSSE library).

Best Regards,
FTDI Community
Logged

nroos

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: A linux, a UM232H and a I2C device - now what do i do with it?
« Reply #2 on: May 26, 2020, 08:26:08 AM »

Hello and thanks for the reply,

I have done already what you describe. And what do i have to do next to communicate with a I2C device? Do i have to put the UM232H into I2C mode, or ist the software doing this? Which pins are the I2C pins? Do the pins need external pullups or are they chip-internal and can be controlled by software?

As described, i don't see the complete I2C signals on the pins. I have seen one pin which had some kind of data on it, but there was no I2C clock on any pin, so the data i have seen could just be a RS232 signal or something like that...

Kind regards
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 891
    • View Profile
Re: A linux, a UM232H and a I2C device - now what do i do with it?
« Reply #3 on: May 29, 2020, 05:14:53 PM »

Hello,

The application code on the PC would enter MPSSE mode then I2C can be configured.

External pullups are required.

The pins required are clear in the documentation:

ADBUS0 –SK/CLK
ADBUS1 –DO
ADBUS2 –DI
ADBUS3 –CS

Note that from AN_135, DO must be connected to DI externally as well.

Best Regards,
FTDI Community
Logged