Electronics > Projects, Designs, and Technical Stuff
Long SPI bus lines - should I use series resistors?
(1/4) > >>
HwAoRrDk:
I have been working on a project to augment the capabilities of a device that uses an SPI controlled character-based LCD, by intercepting the SPI communications to the LCD and using my own microcontroller to display other information. I will be using a 74HC365 hex buffer to split the bus on demand (i.e. turn on or off of my additional display info), with my MCU then acting as both a slave to the original mainboard of the device, and as a new master to the LCD.

One thing has made me pause for thought. In its original configuration, the LCD is attached to the mainboard by a rather long cable harness - by the time it winds its way around the chassis, the length totals approximately 2ft/60cm! I believe it is because of this, to mitigate EMI/RFI problems, that the SPI bus is run at a pretty slow clock speed, 10kHz, and the mainboard has 2.2K series resistors on all bus lines. However, by inserting the '365 buffer into the bus, I lose that mitigation for the secondary side, and it will still have a fairly long length (at least 1ft/30cm) to the LCD; will it be wise to replicate the series resistors there?

To add to this, when the bus is split, I would like to talk to the LCD at a much higher speed, preferably the maximum of 1MHz it supports, because I will be adding another SPI device on the bus that it would be too slow to talk to at 10kHz. Should lower series resistance values be used in that case (e.g. < 1K)? Also, should I place the resistors before or after the branch off to the tertiary SPI device?

Any other suggestions or hints for good practice with a long SPI lines most appreciated. :-+
IDEngineer:
I would start by looking at the existing SPI signals with a scope. Then start making your changes, see what effect they have on the signals, and adjust things as necessary to obtain reasonable signals (in-spec rise/fall times, critically damped, etc.).
iMo:
The insertion of serial resistors into SPI with long wires shall minimize the ringing (caused by the inductance of the long wire).
2k2 may work with 10kHz, with 1MHz you need a smaller value - the higher the resistor value the slower are the signal edges (caused by RC, where C is the capacitance of the long wire).
Use something like 50-220ohm with ~xMHz SPI frequencies.

IDEngineer:

--- Quote from: imo on April 17, 2018, 05:34:04 pm ---Use something like 50-220ohm with ~xMHz SPI frequencies.
--- End quote ---
...where "something" is a not a value you guess at, but a value you determine by examination with a scope. As I suggested above.
iMo:
Sure, for example do measure the rising edge for different Rserial values and stay with an Rserial where the rising time is no more than 10% of the H pulse width..


--- Quote ---Also, should I place the resistors before or after the branch off to the tertiary SPI device?
--- End quote ---
The best place for the Rserial is at the active line driver's output.
Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod