Giter Site home page Giter Site logo

jchristensen / jc_max31856 Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 24 KB

Arduino library for the Maxim Integrated MAX31856 Thermocouple to Digital Converter

License: GNU General Public License v3.0

C++ 100.00%
arduino sensor thermocouple max31856 arduino-library

jc_max31856's Introduction

Arduino MAX31856 Library

https://github.com/JChristensen/jc_MAX31856
README file
Jack Christensen
Feb 2019

License

Arduino MAX31856 Library Copyright (C) 2019 Jack Christensen GNU GPL v3.0

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License v3.0 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/gpl.html

Introduction

The Maxim Integrated MAX31856 Thermocouple to Digital Converter has 16 eight-bit registers representing 11 parameters as follows:

  • CR0 - Configuration Register 0
  • CR1 - Configuration Register 1
  • MASK - Fault Mask Register
  • CJHF - Cold Junction High Fault Threshold
  • CJLF - Cold Junction Low Fault Threshold
  • LTHFT - Linearized Temperature High Fault Threshold (2 bytes)
  • LTLFT - Linearized Temperature Low Fault Threshold (2 bytes)
  • CJTO - Cold Junction Temperature Offset
  • CJT - Cold Junction Temperature (2 bytes)
  • LTC - Linearized Thermocouple Temperature (3 bytes, read-only)
  • SR - Fault Status Register (read-only)

LTC and SR are read-only. CJT is read-only unless the cold junction sensor is disabled by CJ bit in CR0.

This library works by maintaining a copy of the registers in static RAM. The read() function reads all registers from the MAX31856 into SRAM and the write() function writes all values from SRAM to the MAX31856 for those registers that are not read-only.

A series of get and set functions are provided to retrieve and change the register values held in static RAM, see the .h file.

To retrieve current register values from the MAX31856, first call read(), then one or more of the get functions as needed.

To change register values in the MAX31856, first call read(), then call one or more of the set functions to change values as needed, then call write().

When writing values to any of the fault threshold, cold junction offset or cold junction temperature registers, the user must ensure that the values are constrained to the ranges appropriate for the register(s). Ranges are noted in the .h file; also see the MAX31856 datasheet.

jc_max31856's People

Contributors

jchristensen avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.