Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

What are the differences between I2C and RS485 ?

Status
Not open for further replies.

saurabh17g

Member level 2
Joined
Mar 30, 2010
Messages
49
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Bombay
Activity points
1,707
i want to know the difference between RS485 and I2C. I want to compare the two protocols in terms of advantages/disadvantages, datarate, robustness since both are 2 wire.
How about implementing /communicating devices using an Ethernet cable. I am planning to use PIC 24fj 64 family of microcontrollers
 

jalonso

Junior Member level 3
Joined
Sep 18, 2010
Messages
26
Helped
7
Reputation
14
Reaction score
6
Trophy points
1,283
Location
Euskadi
Activity points
1,398
Re: I2C vs RS485

Hi,

I2C (IIC) stands for Inter-Integrated Circuit, so itss designed for data exchange between two integrated circuits (e.g. microcontroller <--> eeprom) which are quite close (normally same PCB). Speed can go up to 400 kHz. Synchronous protocol: Clock + Data.

RS-485 is designed for long distance between two devices. Max distance is about 1 km but depends on baud rate. RS485 is asynchronous, no clock signal is used. Very used in electrically "noisy" environments (industrial environments).

Regards.
 

Sink0

Full Member level 6
Joined
Nov 25, 2009
Messages
390
Helped
37
Reputation
74
Reaction score
30
Trophy points
1,308
Location
Sao Paulo, Brazil
Activity points
4,186
Re: I2C vs RS485

I2C is a protocol and a physical layer, so you just need it, and there is no need for lever conversion. RS-485 is just a physical layer so you have to create your own protocol, and you need an externa tranceiver for lever conversion. RS-485 can go much faster than I2C and probably your bottlenec would be your UART speed (if you are using UART). Ethernet would be protocol and physical layer, but there are many ethernet options. Ethernet would be more suitable for bigger packages of data and no Real Time.

CYa
 

saurabh17g

Member level 2
Joined
Mar 30, 2010
Messages
49
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Bombay
Activity points
1,707
Re: I2C vs RS485

Thank you all!!

Ethernet would be more suitable for bigger packages of data and no Real Time. Would you please elaborate on this.
 

noobler

Member level 2
Joined
Sep 21, 2010
Messages
49
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,288
Location
Pilipinas
Activity points
1,521
Re: I2C vs RS485

the higher data, the slower is the transfer
 

Sink0

Full Member level 6
Joined
Nov 25, 2009
Messages
390
Helped
37
Reputation
74
Reaction score
30
Trophy points
1,308
Location
Sao Paulo, Brazil
Activity points
4,186
Re: I2C vs RS485

Well, just to explain, the real meaning of Real Time is not about how fast is your connection, but how deterministic it is. On real time connection you know the max time some transaction is going to take. At Ethernet it is impossible to predict that as there is no master or arbitration, so at a worst case scenario you could have data collision for ever. At a CAN network as an example there is no master too, but there is data arbitration, where the packages with lowest index are dominant over the others. On a RS-485, usually there is a master (it is up to your protocol), so usually a slave will just put package on the network if the master request, thefore there is no chance of data collision.

Cya
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top