|
|
View previous topic :: View next topic |
Author |
Message |
June Guest
|
What are benefits using RS232, SP2 and I2C? |
Posted: Wed Nov 27, 2002 7:36 pm |
|
|
Dear all,
Just a simple question here: There are RS232, SP2 and I2C communication. But can anybody tell me the advantages and limitation of using each one of it?
Regards: June,
___________________________
This message was ported from CCS's old forum
Original Post ID: 9543 |
|
|
James A. Littlefield Guest
|
Re: What are benefits using RS232, SP2 and I2C? |
Posted: Wed Nov 27, 2002 9:02 pm |
|
|
:=Dear all,
:=
:= Just a simple question here: There are RS232, SP2 and I2C communication. But can anybody tell me the advantages and limitation of using each one of it?
:=
:=
:=Regards: June,
I am not sure that this is really a simple question! In my experience SPI and I2C are generally used for communications between the PIC and other ICs on the same PCB or physically very nearby. RS232 is generally slower but with the proper drivers will go longer distances. The selection will depend a lot on what you want to interface. Take a look at the types of devices you want to talk to (ie memory, ADCs, DACS, UARTS) and pick the method that is supported by all/most of the devices you want to talk too. It is not uncommon to use SPI or I2C for talking to your local memory (PROM, EEPROM, FRAM) and then use the RS232 for talking to a PC, handheld terminal, etc.
___________________________
This message was ported from CCS's old forum
Original Post ID: 9546 |
|
|
v8power Guest
|
Re: What are benefits using RS232, SP2 and I2C? |
Posted: Wed Nov 27, 2002 11:11 pm |
|
|
this is quite simple
RS232 or EIA232 or RS485 is used for off board communications. say from the application board to the PC. if offers great noise immunity
SPI and I2C are used for on board communications from processor to hardware like memory or sensors.
SPI
Advantage - fast -high through put
disavantages - uses a chip select for eact part so you use more PIO's
I2C
Advantages - low pin count it only uses two pins
Disadvantages - slower less trough put.
:=Dear all,
:=
:= Just a simple question here: There are RS232, SP2 and I2C communication. But can anybody tell me the advantages and limitation of using each one of it?
:=
:=
:=Regards: June,
___________________________
This message was ported from CCS's old forum
Original Post ID: 9553 |
|
|
R.J.Hamlett Guest
|
Re: What are benefits using RS232, SP2 and I2C? |
Posted: Thu Nov 28, 2002 3:22 am |
|
|
:=Dear all,
:=
:= Just a simple question here: There are RS232, SP2 and I2C communication. But can anybody tell me the advantages and limitation of using each one of it?
:=
:=
:=Regards: June,
Firstly, forget the term 'RS232'. This is the name given to one particular signal standard for asynchronous communications. The connections on the PIC, generate asynchronous comms, but don't generate RS232 (you need a buffer chip like the MAX232 to do this). The same asynchronous communication 'standard' (in terms of data format, and rates), can be sent over a lot of other signalling forms. Hence a lot of the serial links on boards these days will be using other systems like RS485 to actually 'carry' the data. Now the standard 'async' connection, requires only one data wire in each direction, is relatively slow, but has the potential to resynchronise on the next character if a bit is lost in transmission. If parity is used, the receiver has the ability to detect single bit errors (but is not guaranteed to detect anything worse). The big advantage of this form, is for 'long distance' comms. The same signals can be sent using the RS232 standard to the PC, or using other signalling forms for miles.
SPI, and I2C, are both aimed at 'inter chip' communicatons. SPI, uses a minimum of three wires (and is much easier with a fourth 'chip select' signal). It is the fastest of the three forms, and sends data in both directions at once. It is ideal for a short range link between two chips. The extra speed is gained by having a seperate clock (hence this is a synchronous interface). The signals could potentially be sent over other signalling standards, but the 'norm', is to just use normal 5v logic connections over just a few inches.
I2C, is very similar, but is 'half duplex', using just two wires, and only transmitting in one direction at a time. Again their is a master synchronisation clock. A lot of standard peripheral chips use this form, and it includes an 'address' identifier in the data sent, allowing several chips to share the same wiring. It is however inherently slower than SPI, firstly because of the overhead of sending the address, and secondly since data is only sent in one direction at a time. Again it is normally sent with 5v levels, and is designed for short range links.
There are 'tricks' that can be done with all these standards. For instance I have boards here, using SPI signals sent over a fibre optic link. This gives greater range than is normally the case for this interface, but is done in this application, to allow the link to enter an 'intrinsically safe' area, without danger. So in each case you have to think of the signal form itself, and also the tranmission 'medium' seperately. However the 'standard' forms, would be to use an RS232 buffer for the async comms, in which case this would be targetted at longer range links outside the local system, and the 5v links for SPI/I2C, which would then be targetted at talking to other processors, and chips. The choice between these forms will depend on what devices you wish to talk to.
Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 9560 |
|
|
Tommy Guest
|
Re: What are benefits using RS232, SP2 and I2C? |
Posted: Thu Nov 28, 2002 10:45 pm |
|
|
:=:=Dear all,
:=:=
:=:= Just a simple question here: There are RS232, SP2 and I2C communication. But can anybody tell me the advantages and limitation of using each one of it?
:=:=
:=:=
:=:=Regards: June,
:=
:=I am not sure that this is really a simple question! In my experience SPI and I2C are generally used for communications between the PIC and other ICs on the same PCB or physically very nearby. RS232 is generally slower but with the proper drivers will go longer distances. The selection will depend a lot on what you want to interface. Take a look at the types of devices you want to talk to (ie memory, ADCs, DACS, UARTS) and pick the method that is supported by all/most of the devices you want to talk too. It is not uncommon to use SPI or I2C for talking to your local memory (PROM, EEPROM, FRAM) and then use the RS232 for talking to a PC, handheld terminal, etc.
Hello, All:
Yes, I2C was designed for inter-IC comm. but I'm designing a distributed-slave system with hundreds of slaves on an i2c bus that's hundreds of feet long.
The slaves are fairly dumb and fast data rates aren't needed.
It's never been done before(to my knowledge) so I know I'm trail-blazing new territory.
Best regards,
Tom
___________________________
This message was ported from CCS's old forum
Original Post ID: 9611 |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|