Author Topic: Usb to uart/i2c adapters... Interchangeable?  (Read 1171 times)

0 Members and 1 Guest are viewing this topic.

Offline bigjoncoopTopic starter

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Usb to uart/i2c adapters... Interchangeable?
« on: November 06, 2023, 03:37:41 am »
Hey fellas,

So like most of you I'm sure, I've got a ton of different USB to uart/ i2c adapter boards.
Ftdi, ft232rl, cp2102, USB to TTL, etc...!!!!

I've been looking into this new project and most of the guides I've been able to find mention using a cp2112 adapter to connect USB to i2c.. (SMBus)

And some of the guides mentioned that you could also use a Arduino.

Just need to connect to the SCL & SDA pads to flash new firmware...

SO MY MAIN QUESTION IS, AREN'T ALL THESE ADAPTERS CAPABLE OF DOING THIS BASIC JOB?

I realize that each one may have a specific use case in certain situations, and some of them don't have 3.3v and/or 5v outputs, etc...

DO I REALLY NEED TO BUY A "CP2112" NOW TO ADD TO MY COLLECTION? 😳
« Last Edit: November 06, 2023, 04:08:25 am by bigjoncoop »
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11905
  • Country: us
    • Personal site
Re: Usb to uart/i2c adapters... Interchangeable?
« Reply #1 on: November 06, 2023, 03:55:35 am »
CP2112 is a USB HID to I2C specifically. None of the other ICs you mention support I2C.

So, if the project calls for I2C, you need that IC specifically.

And sure, you can use Arduino or any other MCU.
« Last Edit: November 06, 2023, 03:58:21 am by ataradov »
Alex
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9323
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Usb to uart/i2c adapters... Interchangeable?
« Reply #2 on: November 06, 2023, 12:32:07 pm »
Just get a Raspberry Pi Pico if you want a USB to "almost anything" adapter.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 13157
  • Country: ch
Re: Usb to uart/i2c adapters... Interchangeable?
« Reply #3 on: November 06, 2023, 06:16:37 pm »
Well, the CP2112 or one of the numerous competing chips.

With that said, don’t underestimate the complexity of addressing one of these USB to I2C adapters — it’s not like serial (UART, etc) that just works as a COM port.

There’s a reason companies can get away with selling $400 USB-to-I2C interfaces: they’ve written nice software to run what is probably $30 of hardware.
« Last Edit: November 07, 2023, 07:47:19 am by tooki »
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15800
  • Country: fr
Re: Usb to uart/i2c adapters... Interchangeable?
« Reply #4 on: November 06, 2023, 08:28:41 pm »
Just get a Raspberry Pi Pico if you want a USB to "almost anything" adapter.

Yep, ultimately if the OP is ready to do some work - it will need some to get a working solution - a RPi Pico board and some code will get you there with a lot of flexibility.
But unless you can find ready-made code (there may very well be, didn't check), you'll have to do some coding work.

In terms of FTDI, the ICs that do I2C were already mentioned in another thread, there's also a Microchip one that seems to work well.
A word of caution if you're using a FTDI chip for that: it works well but it can be very slow. Especially if you're using a FT232H. I did recommend it earlier for those who want to easily use Python (as it's supported by PyFtdi and that works without a hiccup on all platforms including macOS), but it is extremely slow actually, as every byte transfered needs to be acknowledged and the chip can't do it transparently, so that implies back-and-forth USB transactions for every byte. Awful. It's fine if you have no particular timing constraints though, but avoid it if you do.

And back to the OP, none of these solutions are "Interchangeable", so forget about that. There's no standard in USB to I2C converters, contrary to UART.
« Last Edit: November 06, 2023, 08:30:27 pm by SiliconWizard »
 
The following users thanked this post: tooki


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf