Page 1 of 1

Need to read MAX6675 K Type Thermocouple on SPI1 and SPI2 Simultaneously

Posted: Fri Aug 11, 2023 10:14 am
by asking
Hi,

I am looking for resources on internet but not getting results for interfacing MAX6675 to SPI using STM32F103C8T6.

Can anyone please help me out where to start for using K-Type Thermocouple IC MAX6675 to read temperature from 2 Modules on SPI1 and SPI2.

I am using STM32 Arduino Core for implementation.

Re: Need to read MAX6675 K Type Thermocouple on SPI1 and SPI2 Simultaneously

Posted: Fri Aug 11, 2023 10:29 am
by fpiSTM

Re: Need to read MAX6675 K Type Thermocouple on SPI1 and SPI2 Simultaneously

Posted: Fri Aug 11, 2023 11:49 am
by asking
Thanks got it,

But any idea how to run 2 SPI @ same time ?

Re: Need to read MAX6675 K Type Thermocouple on SPI1 and SPI2 Simultaneously

Posted: Fri Aug 11, 2023 12:24 pm
by fpiSTM
Why not only one SPI with different CS?

Re: Need to read MAX6675 K Type Thermocouple on SPI1 and SPI2 Simultaneously

Posted: Fri Aug 11, 2023 12:35 pm
by asking
can i use multiple instances of max6675 ? that should work ?

Re: Need to read MAX6675 K Type Thermocouple on SPI1 and SPI2 Simultaneously

Posted: Fri Aug 11, 2023 1:02 pm
by asking
Okay,

I had success using 2 Instances, i think this library can use any PINs as BITBANG @ SPI. so you can use multiple sensor only drawback would be 3 pins would be wasted. better option would be to use CS to multiplex sensors saving IO pins.

Re: Need to read MAX6675 K Type Thermocouple on SPI1 and SPI2 Simultaneously

Posted: Fri Aug 11, 2023 11:20 pm
by dannyf
I think you will find that to truly sample the data "simultaneously", you have to share the CS pin.

Then you can share the SCK pin.

So for two sensors, you need 1 CS pin, 1 SCK pin and 2 SO pins.