Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:08 03 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : How to talk to a MAX6675 with a MM2....

     Page 2 of 2    
Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 05:32am 25 Jul 2021
Copy link to clipboard 
Print this post

I should have thought about that, really.  The datasheet says as much on page 5:





So, the chip will take a reading when I pull CS low, and that data is saved in the chip data register, and is clocked out via the SPI command.

BUT as I never released CS(returned it high), next time I read the chip, it just clocks out the same data still in the internal registers as I had not released the CS line, so it never took another reading.

Silly me.....  

@ JIM: We really ARE thinking the same things at the same time with this one!!!!    
Edited 2021-07-25 15:33 by Grogster
Smoke makes things work. When the smoke gets out, it stops!
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 05:37am 25 Jul 2021
Copy link to clipboard 
Print this post

I haven't got much else to do today (Well I have but too b....dy cold)



I did clean the coffee machine so the day isn't totally wasted.

Jim
VK7JH
MMedit
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2642
Posted: 06:20am 25 Jul 2021
Copy link to clipboard 
Print this post

If reading the thermocouple is only done intermittently, move the Pin(x) = 1 to the top to ensure a fresh reading.

Do
Pin(x) = 1
Pause 1000
Pin(x) = 0
BYTE = SPI(0)
Print BIN$(BYTE, 16), BIN$((BYTE >> 3),16), BYTE>>5
loop
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 12:48am 26 Jul 2021
Copy link to clipboard 
Print this post

Good point, thanks phil99.  
Smoke makes things work. When the smoke gets out, it stops!
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 02:25am 26 Jul 2021
Copy link to clipboard 
Print this post

You need to allow at least 220mS after raising CS for the conversion to complete.
So don't read in a tight loop.

Jim
VK7JH
MMedit
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 05:31am 26 Jul 2021
Copy link to clipboard 
Print this post

Gotcha.
Smoke makes things work. When the smoke gets out, it stops!
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025