Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Why SPI has NO pull up?

Status
Not open for further replies.

abhishek.2138

Full Member level 2
Joined
Dec 21, 2013
Messages
131
Helped
0
Reputation
0
Reaction score
1
Trophy points
1,298
Activity points
2,383
For I2C protocol, there is pull up required because its open drain configuration.
But for SPI protocol why pull up not required?
 

Hi,

As you say, I2C bus uses open-drain / open-collector at the IC output, so you need a pull-up resistor to complete the circuit.

SPI bus uses classic (assuming CMOS) buffer at its output, where PMOS transistor pulls the output up and NMOS transistor pulls the output down.

In CMOS digital circuits, both transistors cannot pull simultaneously, because that would cause a short between VDD and GND.

Shlooky
 
Last edited:
Hi,

Pedantic: It´s not the "protocol" that uses any resistors... It´s the hardware, the PHY..

I agree with shlooky.
The I2C is open drain. Means it can only pull to GND ... it can only force "LOW".
Without a pull up nothing pulls HIGH, thus the signal is OPEN and the logic level is undefined. It may be HIGH, LOW or inbetween.
Thus you need a pull up to pull the signal "gently" HIGH. Thus you get defined levels.

***
SPI are push-pull drivers. They pull to GND = LOW and they push to VCC = HIGH.
Only when not selected they have to be OPEN. In this case another device on the SPI bus may be active and drive the MISO signal without causing a bus collision.

I personally don´t like the floating MISO line, thus I usually also connect a weak pull up resistor (10k ... 100k).
(floating means undefined level, when a device is disconnected. With the pullup I can rely on HIGH when disconnected". Also floating signal voltage may increase input buffer supply current and may even cause oscillation and EMI problems)

Klaus
 
Hi,

As you say, I2C bus uses open-drain / open-collector at the IC output, so you need a pull-up resistor to complete the circuit.

SPI bus uses classic (assuming CMOS) buffer at its output, where PMOS transistor pulls the output up and NMOS transistor pulls the output down.

In CMOS digital circuits, both transistors cannot pull simultaneously, because that would cause a short between VDD and GND.

Shlooky
In case of PMOS, does it have internal pull up?
 

Hello!

For I2C protocol, there is pull up required because its open drain configuration.
But for SPI protocol why pull up not required?

The idea with this resistor is that any of the masters / slaves can pull any line
(SDA or SCL) low. and the resistors pull them high.

I don't know where you are writing from, but have you ever stepped in a bus in US?
Maybe not all the buses, maybe not all the states, but in some buses, asking for stop
is made with a unique rope which goes around inside of the whole bus. On end of the
rope is firmly anchored, one is linked to a bell (or a switch that activates a bell).
If anybody pulls the rope, it activates the bell / switch.

That's the same idea for I2C. As you can have more than 1 slave on the bus, and also
more than one master in some implementation, doing this push/pull would mean that in
some cases, one of the terminals of the bus defines the level and another one wants
to take the mike ant talk. In this case, it would result in a short circuit.

With resistor, all the terminals on a bus are equal, any terminal can ask for the mike
and talk at any time.

On the other hand, SPI is a one to one system which uses 3 or 4 wires.
Clock and MOSI are always output by the master and therefore can be made with a push-pull
stage. Similarily MISO is always defined by the slave.
The master to multislaves is made using chip select signals, which ensures that 2
slaves will never talk at the same time.

Dora.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top