S
S
santeri2013-05-09 23:16:51
Arduino
santeri, 2013-05-09 23:16:51

SPI and multiple slaves

hello,
is it possible to connect several slaves via SPI to the atmega?
as I understand it, the bus will be shared, just SS from the master will go to each slave?

another question, what will be the throughput of SPI with a crystal frequency of 20 MHz?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
svd71, 2013-05-11
@svd71

the speed can be (theoretical) up to half the system clock (i.e. up to 10 MHz). But in reality, we must not forget about the flanks.
But in fact, it is calculated from the maximum speed of the slowest slave. After all, the master can arbitrarily quickly pull the clocking of devices - but will the slaves have time to read his data? .. Search the network for the AVR151 document (seemingly). It describes the interface specification.

@
@kubikus, 2013-05-10
_

Of course available. For each slave, you need to allocate your SS. In some cases, you can cascade all the slaves and use a common SS, then they will work as one big shift register.

I
irtos, 2013-05-11
@irtos

if there are a lot of slaves (8 or 16), then you need to install a decoder (for 3 or 4 bits)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question