Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to read data from an I2C, but i am beginner in working with serial ports and I2C.
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.
Posted
Updated 17-Feb-12 19:01pm
v2

I2C stands for 'Inter-Integrated Circuit'. The name is an hint of what happens: "serial communication between integrated circuits", e.g. microcontroller communicating with external EEPROM.
Why do you need I2C on the PC side?
Uusually the PC communicates with a microcontroller (via RS232 or USB) that in turns communicates with the peripheral using I2C.
 
Share this answer
 
Comments
M_Mogharrabi 18-Feb-12 1:01am    
sorry for my delay.I have edited my question...
AFAIK there is no PC with an I2C bus connection - there are I2C to USB converters, but those you would just treat as a standard USB / serial port.

What are your actually trying to do? Because I think you have missed out a big chunk of something...
 
Share this answer
 
Comments
M_Mogharrabi 18-Feb-12 1:01am    
sorry for my delay.I have edited my question...
OriginalGriff 18-Feb-12 4:15am    
Treat it as a standard serial port then.
Look at the documentation for your converter - it should tell you everything else, except what kind of data the recipient is expecting, and that is down to the I2C device...
M_Mogharrabi 18-Feb-12 5:18am    
This is the link(http://www.robot-electronics.co.uk/htm/usb_i2c_tech.htm) of my I2C-USB convertor documentation.but i could not found what should i do yet???
please describe more....
OriginalGriff 18-Feb-12 5:27am    
It all seems pretty clear - if technical. They even give you source code examples!
Without actually having the converter to check against, I could not possibly test if the drivers work as standard com ports in .NET - you would have to do that.
Have you read teh documentation, and installed the drivers? Can you see the com port?
M_Mogharrabi 18-Feb-12 23:59pm    
yes,I have installed drivers and i could see com port in device manager and also i could found and run a c# code to open the port.but i want to know if there is another code to read data from my i2c device.my i2c device is RM_144 and '0x53' is the address of it.but i do not know how should i use this address!!!.....
Load Linux and use i2cdetect or the other i2c tools
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900