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 )
Return value
Parameter IN
Parameter OUT
etSTS
etCMD cmd
stMAX6675_O* rlt
OSS-ECAL status code
OSS-ECAL command code
Receive data from MAX6675
etCMD
eCMD_CONFIG
Feature :
SPI communication configuration command.
Process :
1. SPI configuration.
Command API function :
etSTS oMAX6675_CONFIG( void )
Return value :
eSTS_FIN
eSTS_ERR_HAL_SPI
eSTS_ERR_COMMAND_CODE
eSTS_ERR_OTHERS_RUN
eSTS_ERR_SPI_OBJECT
NOTE :
eCMD_READ
Feature :
Command to read the value of Register, convert it, and save it to rlt.
Process :
1. SPI send & receive.
2. Save received data (16bit) to rlt.dummy, 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.
Command API function :
etSTS oMAX6675_READ( stMAX6675_O* rlt )
Return value :
eSTS_FIN
eSTS_ERR_MIN
eSTS_ERR_MAX
eSTS_ERR_HAL_SPI
eSTS_ERR_COMMAND_CODE
eSTS_ERR_OTHERS_RUN
eSTS_ERR_SPI_OBJECT
NOTE :
stMAX6675_O
float32 temperature
uint8 dummy
uint8 ti
uint8 id
uint8 ste
Register b14-b3
Register b15
Register b2
Register b1
Register b0
to float Temperature 0.0~1023.75[°C]
to bit0 Dummy
to bit0 THERMOCOUPLE
to bit0 DEVICE ID(only 0)
to bit0 STATE
Files
Folder* | File | summary |
---|---|---|
MAX6675_HALNAME/sample | sample.c (.cpp) | Sample Application Program |
| sample.h | Sample Application Header |
MAX6675_HALNAME | oMAX6675.c (.cpp) | OSS-ECAL Program for MAX6675 |
| oMAX6675.h | OSS-ECAL Header for MAX6675 |
| oss_ecal.h | OSS-ECAL Common Header (Ver 01.00.00 or later) |
| user_setting.c (.cpp) | Const and Table of User setting |
| user_setting.h | Header of User setting |
| readme.md | Readme |
| OSS-ECAL Terms of Use.txt | OSS-ECAL Terms of Use |
* For HALNAME, please refer to HAL Support.
HAL Support List
MCU/Board manufacturer | HAL | MCU* | Development environment* | HALNAME |
---|---|---|---|---|
Arduino | Arduino 1.8.6 | ATmega2560 ATmega328P | Mega 2560 Rev3 Arduino Pro Mini 3.3V | ARDUINO |
ARM | Mbed 6.17.0 | STM32F401RETx | STM32 Nucleo-64 boards | MBED |
Infineon | ModusToolbox HAL Cat1 2.4.3 | CYBLE-416045-02 | CY8CPROTO-063-BLE PSoC 6 BLE Prototyping Kit | ModusToolbox |
NXP | MCUXpresso SDK iMXRT1051B_1052B ksdk2_0 | CYBLE-416045-02 | IMXRT1050-EVKB | iMXRT1051B1052B |
Renesas | SSP 2.4.0 | R7FS7G27H3A01CFC | S7G2 SK | SSP |
STM | STM32Cube FW_F4 V1.27.1 | STM32F401RETx | STM32 Nucleo-64 boards | STM32F4 |
* 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.
HAL | Download OSS-ECAL Ver |
---|---|
Arduino 1.8.6 | |
Mbed 6.17.0 | |
ModusToolbox HAL Cat1 2.4.3 | |
MCUXpresso SDK iMXRT1051B_1052B ksdk2_0 | |
SSP 2.4.0 | |
STM32Cube FW_F4 V1.27.1 |
“ABC.zip was blocked because this type of file can harm your device.” in Microsoft Edge.
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