![]() |
Forum Index : Microcontroller and PC projects : How to talk to a MAX6675 with a MM2....
![]() ![]() |
|||||
Author | Message | ||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
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: AustraliaPosts: 6283 |
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: AustraliaPosts: 2642 |
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 ZealandPosts: 9610 |
Good point, thanks phil99. ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
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 ZealandPosts: 9610 |
Gotcha. ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |