Component: Thermistor Template (Sensors)

From Flowcode Help
Jump to navigationJump to search


Author Matrix
Version 1.0 (Release)
Category Sensors


Image Thermistor Template component

Base component for creating thermistors. Has no GUI - this would be added by concrete examples using this basem which may or may not expose the propertes.

Examples

This example simply reads the value from the thermistor sensor component and outputs the value to an LCD as a temperature in degrees C. FC6 Icon.png EBM003 Example

Downloadable macro reference

GetIntegerTemperature

Reads the ADC input and returns the calculated Temperature as Integer degrees C

Parameters

This macro has no parameters


Return value

INT


GetRealTemperature

Reads the ADC input and Returns the calculated Temperature as Float value in degrees C

Parameters

This macro has no parameters


Return value

FLOAT


CalculateTemperature

Converts the input ADC value and returns the Temperature in tenths of degree C

Parameters

UINT ADCValue
ADC Reading to be converted


Return value

INT


GetADCValue

Returns the Raw ADC value from the Analogue Channel

Parameters

This macro has no parameters


Return value

UINT


Simulation macro reference

SetChannel

Set the ADC Channel

Parameters

INT ChannelID


Return value

This call does not return a value


SetTemperature

Simulation macro that sets the internal ADC value to the appropriate value for a given temperature. This allows all internal systems of the sensor to be simulated.

Parameters

FLOAT Temperature
The temperature in C - restricted to -25 to +125 range


Return value

This call does not return a value



Property reference

ADC Channel

This property is of type Single analog pin and can be referenced with the variable name CHANNEL.

The ADC channel to which the thermistor circuit is connected.

It is assumed that the thermistor is connected between the ADC pin and 0V, with a fixed resistor connected

between the ADC pin and +V.

Wiring

This property is of type Fixed list of ints and can be referenced with the variable name Wiring.

Specifies the arrangement of the Thermistor and Fixed Resistor.


Pull Down - Thermistor connected between ADC pin and GND, fixed resistor between ADC pin and VCC.

Pull Up - Thermistor connected between ADC pin and VCC, fixed resistor between ADC pin and GND.

ADC Bit Resolution

This property is of type Unsigned integer and can be referenced with the variable name ADC_BITS.

No additional information


Resistor Value

This property is of type Unsigned integer and can be referenced with the variable name RESISTOR.

Value in Ohms of the pullup series resistor. i.e. The resistor is connected between the ADC pin and the

positive supply rail.

-25C Thermistor Value

This property is of type Unsigned integer and can be referenced with the variable name M25.

Value in Ohms of the Thermistor at -25 deg C

0C Thermistor Value

This property is of type Unsigned integer and can be referenced with the variable name P0.

Value in Ohms of the Thermistor at 0 deg C

25C Thermistor Value

This property is of type Unsigned integer and can be referenced with the variable name P25.

Value in Ohms of the Thermistor at 25 deg C

50C Thermistor Value

This property is of type Unsigned integer and can be referenced with the variable name P50.

Value in Ohms of the Thermistor at 50 deg C

75C Thermistor Value

This property is of type Unsigned integer and can be referenced with the variable name P75.

Value in Ohms of the Thermistor at 75 deg C

100C Thermistor Value

This property is of type Unsigned integer and can be referenced with the variable name P100.

Value in Ohms of the Thermistor at 100 deg C

125C Thermistor Value

This property is of type Unsigned integer and can be referenced with the variable name P125.

Value in Ohms of the Thermistor at 125 deg C