Jump to content

Component: Thermocouple (MCP960X) (Environmental)

From Flowcode Help
Revision as of 15:25, 20 January 2023 by Wiki bot (talk | contribs)
Author Matrix TSL
Version 1.1
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.

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

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.

MCP960X Demo

Sim Demo

Macro reference

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. 
- INT Return


ReadRawDataADC
Returns the thermocouple temperature from the last sample as an integer value in Degrees C. 
- LONG Return


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. 
- FLOAT Return


Sample
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. 
- BYTE Return


ReadThermocouple_Int
Returns the thermocouple temperature from the last sample as an integer value. Use Sample first, which samples both reference & themocouple temperatures. 
- INT Return


ReadThermocouple_Float
Returns the thermocouple temperature from the last sample as a floating point value. Use Sample first, which samples both reference & themocouple temperatures. 
- FLOAT Return


Initialise
Configures the I2C bus ready for communications. 
- VOID Return



Property reference

Properties
Thermocouple Properties
Thermocouple Type
Thermocouple type. Selects which type of thermocouple the IC works with. 
Filter Coefficients
Digitial filter selection. The higher the number the better the filter. Results more stable but take longer to update.  
Unit
Select Temperature results to be celsius or fahrenheit  
I2C Properties
Address
Address ranges 0x60 - 0x67 (96 - 103) 
Channel
Channel selection 
SDA
Pin used for SDA (data signal) 
SCL
Pin used for SCL (clock signal) 
Simulation
Simulate Comms
 

==Macro reference==

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. 
- INT Return


ReadRawDataADC
Returns the thermocouple temperature from the last sample as an integer value in Degrees C. 
- LONG Return


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. 
- FLOAT Return


Sample
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. 
- BYTE Return


ReadThermocouple_Int
Returns the thermocouple temperature from the last sample as an integer value. Use Sample first, which samples both reference & themocouple temperatures. 
- INT Return


ReadThermocouple_Float
Returns the thermocouple temperature from the last sample as a floating point value. Use Sample first, which samples both reference & themocouple temperatures. 
- FLOAT Return


Initialise
Configures the I2C bus ready for communications. 
- VOID Return



Property reference

Properties
Thermocouple Properties
Thermocouple Type
Thermocouple type. Selects which type of thermocouple the IC works with. 
Filter Coefficients
Digitial filter selection. The higher the number the better the filter. Results more stable but take longer to update.  
Unit
Select Temperature results to be celsius or fahrenheit  
I2C Properties
Address
Address ranges 0x60 - 0x67 (96 - 103) 
Channel
Channel selection 
SDA
Pin used for SDA (data signal) 
SCL
Pin used for SCL (clock signal) 
Simulation
Simulate Comms
 

==Macro reference==

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. 
- INT Return


ReadRawDataADC
Returns the thermocouple temperature from the last sample as an integer value in Degrees C. 
- LONG Return


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. 
- FLOAT Return


Sample
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. 
- BYTE Return


ReadThermocouple_Int
Returns the thermocouple temperature from the last sample as an integer value. Use Sample first, which samples both reference & themocouple temperatures. 
- INT Return


ReadThermocouple_Float
Returns the thermocouple temperature from the last sample as a floating point value. Use Sample first, which samples both reference & themocouple temperatures. 
- FLOAT Return


Initialise
Configures the I2C bus ready for communications. 
- VOID Return



Property reference

Properties
Thermocouple Properties
Thermocouple Type
Thermocouple type. Selects which type of thermocouple the IC works with. 
Filter Coefficients
Digitial filter selection. The higher the number the better the filter. Results more stable but take longer to update.  
Unit
Select Temperature results to be celsius or fahrenheit  
I2C Properties
Address
Address ranges 0x60 - 0x67 (96 - 103) 
Channel
Channel selection 
SDA
Pin used for SDA (data signal) 
SCL
Pin used for SCL (clock signal) 
Simulation
Simulate Comms