MCP9700 Driver
API reference
Loading...
Searching...
No Matches
Classes | Namespaces | Enumerations | Functions | Variables
mcp9700_thermistor.hpp File Reference

Hardware-agnostic MCP9700 / MCP9700A linear active thermistor driver. More...

#include <cmath>
#include <cstdint>
#include "mcp9700_version.h"
#include "../src/mcp9700_thermistor.ipp"
Include dependency graph for mcp9700_thermistor.hpp:

Go to the source code of this file.

Classes

class  hf::mcp9700::Mcp9700Thermistor< AdcType >
 Template driver for MCP9700 family sensors on a multiplexed ADC. More...
 

Namespaces

namespace  hf
 
namespace  hf::mcp9700
 

Enumerations

enum class  hf::mcp9700::Error : uint8_t {
  hf::mcp9700::kNone = 0 , hf::mcp9700::kNotInitialized , hf::mcp9700::kInvalidArgument , hf::mcp9700::kInvalidCoefficients ,
  hf::mcp9700::kAdcError , hf::mcp9700::kOutOfRange
}
 Why the last call failed (see Mcp9700Thermistor::LastError()). More...
 

Functions

const char * GetMcp9700DriverVersion () noexcept
 Driver version string (from the generated mcp9700_version.h).
 

Variables

constexpr float hf::mcp9700::kDefaultVoltsAtZeroC = 0.5F
 Default output voltage at 0 °C (500 mV typical, MCP9700/MCP9700A).
 
constexpr float hf::mcp9700::kDefaultVoltsPerCelsius = 0.01F
 Default sensitivity (10 mV/°C typical).
 
constexpr float hf::mcp9700::kDefaultSpecifiedMinCelsius = -40.0F
 Default lower end of the specified temperature range (°C).
 
constexpr float hf::mcp9700::kDefaultSpecifiedMaxCelsius = 125.0F
 Default upper end of the specified temperature range (°C).
 
constexpr float hf::mcp9700::kDefaultRangeMarginCelsius = 8.0F
 Default plausibility margin (°C) added on both sides of the specified range.
 

Detailed Description

Hardware-agnostic MCP9700 / MCP9700A linear active thermistor driver.

Converts the sensor output voltage (0–Vdd) read through your ADC into °C using the factory-calibrated relationship from the Microchip datasheet (typically T_C = (Vout − 0.5 V) / (10 mV/°C)).

Function Documentation

◆ GetMcp9700DriverVersion()

const char * GetMcp9700DriverVersion ( )
inlinenoexcept

Driver version string (from the generated mcp9700_version.h).