CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

SPI and Pull up Resistors?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
arrow



Joined: 17 May 2005
Posts: 213

View user's profile Send private message

SPI and Pull up Resistors?
PostPosted: Mon Oct 08, 2007 12:28 am     Reply with quote

Hi

Do the SPI lines (in particular the input and output lines) need a pull up resistor?
and if yes, then what values should the Resistors be?

Thank you in advance for your help.
a.
newguy



Joined: 24 Jun 2004
Posts: 1906

View user's profile Send private message

PostPosted: Mon Oct 08, 2007 12:38 am     Reply with quote

No SPI device I've ever used has required pullups. I don't think they're meant to be included as the protocol doesn't allow for more than one slave to reply to the master at once, since each slave needs a dedicated /CS line. The I2C protocol requires them since the data line is shared amongst many slaves (potentially, anyway), and the best comm method there is with open drain drivers.
arrow



Joined: 17 May 2005
Posts: 213

View user's profile Send private message

PostPosted: Mon Oct 08, 2007 12:42 am     Reply with quote

Hi NewGuy

Thank you.

Do SPI lines require any resisotrs (say in series?)
or on the CS line?

Regards
a.
Ttelmah
Guest







PostPosted: Mon Oct 08, 2007 2:23 am     Reply with quote

_If_ you are running any logic line a long distance, and using high clock rates, then termination may become necessary. If you look at the lines round a typical PC motherboard, you will find that most of the high clock rate ones, have got little termination networks. Usually 330R to V+, and 220R to 0v, often with a small series resistor. Whether you need anything like this, is going to depend on the clock rate being used, length of the line, and particularly how the board is laid out. Typically if your clock rate is below perhaps 1MHz, you will normally get away with nothing. However if you start pushing higher rates, you may need to consider line termination.

Best Wishes
arrow



Joined: 17 May 2005
Posts: 213

View user's profile Send private message

PostPosted: Mon Oct 08, 2007 3:12 am     Reply with quote

Hi Ttelmah

Thank you for your response.

I have the following problem: I have made the circuit that writes (using SPI) to a microSD card on a bread board. It works fine.

I have made a PCB of what is on the bread board and there is no writting to the microSD card.
On the OScope there is a clock pulse from both the bread board and the PCB circuits. The pulses look similar (similar rise and fall times).

I have tried to use pull up resistors of 51kOhms on all my Data lines.

On the PCB the microSD card is almost directly below a level shifter MAX3378 chip and close to the PIC18LF2550. Will these chips cause noise/ stray capacitance/ other things on the microSD causing it not to work?

How can I measure these effects?

I am really stuck, and do not understand what can be happening on the PCB that is not happening on the bread board!

Any suggestions, hints would be greately appreciated

Thank you for all your help.
a.
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Mon Oct 08, 2007 5:40 am     Reply with quote

An SD card has two different bus modes: At power on the default mode is SD-bus which works more stable with pull-up resistors on the data and clock lines. Only after sending the CMD0 command the bus goes to SPI-mode and the pull-up resitors are not needed anymore.
From the Sandisk product Manual:
Quote:
Rdat and Rcmd are pull-up resistors protecting the CMD and the DAT line against bus floating when no card is
inserted or when all card drivers are in a hi-impedance mode.
Use 10k to 100k for the pull up resistors.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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