I2C signls

Hi all,
What is the exact use of I2C(SCL,SDA) signals?

Thanks
BS

Replies

  • jnnewton
    jnnewton
    inter-chip (uC, uP, etc.) or inter-board communications. CL is the clock line, DA is the data line. there are master-slave and multi-master setups. each device has an address.
  • tech_vaibhav_ee
    tech_vaibhav_ee
    why do we require i2c for communication between two microcontrollers or any two devices..why cant we just wire the input and output pins of those two devices so that data from one reaches the other??
    plz give some practical applications where i2c ,spi or any other interfaces are used and why they are used??
    plz help !!!!
  • balaseven
    balaseven
    Hi,
    There is no need of I2C for connecting two devices.We need it to connect multiple devices on the same bus.

    When connecting multiple devices to a micro controller, the address and data lines of each device were conventionally connected individually. This would take up precious pins on the micro controller, result in a lot of traces on the PCB, and require more components to connect everything together. This made these systems expensive to produce and susceptible to interference and noise.
    To solve this problem, Philips developed Inter-IC bus, or I2C, in the 1980s. I2C is a low-bandwidth, short distance protocol for on board communications. All devices are connected through two wires: serial data (SDA) and serial clock (SCL).The active wires, SDA and SCL, are both bidirectional.



    Thanks
    BS
  • tech_vaibhav_ee
    tech_vaibhav_ee
    thanx for replying..
    suppose i am making a line follower(a bot which is programmed to follow a black line) . i m using 4 sensors whose output would be connected to 4 comparators giving digital 0s and 1s depending on input voltage. now these 4 comparators are connected to the microcontroller which works according to the combination of these digital inputs.
    1) do we require i2c between sensor and comparator.
    2) do we require i2c between comparators and microcontroller.(and how do we make sure that all the 4 outputs of comparators reach microcontroller at the same time)
  • mkaras
    mkaras
    No you do not require I[sup]2[/sup]C between the comparator output and the MCU. Just connect the outputs right to port pins of your MCU that your FW will setup as inputs. The FW can read all four port bits directly by accessing the port input register in the I/O section of the MCU.

    You would be using I[sup]2[/sup]C to connect up other devices that had a higher level of complexity. Several examples could include a temp sensor, a serial EEPROM or a port expander. In the latter case you may choose something like a port expander if your project has already used up all the port pins on the MCU and you still need more.

    If you were to add an I[sup]2[/sup]C bus to your design it takes two wires, SCL and SDA, each with pullup resistors, that would connect from the MCU to the various devices. For example if you had a temp sensor and a RTC chip both could be connected to these same wires as a "bus". You can drive the I[sup]2[/sup]C bus prototcol from the MCU via a FW routine implementing what is often called a bit-banging approach or you could take advantage of an on-board I[sup]2[/sup]C controller circuit that many modern MCUs have now days. For the second method the FW support to talk to the attached devices accesses internal registers of the onboard I[sup]2[/sup]C controller.
  • balaseven
    balaseven
    Hi all,

    What is the need of pull up resistors in I2C bus?


    Thanks
    BS
  • mkaras
    mkaras
    I2C bus line drivers are designed as what is called "open collector" or "open drain" which means that the driver only has a provision to turn on and pull the signal line to a low level. When the driver goes off it removes itself from the bus line. The pull up resistor takes over at this point and restores the signal to a high level.

    Open drain is used for I2C bus lines so that multiple devices can support pulling the bus line low while at the same time not having to worry about fighting another driver that would be trying to force it high.

You are reading an archived discussion.

Related Posts

Hi!

Hello to all CEans.. I am Pragya Sinha ...doing b.tech in ECE from Mody Institute of Technology & Science,Lakshmangarh(Rajasthan)... I am a new member here and hope this community will...
Just came accross this interesting site at where i found they offer various services to the electronics engineering community. The services you can read about include Application Engineering Component...
I want to know some important topics for paper presentation involving newer technology
hello crazy's sir i have an idea .i want to discuss one thing and also i need some imp suggestions from you .i am coming to the point . if...
hello one and all.......i am rohan doing my 3rd year mechanical engg.....as all know we have to do a project for the final year......mainly i am interested in automobiles and...