CrazyEngineers Forum

******************************************
Join CE! | CE Innovator Contest! | Forgot password?
Navigation
Reply

  #1 (permalink)
Old 15th May 2008, 04:27 PM
CE - Regular Member
 
balaseven's Avatar
 
I'm a Crazy Electronics Engineer
Join Date: 5th November 2007
Location: 384,403 Km from Moon
Posts: 53
Default I2C signls

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

Thanks
BS
balaseven is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored links
  #2 (permalink)
Old 16th May 2008, 09:46 AM
CE - Newbie
 
I'm a Crazy Jack of All Trades (Master of None) Engineer
Join Date: 16th May 2008
Posts: 1
Default Re: I2C signls

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.
jnnewton is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)
Old 1st June 2008, 12:36 PM
CE - Apprentice
 
I'm a Crazy eee(electrical&electronics engineering) Engineer
Join Date: 29th May 2008
Posts: 10
Default Re: I2C signls

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 !!!!
tech_vaibhav_ee is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)
Old 2nd June 2008, 10:48 AM
CE - Regular Member
 
balaseven's Avatar
 
I'm a Crazy Electronics Engineer
Join Date: 5th November 2007
Location: 384,403 Km from Moon
Posts: 53
Default Re: I2C signls

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
balaseven is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)
Old 2nd June 2008, 02:31 PM
CE - Apprentice
 
I'm a Crazy eee(electrical&electronics engineering) Engineer
Join Date: 29th May 2008
Posts: 10
Default Re: I2C signls

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)
tech_vaibhav_ee is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored links
  #6 (permalink)
Old 8th June 2008, 08:41 AM
CE - Apprentice
 
mkaras's Avatar
 
I'm a Crazy Electrical Engineer practicing HW and Embedded FW Design Engineer
Join Date: 8th June 2008
Location: Oregon USA
Posts: 11
Default Re: I2C signls

No you do not require I2C 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 I2C 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 I2C 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 I2C 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 I2C 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 I2C controller.
__________________
- mkaras
mkaras is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)
Old 9th June 2008, 04:45 PM
CE - Regular Member
 
balaseven's Avatar
 
I'm a Crazy Electronics Engineer
Join Date: 5th November 2007
Location: 384,403 Km from Moon
Posts: 53
Default Re: I2C signls

Hi all,

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


Thanks
BS
balaseven is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)
Old 10th June 2008, 07:42 AM
CE - Apprentice
 
mkaras's Avatar
 
I'm a Crazy Electrical Engineer practicing HW and Embedded FW Design Engineer
Join Date: 8th June 2008
Location: Oregon USA
Posts: 11
Default Re: I2C signls

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.
__________________
- mkaras
mkaras is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored links
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +5.5. The time now is 06:29 AM.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Member comments are owned by the poster. Copyright © 2005-2008 CrazyEngineers.com. All rights reserved.Ad Management by RedTyger