Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

I2C pro's and Con's

Status
Not open for further replies.
I'm looking for information on I2C performence. How long can I have an I2C cable and still have signal intergraty. How often does it fail, how easy is it to debug, maximum bit rate. things like this...
 
The Real MicroMan said:
I'm looking for information on I2C performence. How long can I have an I2C cable and still have signal intergraty. How often does it fail, how easy is it to debug, maximum bit rate. things like this...

I2C is designed for communication between IC's, for example in a TV set. It's not designed for long wires, nor as a general purpose bus. If you are using I2C chips, then you have no choice but to use I2C to control them, otherwise it's not a good choice.

What are you trying to do?.
 
Typical I2C bus can work upto a few centimeters only, with a throughput of 100kbps on standard I2C and 400kbps on Fast I2C.

Philips has one application note which shows how to extend I2C bus upto one mile long. App. note details are:
AN452
One mile long I2C communication using the P82B715
 
Being a slight fan of using i2c, elector has a very nice set of articles on using i2c for home automation, and using i2c bootsers...

Perhaps u should have a look at that...
 
PIC implemented I2C with higher current drivers (their standard pin) than required by the I2C spec, as did many mfgs. The max distance is entirely a matter of how long you can make the wire and still meet the timing as the capacitive load gets larger.

You must select a pullup resistor capable of pulling up the wire's capacitance within spec. The higher current capability of a PIC pin allows lower values of pullup resistors.

The capability of how much wire you can drive depends on the weakest chip on the bus. If you have a single weak device, you cannot use a pullup smaller than that device takes thus you can have no more capacitance (wire length) than that device can drive.

I2C is in many ways an ill-specified bus. It does not assume errors are possible, and is not clear on how to recover from problems. If you're writing your own master/slave, you can be more specific and make it completely reliable.

What are you trying to do?
 
Thanks you guys have been really helpful. What I'm trying to do is have one main controller that controlls differnt I/O,ADC, PWM and such. On the other end is a user interface. I want it to send commands to read and command operation on the controller. By means of a data packet. I also want to view the data packet as the system is fuctioning to verify signals. The choices I'm looking at is I2C, or CAN. I think CAN would be the best, but I have little experance with I2C. So, I really can't rule out I2c TILL I know the Pro's and Con's.

Ok I propose a vote I2C or CAN?

Thanks again everybody, very cool to have a site like this
 
The Real MicroMan said:
Thanks you guys have been really helpful. What I'm trying to do is have one main controller that controlls differnt I/O,ADC, PWM and such. On the other end is a user interface. I want it to send commands to read and command operation on the controller. By means of a data packet. I also want to view the data packet as the system is fuctioning to verify signals. The choices I'm looking at is I2C, or CAN. I think CAN would be the best, but I have little experance with I2C. So, I really can't rule out I2c TILL I know the Pro's and Con's.

Ok I propose a vote I2C or CAN?

As I said above, "if you're using I2C chips, then use I2C", if you're not using I2C chips than there's no reason to use it!.

From your requirements above, a simple RS232 type serial system would do quite easily, and be nice and simple.
 
I don't think there is any reason to use CAN. It's designed for fast, deterministic, serial communications in a high nose environment - it sounds like you don't need any of its features.

I think Nigel is right. RS232 is a much better fit than either I2C or CAN. If you need better noise immunity or higher speeds RS485 is a differential version of RS232 that still uses the UART. It can also be multidrop like I2C.
 
I thinnk RS232 is suitable for 1-to-1 inter device application.
I2C is more suitable for 1-to-many communication, with microcontroller as master and ICs as slaves. I2C use only 2 pins regardless of number of ICs. Besides, I dont think RS232 is commonly found in ADC, or ICs like EEPROM, RTC.
 
StupidDum said:
Besides, I dont think RS232 is commonly found in ADC, or ICs like EEPROM, RTC.

I've said throughout this thread - "if you're using I2C chips, then use I2C", likewise, if you're using SPI chips, then use SPI. But I see no point in using a complicated specific protocol if you don't have any chips that require it - it doesn't give any real advantage.
 
Status
Not open for further replies.

Latest threads

Back
Top