MAX6675

MAX6675 is a Temperature sensor IC (0 to 1024 °C) made by Analog Devices(Maxim Integrated). This posting will provide the OSS-ECAL(Open Source Software for Electronic Components Abstraction Layer) for MAX6675.
MCU interface : SPI

CAUTION:Please be sure to refer to the latest version of the Datasheet prior to actual design.

MAX6675

General description

The MAX6675 performs cold-junction compensation and digitizes the signal from a type-K thermocouple. The data is output in a 12-bit resolution, SPI-compatible, read-only format.
This converter resolves temperatures to 0.25°C, allows readings as high as +1024°C, and exhibits thermocouple accuracy of 8 LSBs for temperatures ranging from 0°C to +700°C.
The MAX6675 is available in a small, 8-pin SO package.

Feature

  • Direct Digital Conversion of Type -K Thermocouple Output
  • Cold-Junction Compensation
  • Simple SPI-Compatible Serial Interface
  • 12-Bit, 0.25°C Resolution
  • Open Thermocouple Detection

Application

  • Industrial
  • Appliances
  • HVAC

OSS-ECAL specification

API Function

etSTS oMAX6675( etCMD cmd, stMAX6675_O* rlt )

The oMAX6675 function is an API function that executes MAX6675 processing according to the command in the argument.

NOTE:

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_MINMinimum temperature error (rlt.temperature is minimum temperature)
eSTS_ERR_MAXMaximum temperature error (rlt.temperature is maximum temperature)
eSTS_ERR_COMMAND_CODECommand selection error
eSTS_ERR_SPI_OBJECTSPI object selection error
eSTS_ERR_OTHERS_RUNOther components are executing the process
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_SPIHAL SPI error
Parameter INetCMD cmdOSS-ECAL command code
eCMD_CONFIGCommands to set up SPI communication for MCU.

1. Set up SPI communication for MCU.
eCMD_READCommand to read Register value, convert Register value and save to rlt.

1. SPI send & receive.
2. Stores received values in rlt.dummy and rlt.ti, rlt.id, rlt.ste.
3. Convert received data to Temperature.
Temperature = (Register b14-b3) / Gain
(Min, Max Limit)
3. Store Temperature in rlt.temperature.
Parameter OUTstMAX6675_O* rltReceive data from MAX6675
float32 temperatureRegister b14-b3 to float Temperature[℃] 0.0~1023.75℃
uint8 dummyRegister b15 to bit0 Dummy
uint8 tiRegister b2 to bit0 THERMOCOUPLE
uint8 idRegister b1 to bit0 DEVICE ID(only 0)
uint8 steRegister b0 to bit0 STATE

HAL別関数対応表

ArduinoArduinoX
ARMMbedX
Debian ProjectDebian(Linux)X
InfineonModusToolbox X
NXPMCUXpresso MXRT1051B_1052BX
RenesasSSPX
STMSTM32Cube FW_F4 X
etSTS oMAX6675_CONFIG(void)

The oMAX6675_CONFIG function is an API function that set up SPI communication for the MCU.

  1. Set up SPI communication for MCU.

NOTE:

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_SPI_OBJECTSPI object selection error
eSTS_ERR_OTHERS_RUNOther components are executing the process
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_SPIHAL SPI error

HAL別関数対応表

ArduinoArduinoX
ARMMbedX
Debian ProjectDebian(Linux)X
InfineonModusToolbox X
NXPMCUXpresso MXRT1051B_1052BX
RenesasSSPX
STMSTM32Cube FW_F4 X
etSTS oMAX6675_READ( stMAX6675_O* rlt )

The oMAX6675_READ function is an API function that reads the Register value of MAX6675, converts the Register value and stores it in rlt.

  1. SPI send & receive.
  2. Stores received values in rlt.dummy and rlt.ti, rlt.id, rlt.ste.
  3. Convert received data to Temperature.
    Temperature = (Register b14-b3) / Gain
    (Min, Max Limit)
  4. Store Temperature in rlt.temperature.
Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_MINMinimum temperature error (rlt.temperature is minimum temperature)
eSTS_ERR_MAXMaximum temperature error (rlt.temperature is maximum temperature)
eSTS_ERR_SPI_OBJECTSPI object selection error
eSTS_ERR_OTHERS_RUNOther components are executing the process
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_SPIHAL SPI error
Parameter OUTstMAX6675_O* rltReceive data from MAX6675
float32 temperatureRegister b14-b3 to float Temperature[℃] 0.0~1023.75℃
uint8 dummyRegister b15 to bit0 Dummy
uint8 tiRegister b2 to bit0 THERMOCOUPLE
uint8 idRegister b1 to bit0 DEVICE ID(only 0)
uint8 steRegister b0 to bit0 STATE

HAL別関数対応表

ArduinoArduinoX
ARMMbedX
Debian ProjectDebian(Linux)X
InfineonModusToolbox X
NXPMCUXpresso MXRT1051B_1052BX
RenesasSSPX
STMSTM32Cube FW_F4 X

Files

Folder*Filesummary
MAX6675_HALNAME_VERSION/samplesample.c (.cpp)Sample Application Program
sample.hSample Application Header
MAX6675_HALNAME_VERSIONoMAX6675.c (.cpp)OSS-ECAL Program for MAX6675
oMAX6675.hOSS-ECAL Header for MAX6675
MAX6675_ARDUINO.inoSample application programs for Arduino
oss_ecal.hOSS-ECAL Common Header (Ver 01.01.00 or later, AUTOSAR is Ver 01.01.07 or later)
oTypes.hTypedef header file for AUTOSAR
user_setting.c (.cpp)Const and Table of User setting
user_setting.hHeader of User setting
readme.mdReadme
OSS-ECAL Terms of Use.txtOSS-ECAL Terms of Use

* For HALNAME, please refer to HAL Support.

HAL Support List

MCU/Board
manufacturer
HALMCU*Development environment*HALNAME
ArduinoArduino 1.8.6ATmega2560
ATmega328P
Mega 2560 Rev3
Arduino Pro Mini 3.3V
ARDUINO
ARMMbed 6.17.0STM32F401RESTM32 Nucleo-64 boardsMBED
InfineonModusToolbox HAL Cat1 2.4.3CYBLE-416045-02CY8CPROTO-063-BLE PSoC 6 BLE Prototyping KitModusToolbox
NXPMCUXpresso SDK
iMXRT1051B_1052B
ksdk2_0
MIMXRT1052DVL6AIMXRT1050-EVKBiMXRT1051B1052B
RenesasSSP 2.4.0R7FS7G27H3A01CFCS7G2 SKSSP
STMSTM32Cube FW_F4 V1.27.1STM32F401RESTM32 Nucleo-64 boardsSTM32F4
Debian ProjectDebian(Linux) v2022.04TI AM335xBeagleBone Black – Rev CLinux

* MCU and development environment at the time of development. Even if the same HAL is used, different MCUs and development environments may not work together.

OSS-ECAL Download

Please login before downloading. To register as a new user, please click here.
This OSS-ECAL is a sample version and can be downloaded without user registration, but please accept the OSS-ECAL Terms of Use before downloading.

If you are unable to download the File, please contact us and let us know the model number and HAL type. We will send you the file as an email attachment.

Built-in How to

How to incorporate OSS-ECAL into user programs

How to incorporate multiple OSS-ECALs in a user program (same MCU function)

How to incorporate multiple OSS-ECALs in a user program (different MCU function)

How to incorporate multiple identical electronic components into a user program

How to reduce the impact on user programs by replacing electronic components

OSS-ECAL English
error: Content is protected !!