+ Post New Thread
Results 1 to 11 of 11
  1. #1
    Member level 2
    Points: 518, Level: 4

    Join Date
    Jun 2018
    Posts
    53
    Helped
    0 / 0
    Points
    518
    Level
    4

    How many devices can we have on SPI?

    Hi

    Could any one help me please

    How many slave devices can be connected to spi bus?

    •   AltAdvertisement

        
       

  2. #2
    Super Moderator
    Points: 80,159, Level: 69
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    16,270
    Helped
    3690 / 3690
    Points
    80,159
    Level
    69

    Re: How many devices can we have on SPI?

    Hi,

    Theretically infinite.

    * each one needs a unique /CS signal
    * you need to consider bus capacitance and dtive strength of each device....or use buffers, MUX, selectors....

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  3. #3
    Advanced Member level 2
    Points: 3,123, Level: 13

    Join Date
    Aug 2016
    Posts
    548
    Helped
    93 / 93
    Points
    3,123
    Level
    13

    Re: How many devices can we have on SPI?

    Also, you will be limited by the complexity in connection and routing that comes with increased number of slave devices. The traces too are going to.get longer as slave devices increase.
    -------------
    --Akanimo.



    •   AltAdvertisement

        
       

  4. #4
    Advanced Member level 3
    Points: 6,478, Level: 19

    Join Date
    Feb 2014
    Posts
    931
    Helped
    310 / 310
    Points
    6,478
    Level
    19

    Re: How many devices can we have on SPI?

    As others have said as many as you want but SPI doesn't scale that well since you (typically) need individual CS lines for each device. Though SPI GPIO expanders could be used to help address this.

    I2C with its addressing scheme scales better. Two lines gets up to 128 devices (though also bus C limited).



    •   AltAdvertisement

        
       

  5. #5
    Advanced Member level 5
    Points: 18,428, Level: 32
    Achievements:
    7 years registered

    Join Date
    Nov 2012
    Posts
    3,267
    Helped
    815 / 815
    Points
    18,428
    Level
    32

    Re: How many devices can we have on SPI?

    I2C with its addressing scheme scales better. Two lines gets up to 128 devices (though also bus C limited).
    I was under the impression that the number is 255 (256 with zero excluded).



  6. #6
    Full Member level 4
    Points: 3,754, Level: 14
    Achievements:
    7 years registered

    Join Date
    Feb 2007
    Location
    INDIA
    Posts
    238
    Helped
    44 / 44
    Points
    3,754
    Level
    14

    Re: How many devices can we have on SPI?

    I2C is again a separate topic. 127 is theoretical limit. Practically it depends on each device capacitance, speed of the Interface.
    Is it a general question.
    If it is question related to your design, you can post some design parameters like Max speed, devices etc
    For SPI there is no defined standard like I2C, Protocol, number of lines, sampling points everything can be varied.



  7. #7
    Advanced Member level 3
    Points: 6,478, Level: 19

    Join Date
    Feb 2014
    Posts
    931
    Helped
    310 / 310
    Points
    6,478
    Level
    19

    Re: How many devices can we have on SPI?

    Quote Originally Posted by c_mitra View Post
    I was under the impression that the number is 255 (256 with zero excluded).
    The read/write bit reduces the address to 7 bits.



  8. #8
    Advanced Member level 5
    Points: 18,428, Level: 32
    Achievements:
    7 years registered

    Join Date
    Nov 2012
    Posts
    3,267
    Helped
    815 / 815
    Points
    18,428
    Level
    32

    Re: How many devices can we have on SPI?

    The read/write bit reduces the address to 7 bits.
    I should have checked before posting. Thanks anyway



    •   AltAdvertisement

        
       

  9. #9
    Junior Member level 1
    Points: 95, Level: 1

    Join Date
    Nov 2019
    Location
    London
    Posts
    15
    Helped
    0 / 0
    Points
    95
    Level
    1

    Re: How many devices can we have on SPI?

    It depends on a number of slave select lines on the hardware. Example: If my SPI master has 4 slave select lines then we can connect 4 slaves normally.



  10. #10
    Super Moderator
    Points: 80,159, Level: 69
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    16,270
    Helped
    3690 / 3690
    Points
    80,159
    Level
    69

    Re: How many devices can we have on SPI?

    Hi,

    It depends on a number of slave select lines on the hardware. Example: If my SPI master has 4 slave select lines then we can connect 4 slaves normally.
    I agree.

    Or 16 (with additional master /SS line) --> and two HC138
    or 15 without additional master /SS line --> and two HC138
    or 8 with included ( in the 4) master /SS line --> one HC138

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  11. #11
    Newbie level 1
    Points: 20, Level: 1

    Join Date
    Dec 2019
    Posts
    3
    Helped
    0 / 0
    Points
    20
    Level
    1

    Re: How many devices can we have on SPI?

    I agree. You should have checked.



--[[ ]]--