electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

SPI and/or I2C and noise sensitivity


Post new topic  Reply to topic    EDAboard.com Forum Index -> PC Programming and Interfacing -> SPI and/or I2C and noise sensitivity
Author Message
CADDevil



Joined: 26 Jun 2001
Posts: 120


Post20 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


Post20 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
Google Adsense




Post20 Jan 2003 21:14   

Ads




Back to top
CADDevil



Joined: 26 Jun 2001
Posts: 120


Post20 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
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> PC Programming and Interfacing -> SPI and/or I2C and noise sensitivity
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
SPI and I2C (3)
about i2c and spi? (1)
SPI and I2C protocols... (4)
Help regarding SPI and I2C (3)
What different are I2C and SPI? (6)
where to get SPI and I2C controller Cores or Verilog (5)
Can I use SPI and I2C module at the same time with PIC18F252 (9)
How to interface both SPI and I2C at the same time with PIC (1)
I2C Doubts 7 and 10 bit addressable I2C slaves (1)
SPI v/s I2C (5)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS