locked
Device communication with I2C RRS feed

  • Question

  • Hi

    This is the continuation of previous question

    Communicate two devices

    Investigating I can see that I2C communication is better than serial communication between device, is it true ?

    Some simple example to pass data using I2C between device ? preferably in c#

    regards


    Leandro Tuttini

    Blog
    MVP Profile
    Buenos Aires
    Argentina

    Wednesday, March 16, 2016 9:57 PM

Answers

  • hi

    thanks for your answer

    >>why do you think i2c is better than serial communication?

    This is the question, Is I2C better than serial?

    Why hackster.io example use I2C instead of serial ?

    Home Automation using Raspberry Pi 2 and Windows 10 IoT

    perhaps the communication distance between device is better?

    may be because windows iot had onboard uart issues in the early days or most of the people used serial to connect two devices but because you found one i2c sample is not really a reason to think i2c is better, you need to understand both, i2c and serial to know which one fits best for you

    as i2c was designed as inter processor communication it works great to communicate with chips on the same pcb and short distances (impedance issues) even if its possible to extend the range nowadays with cables and extenders 

    serial is a full duplex connection and i2c half duplex

    serial is a point to point and i2c a point to multipoint communication

    its impossible for an i2c slave to communicate with the master only the master is able to communicate with the slave, if a slave has something important for the master you need additional gpio pin the slave can drive to inform the master to start the communication

    you will find a lot of information on the internet about more technical details


    Thursday, March 17, 2016 10:00 AM

All replies

  • why do you think i2c is better than serial communication?

    it depends on the scenario as both are different types of communication and not every device is able to be i2c slave

    you already have the links to samples

    " All other MS-IoT Githubs: https://github.com/ms-iot "

    Wednesday, March 16, 2016 10:07 PM
  • hi

    thanks for your answer

    >>why do you think i2c is better than serial communication?

    This is the question, Is I2C better than serial?

    Why hackster.io example use I2C instead of serial ?

    Home Automation using Raspberry Pi 2 and Windows 10 IoT

    perhaps the communication distance between device is better?

    regards


    Leandro Tuttini

    Blog
    MVP Profile
    Buenos Aires
    Argentina

    Thursday, March 17, 2016 4:56 AM
  • Choosing I2C or Serial is depending on the scenerio.

    Here is the example to use I2C in WIOT with RPi2 (C#)

    https://www.hackster.io/vinoth-MVP/windows-10-iot-core-on-raspberry-pi-2-adafruit-sensor-data-412581


    Please mark as answer, if it is correct.
    Please vote,if it is helpful post.
    Vinoth.R

    http://vinoth-vinothblog.blogspot.com
    http://www.e-consystems.com/iot-gateway.asp


    Thursday, March 17, 2016 7:16 AM
  • hi

    thanks for your answer

    >>why do you think i2c is better than serial communication?

    This is the question, Is I2C better than serial?

    Why hackster.io example use I2C instead of serial ?

    Home Automation using Raspberry Pi 2 and Windows 10 IoT

    perhaps the communication distance between device is better?

    may be because windows iot had onboard uart issues in the early days or most of the people used serial to connect two devices but because you found one i2c sample is not really a reason to think i2c is better, you need to understand both, i2c and serial to know which one fits best for you

    as i2c was designed as inter processor communication it works great to communicate with chips on the same pcb and short distances (impedance issues) even if its possible to extend the range nowadays with cables and extenders 

    serial is a full duplex connection and i2c half duplex

    serial is a point to point and i2c a point to multipoint communication

    its impossible for an i2c slave to communicate with the master only the master is able to communicate with the slave, if a slave has something important for the master you need additional gpio pin the slave can drive to inform the master to start the communication

    you will find a lot of information on the internet about more technical details


    Thursday, March 17, 2016 10:00 AM