Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Do we need to use pull up resistors in SPI lines when the ADC and Microcontroller are far apart

+1
−0

I have an ADC board. This board will communicate with a STM32 develoment board via SPI interface. I am using jumper cables for connecting the ADC SPI lines to ST32 evaluation board.

Below is my ADC schematic. I gave the ADC schematic for review to the concerned analog devices team. The response received is given below.

We recommend adding the pull-up resistors on all lines. Generally, a 10k pull-up resistor can be used. However, if track/distance is long i.e. more than 5 to 8 inches then we would suggest using a 4.7k resistor. It could be useful to design these pull-up resistors in and they can be used as a ‘population option’.

Image_alt_text

For robustness and reliability (over time) Analog devices suggested to include pull-up resistors on the connector J4 going to the SPI pins.

May I know your thoughts.

History

2 comment threads

So add pull ups? (4 comments)
How far? How fast? (2 comments)

1 answer

+2
−0

SPI signals are ordinary digital logic signals. They are not really meant to go off-board.

However, 150 mm is not that far. If the grounds of the two boards are solidly connected reasonably parallel to the SPI lines, then you probably won't have any problems.

SPI consists of three common lines, SCK, MOSI, and MISO, plus individual select lines for each slave. SCK and MOSI are always driven by the master. Passive pullups/downs don't accomplish anything on those lines.

MISO is only driven by whatever slave is selected, and therefore floats when no slave is selected. The master is not looking at the line when no slave is selected, so the arbitrary data values do not matter. However, in-between levels can cause some digital logic inputs to draw excessive power or even oscillate. I always put a weak pulldown on MISO to keep it in a well-defined state when not driven.

The individual slave select lines should always be driven by the master. However, the startup state needs to be considered. It may be 10s of ms before the microcontroller acting as the SPI master powers up, initializes, and eventually drives the slave select lines high. You have another issue in that the two boards may become disconnected. In that case, you don't want any of the slaves to think they are selected. A pullup on each SS line close to the slave is a good idea, even when on the same board as the master. I consider a pullup required when off-board.

One issue to consider with pullups is how the power is sequenced between the two boards. If power for the pullup comes up before the power to the micro, then there could be a problem of latch-up when the micro's power comes up. Sometimes additional circuitry is needed to make sure all inputs to a microcontroller are low as it is powered up.

Another solution for the externally driven SS lines is for the master to drive them via open collectors. That takes an extra resistor and transistor per SS line, but is immune to power sequence issues. In case of open-collector drive, make the pullup at the slave low enough to solidly keep the line high when the slave is not selected.

History

0 comment threads

Sign up to answer this question »