Max6675 lib

The Max6675 is a very popular part. It converts thermocouple-Outputs directly to digital values.

My implementation is quite “popular” (??) 😉 and because I am rewriting the reflow-software I thought I pack it up in a AVR library.

Download here (AVR-C)

A multichip-version of the lib is under development (testing). It seems that, (in my setup) the MAX6675 needs 200ms between 2 measurements.

The lib contains :

  • max6675.h – Prototypes and HW-Setup
  • max6675.c – Code

Both files must be included using #include (or linked accordingly).

There are 3 functions:

  • void   init_6675(void); – Setup of IO-Pins (as defined in max6675.h)
  • uint16_t   gettemp(void); – Returns temperature as 16 bit integer as delivered by max6675, in 0,25°C-steps, multiplied with 4. Note: it returns degrees centigrade (°C)!
  • uint8_t   getTC(void); – Returns 0 if no thermocouple is detected, returns 255 if there is one.

Note however, the Max6675 is NOT the fastest. I recommend to wait about 500ms between readouts. You can tell whether the pause is too short when the Max6675 returns always the same value.

Have fun!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.