Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
LinkBack Thread Tools Display Modes
Old 12th December 2004, 08:23 PM   (permalink)
Default I2C pro's and Con's

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 is offline  
Old 12th December 2004, 09:06 PM   (permalink)
Default

You may want to llook at this site among others for some basic info.
http://www.mcc-us.com/faq.htm

Dialtone
Dialtone is offline  
Old 13th December 2004, 07:16 AM   (permalink)
Default Re: I2C pro's and Con's

Quote:
Originally Posted by The Real MicroMan
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?.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 13th December 2004, 06:30 PM   (permalink)
Default

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
__________________
"There is no way to peace, peace is the way!"
kinjalgp is offline  
Old 13th December 2004, 07:19 PM   (permalink)
Default

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...
pittuck is offline  
Old 14th December 2004, 04:08 AM   (permalink)
Default

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?
Oznog is offline  
Old 17th December 2004, 05:42 PM   (permalink)
Default

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 is offline  
Old 17th December 2004, 08:51 PM   (permalink)
Default

Quote:
Originally Posted by The Real MicroMan
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.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 18th December 2004, 01:32 AM   (permalink)
Default

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.
bmcculla is offline  
Old 19th December 2004, 02:58 PM   (permalink)
Default

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 is offline  
Old 19th December 2004, 05:20 PM   (permalink)
Default

Quote:
Originally Posted by StupidDum
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.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 09:05 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

eXTReMe Tracker