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

Post here first, or if you can't find a relevant section!
Post Reply
asking
Posts: 16
Joined: Mon May 29, 2023 1:15 pm

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

Post 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.
by fpiSTM » Fri Aug 11, 2023 10:29 am Go to full post
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

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

Post by fpiSTM »

asking
Posts: 16
Joined: Mon May 29, 2023 1:15 pm

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

Post by asking »

Thanks got it,

But any idea how to run 2 SPI @ same time ?
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

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

Post by fpiSTM »

Why not only one SPI with different CS?
asking
Posts: 16
Joined: Mon May 29, 2023 1:15 pm

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

Post by asking »

can i use multiple instances of max6675 ? that should work ?
asking
Posts: 16
Joined: Mon May 29, 2023 1:15 pm

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

Post 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.
dannyf
Posts: 446
Joined: Sat Jul 04, 2020 7:46 pm

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

Post 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.
Post Reply

Return to “General discussion”