I2C on amd64

Use a logic level converter to convert the 3.3V signals to 5V TTL and vise versa. You could drive a 5V TTL input with a 3.3V output (3.3V is above the logic '1' minimal voltage of TTL) but driving a 3.3V input with a 5V TTL signal is likely going to blow something up (unless the chip is 5V tolerant but I doubt that).

The TXS0108E is useful. You can buy these on breakout boards. They're not that expensive.


The I2C device which I want to use with this are 5 V capable, for example this one:

I will start my experiments with this ADS1115, it works very well on a BeagleBone Black at a 3.3 V level, however, I had this working already behind an ADUM1251, which is an I2C isolator.

With this in place, the BBB worked at 3.3 V and the other side at 5 V (actually ±2.5 V) with the ADS1115. This is a perfect way to make an uniploar (0 ... VDD) ADC working bipolar (-VDD/2 ... +VDD/2).
 
Regarding level shifters it is possible to build a bidirectional one by 2x transistors in common base configuration. As far as I remember you can find it by searching for "Nokia" and "Level shifter". I did not find a PDF on my PC but I have a print out somewhere which I can scan and send you if you are interested. Of course a dedicated IC is easier to use.

About the 74LS05 it seems to be a circuit which connects SDA and SCL to two different pins per signal. It will be a matter of the driver to combine them to I2C. Just a super minor, it might be safe to connect pin 13 with pin 14. Then the input of U1F is not floating.
 
Regarding level shifters it is possible to build a bidirectional one by 2x transistors in common base configuration. As far as I remember you can find it by searching for "Nokia" and "Level shifter". I did not find a PDF on my PC but I have a print out somewhere which I can scan and send you if you are interested. Of course a dedicated IC is easier to use.

About the 74LS05 it seems to be a circuit which connects SDA and SCL to two different pins per signal. It will be a matter of the driver to combine them to I2C. Just a super minor, it might be safe to connect pin 13 with pin 14. Then the input of U1F is not floating.
Have a look at lpbb(4). I tried to reproduce exactly the scheme which is said to work with the bit banging kernel module.

PS:
Pin 13 of JPP1 is connected to GND and hence to pin 7 of U1 (as it is in said man file).
 
Wow, I have not expected a schematics in ASCII art. If that is supported it is perfect :).
...

I hope, I will see this soon, and I will report the results here.

...
Regarding pin 13 I meant the input of the spare inverter section U1F. It is adjacent to pin14 which is its supply pin.

Aah, OK, I will do this. I left it as is, because it was not even present in Phillip's original ASCII art scheme.
 
I finished the parallel port to I2C bit banging circuit on a tiny prototype board - it is not as nice as a real pcb would have been, like the 3D image in my other post, however, I soldered and checked everything very carefully, and I am sure that this part should work. Into the I2C slot, I plugged in a breakout board featuring a TI-I2C-ADC (ADS1115) -- see the pictures below.

Unfortunately, everything was to no avail, since the lpbb(4) kernel module seems to have been broken for at least 14 years.
https://lists.freebsd.org/pipermail/freebsd-stable/2008-March/041468.html

Well, so it is, this project goes back into the drawer, until I find some time to look at the lpbb module -- don't hold your breath.

IMG_1310.JPG
IMG_1309.JPG
IMG_1313.JPG
 
Here is the message from the FT232H from my first post that arrived in the mail.
Code:
Mar 12 06:04:51 E6420 kernel: ugen1.6: <FTDI FT200X USB I2C> at usbus1
Mar 12 06:04:51 E6420 kernel: uftdi0 on uhub3
Mar 12 06:04:51 E6420 kernel: uftdi0: <FT200X USB I2C> on usbus1

Looking here I need to switch it from RS232 mode to Open Drain mode with thier Windows utility.
 
Here is the message from the FT232H from my first post that arrived in the mail.
Code:
Mar 12 06:04:51 E6420 kernel: ugen1.6: <FTDI FT200X USB I2C> at usbus1
Mar 12 06:04:51 E6420 kernel: uftdi0 on uhub3
Mar 12 06:04:51 E6420 kernel: uftdi0: <FT200X USB I2C> on usbus1
I purchased a similar module which arrived today. It's detected by FreeBSD, but there's possibly one big deal breaker which I missed earlier:

From https://electronics.stackexchange.com/questions/420673/usb-to-i2c-for-a-beginner : "T200XD is a I2C slave chip, so it cannot be used as a master to talk to another I2C slave [...]"

I was expecting it to be a master. The FreeBSD i2c subsystem also seems to expect the hardware acts as a master. Not sure how useful a computer USB<-> I2C slave setup would be, perhaps to emulate a sensor?

I also purchased a CH341 board, which has both serial and I2C pins, but it seems to be supported by FreeBSD only as a serial port (uchcom device); when switched to I2C mode via the board header, it shows up as a ugen device.
 
Didn't buy that one unfortunately. Revamped my list.
The price increased now on those alot too. More than inflation...

I probably have ADD as I go in wild swings from project to project and never finishing anything.
If I machined like that I wouldn't get paid.
 
Back
Top