1
votes

I want to read data from an I2C device in windows XP, but i am beginner in working with serial ports and I2C devices.I have searched a lot however i have just found some codes to write on an I2C device but not read from it.please describe me how should i start?

Edit: I have an I2C device, an I2C to USB convertor and a USB cable.I have connect them together with this sequence: The I2C device is connected to I2C-USB convertor with a cable and the convertor is connected to the USB cable finally the USB cable is connected to my computer system. by the way i have using Windows XP on my system.

1

1 Answers

0
votes

I have a very similar situation. However, my USB-to-I2C device came with a C library, so my code simply has to execute i2c_read() or i2c_write() functions. Then the library takes care to talk to the driver, then the USB-to-I2C device and so on. It is pointless for me to give you the code that I use because we have a custom device and custom library (made specifically for my company).

Since you have the "write" example, there should have been the read functionality as well.

Since you did not provide any particulars on which USB-to-I2C device you have, this is all the information that can be provided.