Component: Thermocouple (MCP960X) (Environmental): Difference between revisions
Appearance
No edit summary |
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"" |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 96: | Line 96: | ||
===Initialise=== | ===Initialise=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Initialise''' | ||
|- | |- | ||
| colspan="2" | Configures the I2C bus ready for communications. | | colspan="2" | Configures the I2C bus ready for communications. | ||
| Line 110: | Line 110: | ||
===ReadReference_Float=== | ===ReadReference_Float=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadReference_Float''' | ||
|- | |- | ||
| colspan="2" | Returns the reference (IC die) temperature from the last sample as a floating point. Use Sample first, which samples both reference & themocouple temperatures. | | colspan="2" | Returns the reference (IC die) temperature from the last sample as a floating point. Use Sample first, which samples both reference & themocouple temperatures. | ||
| Line 124: | Line 124: | ||
===ReadReference_Int=== | ===ReadReference_Int=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadReference_Int''' | ||
|- | |- | ||
| colspan="2" | Returns the Reference (IC die) temperature from the last sample as an integer value. Use Sample first, which samples both reference & themocouple temperatures. | | colspan="2" | Returns the Reference (IC die) temperature from the last sample as an integer value. Use Sample first, which samples both reference & themocouple temperatures. | ||
| Line 138: | Line 138: | ||
===ReadThermocouple_Float=== | ===ReadThermocouple_Float=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadThermocouple_Float''' | ||
|- | |- | ||
| colspan="2" | Returns the thermocouple temperature from the last sample as a floating point value. Use Sample first, which samples both reference & themocouple temperatures. | | colspan="2" | Returns the thermocouple temperature from the last sample as a floating point value. Use Sample first, which samples both reference & themocouple temperatures. | ||
| Line 152: | Line 152: | ||
===ReadThermocouple_Int=== | ===ReadThermocouple_Int=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadThermocouple_Int''' | ||
|- | |- | ||
| colspan="2" | Returns the thermocouple temperature from the last sample as an integer value. Use Sample first, which samples both reference & themocouple temperatures. | | colspan="2" | Returns the thermocouple temperature from the last sample as an integer value. Use Sample first, which samples both reference & themocouple temperatures. | ||
| Line 166: | Line 166: | ||
===Read_N_Registers=== | ===Read_N_Registers=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Read_N_Registers''' | ||
|- | |- | ||
| colspan="2" | Reads a number of sequential bytes starting from the specified register | | colspan="2" | Reads a number of sequential bytes starting from the specified register | ||
| Line 195: | Line 195: | ||
===Read_Register=== | ===Read_Register=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Read_Register''' | ||
|- | |- | ||
| colspan="2" | Reads a byte from a register | | colspan="2" | Reads a byte from a register | ||
| Line 214: | Line 214: | ||
===Sample=== | ===Sample=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Sample''' | ||
|- | |- | ||
| colspan="2" | Must be called before any of the Read functions. Reads the memory of the MCP9600/1 IC. Returns 0 for 9600. Checks for errors, MCP9601 only. Returns: 0 = OK, 1 = O/ C Themocouple & 2=S/C Themocouple. | | colspan="2" | Must be called before any of the Read functions. Reads the memory of the MCP9600/1 IC. Returns 0 for 9600. Checks for errors, MCP9601 only. Returns: 0 = OK, 1 = O/ C Themocouple & 2=S/C Themocouple. | ||
| Line 228: | Line 228: | ||
===Write_N_Registers=== | ===Write_N_Registers=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Write_N_Registers''' | ||
|- | |- | ||
| colspan="2" | Writes a set of data values to a sequential registers on the accelerometer | | colspan="2" | Writes a set of data values to a sequential registers on the accelerometer | ||
| Line 257: | Line 257: | ||
===Write_Register=== | ===Write_Register=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Write_Register''' | ||
|- | |- | ||
| colspan="2" | Writes a byte to a register | | colspan="2" | Writes a byte to a register | ||
| Line 282: | Line 282: | ||
==Property reference== | ==Property reference== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Thermocouple Properties | ||
|- | |- | ||
|- | |- | ||
| Line 307: | Line 307: | ||
| colspan="2" | Select Temperature results to be celsius or fahrenheit | | colspan="2" | Select Temperature results to be celsius or fahrenheit | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | I2C Properties | ||
|- | |- | ||
|- | |- | ||
| Line 331: | Line 331: | ||
| colspan="2" | Pin used for SCL (clock signal) | | colspan="2" | Pin used for SCL (clock signal) | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Simulation | ||
|- | |- | ||
|- | |- | ||
Latest revision as of 14:37, 13 July 2026
| Author | Matrix TSL |
| Version | 6.0 |
| Category | Environmental |
Thermocouple (MCP960X) component
Component to interface the MCP960X IC from Microchip. Uses a standard 2-wire I2C interface to connect to the IC and collect the temperature. IC available in different versions to suit different thermocouple types.
Version information
Library Version, Component Version, Date, Author, Info 6.0, 6.0, 02-07-24, MW, As requested By Stefan. Exposed ReadRegister/s, WriteRegister and renamed with underscore. Added Write_N_Registers.
Detailed description
No detailed description exists yet for this component
Examples
Here is a basic example to display both the thermocouple temperature and IC surface temperature.
Sim Demo
Macro reference
Initialise
| Initialise | |
| Configures the I2C bus ready for communications. | |
| Return | |
ReadReference_Float
| ReadReference_Float | |
| Returns the reference (IC die) temperature from the last sample as a floating point. Use Sample first, which samples both reference & themocouple temperatures. | |
| Return | |
ReadReference_Int
| ReadReference_Int | |
| Returns the Reference (IC die) temperature from the last sample as an integer value. Use Sample first, which samples both reference & themocouple temperatures. | |
| Return | |
ReadThermocouple_Float
| ReadThermocouple_Float | |
| Returns the thermocouple temperature from the last sample as a floating point value. Use Sample first, which samples both reference & themocouple temperatures. | |
| Return | |
ReadThermocouple_Int
| ReadThermocouple_Int | |
| Returns the thermocouple temperature from the last sample as an integer value. Use Sample first, which samples both reference & themocouple temperatures. | |
| Return | |
Read_N_Registers
| Read_N_Registers | |
| Reads a number of sequential bytes starting from the specified register | |
| Address | |
| Data | |
| Count | |
| Return | |
Read_Register
| Read_Register | |
| Reads a byte from a register | |
| Address | |
| Return | |
Sample
Write_N_Registers
| Write_N_Registers | |
| Writes a set of data values to a sequential registers on the accelerometer | |
| Start_Reg | |
| Num_Regs | |
| Data | |
| Return | |
Write_Register
| Write_Register | |
| Writes a byte to a register | |
| Address | |
| Data | |
| Return | |
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_ThermocoupleMCP960X.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_ThermocoupleMCP960X.fcfx
