Reading SPI slaves with different clock cycle requirements

Hi,
I am trying to understand how Arduino knows how many clock cycles to send, to read from multiple SPI slaves that require different numbers of clock cycles.
I have two MAXIM thermocouple IC's MAX6675 and MAX 31855 on the same system.
The 6675 datasheet says that I need to send 16 clock cycles to read the temperature data, whilst the 31855 says I need only 14 clock cycles. (but goes on to say 32 cycles to read both cold junction and thermocouple).
Question.
How does the Arduino know how many clock cycles to send as it selects the associated CS line to read each slave?
These MAXIM IC's only have a Data Out line so there is no handshaking.
How does it work 'idiot's guide' please....
Thanks in anticipation.....
Dave

Do you use the libraries for both devices? The librarie knows that sort of things.

The ADC has 14 bit precision but the SPI protocol transmits multiples of 8 bits. See the "Detailed Description" section for the meaning of the transferred bits.

Hi thanks for your swift reply.
Ah! I wondered if the clock information was embedded in the library for each device as I couldn't see how the SPI library could know?
However as beginner I was just 'blindly' including (what I thought) was the appropriate device libraries without knowing how to 'peer' inside them!
My frustration is that the MAX31855 library that came with an internet sourced Arudino project isn't reporting the thermocouple temperature.
However I built a separate Arduino on a breadboard and downloaded a new simple thermocouple application and this works using the Serial Monitor, so the MAX31855 module is alive.
Now you have confirmed that it's the associated library that tells the Arduino how to deal with the SPI 'reads', then I suspect that the library is dud and that's where I should be looking.
Thanks for confirming my 'newbie' suspicions.
Dave

Well, the Clock is going Low|HIGH|LOW|HIGH at a frequency, say 5mHz. One device could take 500 Low|HIGH cycles to do its thing, another device can take 1000000 Low|HIGH clock cycles to do its thing and another device could take 30000000000000 Low|HIGH cycles to do its thing.

And different instructions on the same device could take different clock cycles to do their thing.

More likely 5 MHz.

That's up to the devices internals, not related to SPI transmission clock.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.