Shop OBEX P1 Docs P2 Docs Learn Events
SX28 & MAX6675 thermocouple — Parallax Forums

SX28 & MAX6675 thermocouple

AndreaAndrea Posts: 17
edited 2011-02-24 14:44 in General Discussion
Hello,
I'm trying to read MAX6675 with this technique:
Dio             PIN     RC.4 INPUT
Clk             PIN     RC.3 OUTPUT
CS              PIN     RC.2 OUTPUT

result          VAR     Word
thC             VAR     Word

' =============
  PROGRAM Start
' =============

Start:
  CS = 1

Main:
  PAUSE 1
  Clk = 0
  CS = 0
  SHIFTIN  Dio, Clk, MSBPOST, result_MSB
  SHIFTIN  Dio, Clk, MSBPOST, result_LSB
  CS = 1

  thC = result >> 3
  thC = thC */ 640
  thC = thC / 10

  PAUSE 250
  GOTO Main

that I found on this forum...But it is out of my league to extract the value in to format like: "24.00" Centigrade,
and another concern is how to convert word value to ASCII (for LCD).

Thank you!!!

Comments

Sign In or Register to comment.