| Author |
Message |
CADDevil
Joined: 26 Jun 2001 Posts: 120
|
20 Jan 2003 18:03 i2c noise |
|
|
|
|
Hello,
I have one question. I have a PID motor controller (18F458) which I want to connect to higher level system.
Because I do not have enough serial ports on the higher level system, I would like to connect the motor unit via I2C or SPI.
Which one is less sensitive to noise ?
|
|
| Back to top |
|
 |
barny
Joined: 06 Apr 2002 Posts: 34
|
20 Jan 2003 21:14 spi noise sensitivity |
|
|
|
|
| CADDevil wrote: |
Hello,
I have one question. I have a PID motor controller (18F458) which I want to connect to higher level system.
Because I do not have enough serial ports on the higher level system, I would like to connect the motor unit via I2C or SPI.
Which one is less sensitive to noise ? |
Neither is designed for robustness. SPI is usually implemented in on-chip hardware, with shift registers clocked by the clock signal, though, so would be very susceptible to glitches. I2C in harware would have same sensitivity, but if you use s/w I2C, you could make input routines sample multiple times to confirm transitions, and make it a more robust.
I2C doesn't work easily through simple optocouplers or buffers, because they have bidirectional data lines. Can't remember if same for SPI?
You could improve I2C by using differential buffers (two wires per signal) and making the data unidriectional - so have one pair with data from the master and one (multidrop) pair with data from the slaves. Slaves only enable their buffers when transmitting. Terminate the lines properly.
HTH
barny
|
|
| Back to top |
|
 |
Google AdSense

|
20 Jan 2003 21:14 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
CADDevil
Joined: 26 Jun 2001 Posts: 120
|
20 Jan 2003 22:07 i2c glitch |
|
|
|
|
SPI does not have bidirectional data, so there should not be a problem with optocouplers.
I understand that RS-485 is much better solution, but the interface chips are expensive.
I think that I will try to use SPI and I will see. After all, the lines will be relatively short (50cm or similar), because the robot is small.
|
|
| Back to top |
|
 |