CrazyEngineers
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • jnnewton

    MemberMay 15, 2008

    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.
    Are you sure? This action cannot be undone.
    Cancel
  • tech_vaibhav_ee

    MemberMay 31, 2008

    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 !!!!
    Are you sure? This action cannot be undone.
    Cancel
  • balaseven

    MemberJun 1, 2008

    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
    Are you sure? This action cannot be undone.
    Cancel
  • tech_vaibhav_ee

    MemberJun 1, 2008

    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)
    Are you sure? This action cannot be undone.
    Cancel
  • mkaras

    MemberJun 7, 2008

    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.
    Are you sure? This action cannot be undone.
    Cancel
  • balaseven

    MemberJun 9, 2008

    Hi all,

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


    Thanks
    BS
    Are you sure? This action cannot be undone.
    Cancel
  • mkaras

    MemberJun 9, 2008

    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.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register