|
|
(5 intermediate revisions by the same user not shown) |
Line 22: |
Line 22: |
| | | |
| ==Detailed description== | | ==Detailed description== |
| + | |
| + | |
| | | |
| | | |
Line 38: |
Line 40: |
| | | |
| ==Examples== | | ==Examples== |
| + | |
| + | |
| | | |
| | | |
Line 55: |
Line 59: |
| {{Fcfile|EBM003 - Test Program.fcfx|EBM003 Example}} | | {{Fcfile|EBM003 - Test Program.fcfx|EBM003 Example}} |
| | | |
− | ==Macro reference==
| |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetIntegerTemperature'''
| |
− | |-
| |
− | | colspan="2" | Reads the ADC input and returns the calculated Temperature as Integer degrees C
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
| | | |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetChannel'''
| |
− | |-
| |
− | | colspan="2" | Set the ADC Channel
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| |
− | | width="90%" | ChannelID
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
| | | |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRealTemperature'''
| |
− | |-
| |
− | | colspan="2" | Reads the ADC input and Returns the calculated Temperature as Float value in degrees C
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
| | | |
| | | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | ==Macro reference== |
| + | |
| + | ===CalculateTemperature=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
Line 119: |
Line 92: |
| | | |
| | | |
| + | ===GetADCValue=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
Line 132: |
Line 106: |
| | | |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| + | ===GetIntegerTemperature=== |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTemperature'''
| |
− | |-
| |
− | | colspan="2" | 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.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
− | | width="90%" | Temperature
| |
− | |-
| |
− | | colspan="2" | The temperature in C - restricted to -25 to +125 range
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− | | |
− | | |
− | | |
− | | |
− | ==Property reference==
| |
− | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-6-icon.png]]
| |
− | | width="90%" | ADC Channel
| |
− | |-
| |
− | | colspan="2" | 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.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | Wiring
| |
− | |-
| |
− | | colspan="2" | 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.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | ADC Bit Resolution
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | Resistor Value
| |
− | |-
| |
− | | colspan="2" | Value in Ohms of the pullup series resistor. i.e. The resistor is connected between the ADC pin and the positive supply rail.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | -25C Thermistor Value
| |
− | |-
| |
− | | colspan="2" | Value in Ohms of the Thermistor at -25 deg C
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | 0C Thermistor Value
| |
− | |-
| |
− | | colspan="2" | Value in Ohms of the Thermistor at 0 deg C
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | 25C Thermistor Value
| |
− | |-
| |
− | | colspan="2" | Value in Ohms of the Thermistor at 25 deg C
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | 50C Thermistor Value
| |
− | |-
| |
− | | colspan="2" | Value in Ohms of the Thermistor at 50 deg C
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | 75C Thermistor Value
| |
− | |-
| |
− | | colspan="2" | Value in Ohms of the Thermistor at 75 deg C
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | 100C Thermistor Value
| |
− | |-
| |
− | | colspan="2" | Value in Ohms of the Thermistor at 100 deg C
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | 125C Thermistor Value
| |
− | |-
| |
− | | colspan="2" | Value in Ohms of the Thermistor at 125 deg C
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | Conversion speed
| |
− | |-
| |
− | | colspan="2" | Clock setting to select how fast the ADC peripheral will perform an ADC conversion. The FRC setting is based on a RC time base and so will vary with temperature and pressure. Other settings are generally based on divisions of the master clock.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| |
− | | width="90%" | Acquisition cycles
| |
− | |-
| |
− | | colspan="2" | Number of micro seconds to wait for the ADC input to charge before starting the analogue sample.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | VRef option
| |
− | |-
| |
− | | colspan="2" | Defines what is used as the ADC maximum reference. ADC Range = GND to VRef Voltage VDD - Defines the microcontrollers power supply pin as the max reference, VREF+ Pin - Dedicated pin on the microcontroller to allow for a variable reference voltage.
| |
− | |}==Macro reference==
| |
− | | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
Line 244: |
Line 120: |
| | | |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| + | ===GetRealTemperature=== |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetChannel'''
| |
− | |-
| |
− | | colspan="2" | Set the ADC Channel
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| |
− | | width="90%" | ChannelID
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− | | |
− | | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
Line 275: |
Line 134: |
| | | |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| + | ===SetChannel=== |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CalculateTemperature'''
| |
− | |-
| |
− | | colspan="2" | Converts the input ADC value and returns the Temperature in tenths of degree C
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" | ADCValue
| |
− | |-
| |
− | | colspan="2" | ADC Reading to be converted
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− | | |
− | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetADCValue'''
| |
− | |-
| |
− | | colspan="2" | Returns the Raw ADC value from the Analogue Channel
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− | | |
− | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTemperature'''
| |
− | |-
| |
− | | colspan="2" | 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.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
− | | width="90%" | Temperature
| |
− | |-
| |
− | | colspan="2" | The temperature in C - restricted to -25 to +125 range
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− | | |
− | | |
− | | |
− | | |
− | ==Property reference==
| |
− | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-6-icon.png]]
| |
− | | width="90%" | ADC Channel
| |
− | |-
| |
− | | colspan="2" | 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.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | Wiring
| |
− | |-
| |
− | | colspan="2" | 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.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | ADC Bit Resolution
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | Resistor Value
| |
− | |-
| |
− | | colspan="2" | Value in Ohms of the pullup series resistor. i.e. The resistor is connected between the ADC pin and the positive supply rail.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | -25C Thermistor Value
| |
− | |-
| |
− | | colspan="2" | Value in Ohms of the Thermistor at -25 deg C
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | 0C Thermistor Value
| |
− | |-
| |
− | | colspan="2" | Value in Ohms of the Thermistor at 0 deg C
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | 25C Thermistor Value
| |
− | |-
| |
− | | colspan="2" | Value in Ohms of the Thermistor at 25 deg C
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | 50C Thermistor Value
| |
− | |-
| |
− | | colspan="2" | Value in Ohms of the Thermistor at 50 deg C
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | 75C Thermistor Value
| |
− | |-
| |
− | | colspan="2" | Value in Ohms of the Thermistor at 75 deg C
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | 100C Thermistor Value
| |
− | |-
| |
− | | colspan="2" | Value in Ohms of the Thermistor at 100 deg C
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | 125C Thermistor Value
| |
− | |-
| |
− | | colspan="2" | Value in Ohms of the Thermistor at 125 deg C
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | Conversion speed
| |
− | |-
| |
− | | colspan="2" | Clock setting to select how fast the ADC peripheral will perform an ADC conversion. The FRC setting is based on a RC time base and so will vary with temperature and pressure. Other settings are generally based on divisions of the master clock.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| |
− | | width="90%" | Acquisition cycles
| |
− | |-
| |
− | | colspan="2" | Number of micro seconds to wait for the ADC input to charge before starting the analogue sample.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | VRef option
| |
− | |-
| |
− | | colspan="2" | Defines what is used as the ADC maximum reference. ADC Range = GND to VRef Voltage VDD - Defines the microcontrollers power supply pin as the max reference, VREF+ Pin - Dedicated pin on the microcontroller to allow for a variable reference voltage.
| |
− | |}==Macro reference==
| |
− | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetIntegerTemperature'''
| |
− | |-
| |
− | | colspan="2" | Reads the ADC input and returns the calculated Temperature as Integer degrees C
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− | | |
− | | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
Line 436: |
Line 153: |
| | | |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| + | ===SetTemperature=== |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRealTemperature'''
| |
− | |-
| |
− | | colspan="2" | Reads the ADC input and Returns the calculated Temperature as Float value in degrees C
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− | | |
− | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CalculateTemperature'''
| |
− | |-
| |
− | | colspan="2" | Converts the input ADC value and returns the Temperature in tenths of degree C
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" | ADCValue
| |
− | |-
| |
− | | colspan="2" | ADC Reading to be converted
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− | | |
− | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetADCValue'''
| |
− | |-
| |
− | | colspan="2" | Returns the Raw ADC value from the Analogue Channel
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− | | |
− | | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
Line 496: |
Line 170: |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
− |
| |
− |
| |
| | | |
| | | |
Line 511: |
Line 183: |
| | width="90%" | ADC Channel | | | width="90%" | ADC Channel |
| |- | | |- |
− | | colspan="2" | 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. | + | | colspan="2" | Analogue Input Channel - Which pin is the analogue input connected to? |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | Wiring
| |
− | |-
| |
− | | colspan="2" | 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.
| |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] |
Line 523: |
Line 190: |
| | colspan="2" | | | | colspan="2" | |
| |- | | |- |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] |
− | | width="90%" | Resistor Value | + | | width="90%" | VRef option |
| |- | | |- |
− | | colspan="2" | Value in Ohms of the pullup series resistor. i.e. The resistor is connected between the ADC pin and the positive supply rail. | + | | colspan="2" | Defines what is used as the ADC maximum reference. ADC Range = GND to VRef Voltage VDD - Defines the microcontrollers power supply pin as the max reference, VREF+ Pin - Dedicated pin on the microcontroller to allow for a variable reference voltage. |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | -25C Thermistor Value
| |
− | |-
| |
− | | colspan="2" | Value in Ohms of the Thermistor at -25 deg C
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | 0C Thermistor Value
| |
− | |-
| |
− | | colspan="2" | Value in Ohms of the Thermistor at 0 deg C
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | 25C Thermistor Value
| |
− | |-
| |
− | | colspan="2" | Value in Ohms of the Thermistor at 25 deg C
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | 50C Thermistor Value
| |
− | |-
| |
− | | colspan="2" | Value in Ohms of the Thermistor at 50 deg C
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | 75C Thermistor Value
| |
− | |-
| |
− | | colspan="2" | Value in Ohms of the Thermistor at 75 deg C
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | 100C Thermistor Value
| |
− | |-
| |
− | | colspan="2" | Value in Ohms of the Thermistor at 100 deg C
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | 125C Thermistor Value
| |
− | |-
| |
− | | colspan="2" | Value in Ohms of the Thermistor at 125 deg C
| |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] |
Line 572: |
Line 204: |
| |- | | |- |
| | colspan="2" | Number of micro seconds to wait for the ADC input to charge before starting the analogue sample. | | | colspan="2" | Number of micro seconds to wait for the ADC input to charge before starting the analogue sample. |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | VRef option
| |
− | |-
| |
− | | colspan="2" | Defines what is used as the ADC maximum reference. ADC Range = GND to VRef Voltage VDD - Defines the microcontrollers power supply pin as the max reference, VREF+ Pin - Dedicated pin on the microcontroller to allow for a variable reference voltage.
| |
− | |}==Macro reference==
| |
− |
| |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetIntegerTemperature'''
| |
− | |-
| |
− | | colspan="2" | Reads the ADC input and returns the calculated Temperature as Integer degrees C
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− |
| |
− |
| |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetChannel'''
| |
− | |-
| |
− | | colspan="2" | Set the ADC Channel
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| |
− | | width="90%" | ChannelID
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− |
| |
− |
| |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRealTemperature'''
| |
− | |-
| |
− | | colspan="2" | Reads the ADC input and Returns the calculated Temperature as Float value in degrees C
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− |
| |
− |
| |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CalculateTemperature'''
| |
− | |-
| |
− | | colspan="2" | Converts the input ADC value and returns the Temperature in tenths of degree C
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" | ADCValue
| |
− | |-
| |
− | | colspan="2" | ADC Reading to be converted
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− |
| |
− |
| |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetADCValue'''
| |
− | |-
| |
− | | colspan="2" | Returns the Raw ADC value from the Analogue Channel
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− |
| |
− |
| |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTemperature'''
| |
− | |-
| |
− | | colspan="2" | 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.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
− | | width="90%" | Temperature
| |
− | |-
| |
− | | colspan="2" | The temperature in C - restricted to -25 to +125 range
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− |
| |
− |
| |
− |
| |
− |
| |
− | ==Property reference==
| |
− |
| |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-6-icon.png]]
| |
− | | width="90%" | ADC Channel
| |
− | |-
| |
− | | colspan="2" | 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.
| |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] |
Line 691: |
Line 209: |
| |- | | |- |
| | colspan="2" | 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. | | | colspan="2" | 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. |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | ADC Bit Resolution
| |
− | |-
| |
− | | colspan="2" |
| |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] |
Line 736: |
Line 249: |
| |- | | |- |
| | colspan="2" | Value in Ohms of the Thermistor at 125 deg C | | | colspan="2" | Value in Ohms of the Thermistor at 125 deg C |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | Conversion speed
| |
− | |-
| |
− | | colspan="2" | Clock setting to select how fast the ADC peripheral will perform an ADC conversion. The FRC setting is based on a RC time base and so will vary with temperature and pressure. Other settings are generally based on divisions of the master clock.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| |
− | | width="90%" | Acquisition cycles
| |
− | |-
| |
− | | colspan="2" | Number of micro seconds to wait for the ADC input to charge before starting the analogue sample.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | VRef option
| |
− | |-
| |
− | | colspan="2" | Defines what is used as the ADC maximum reference. ADC Range = GND to VRef Voltage VDD - Defines the microcontrollers power supply pin as the max reference, VREF+ Pin - Dedicated pin on the microcontroller to allow for a variable reference voltage.
| |
| |} | | |} |