MityDSP Documentation Index

MityDSP::tcDspThermBase Class Reference

The tcDspThermBase class is a virtual base class to provide consistent access to various thermistor devices. More...

#include <core/DspThermBase.h>

Inheritance diagram for MityDSP::tcDspThermBase:
MityDSP::tcDspThermERTJV1G

List of all members.

Public Member Functions

 tcDspThermBase (float anVref, unsigned int anAdcBits, float anFeedbackR, float anBeta)
 This constructor is used to initialize the thermistor base class.
virtual ~tcDspThermBase ()
 Destructor.
virtual void SetSensorVal (unsigned short anVal)
 This routine updates the sensor's current value, and computes the matching temperature.
virtual float GetSensorTemp (void)
 This routine returns a given sensor's current temperature, in deg-C.
virtual void GetThermoParams (float &arT0, float &arRt0, float &arVin)
 This routine returns the current constants in use by the Thermistor derived class.
virtual bool SetThermoParams (float anT0=0.0f, float anRt0=0.0f, float anVin=0.0f)
 This routine may be used to update the constants in use by the Thermistor derived class.

Static Public Attributes

static const int gnKelvinToCentigrade = 273
 Conversion from deg-K to deg-C.

Protected Member Functions

virtual void ComputeTemp (void)=0

Protected Attributes

SEM_Handle mhMutex
 Serial access across threads.
unsigned int mnAdcSteps
 ADC data range.
float mnVReference
 Reference voltage.
float mnFeebackR
 feedback resistor value (ohms)
float mnBeta
 thermistor beta value
unsigned short mnAdcCount
 last-known ADC count
float mnTempDegC
 last computed temperature (deg-C)
float mnT0
 Temperature T0 (in deg-K).
float mnRt0
 Resistance @ T0.
float mnVin
 Thermistor input voltage.

Detailed Description

The tcDspThermBase class is a virtual base class to provide consistent access to various thermistor devices.

It provides functions for converting ADC counts into temperatures and storing the last-known values.

See also:
tcDspThermBase Page

Constructor & Destructor Documentation

tcDspThermBase::tcDspThermBase ( float  anVref,
unsigned int  anAdcBits,
float  anFeedbackR,
float  anBeta 
)

This constructor is used to initialize the thermistor base class.

Parameters:
[in] anVref Reference voltage for the thermistor.
[in] anAdcBits Number of bits returned by ADC.
[in] anFeedbackR Feedback resistor value.
[in] anBeta Thermistor Beta value.
tcDspThermBase::~tcDspThermBase (  )  [virtual]

Destructor.


Member Function Documentation

void tcDspThermBase::SetSensorVal ( unsigned short  anVal  )  [virtual]

This routine updates the sensor's current value, and computes the matching temperature.

Parameters:
[in] anVal Latest ADC value.
Returns:
None.
float tcDspThermBase::GetSensorTemp ( void   )  [virtual]

This routine returns a given sensor's current temperature, in deg-C.

Returns:
Last-known temperature value (deg-C).
void tcDspThermBase::GetThermoParams ( float &  arT0,
float &  arRt0,
float &  arVin 
) [virtual]

This routine returns the current constants in use by the Thermistor derived class.

It is provided mainly for situations where fine tuning of the default parameters may be required.

Parameters:
[in] arT0 Reference to T0 temperature (deg-K)
[in] arRt0 Reference to resistance at T0 (ohms)
[in] arVin Reference to thermistor input voltage (volts)
Returns:
None.
bool tcDspThermBase::SetThermoParams ( float  anT0 = 0.0f,
float  anRt0 = 0.0f,
float  anVin = 0.0f 
) [virtual]

This routine may be used to update the constants in use by the Thermistor derived class.

It is provided mainly for situations where fine tuning of the default parameters may be required.

Note:
Any parameter with a value of zero is not updated.
Parameters:
[in] anT0 New T0 temperature (deg-K)
[in] anRt0 New resistance at T0 (ohms)
[in] anVin New thermistor input voltage (volts)
Returns:
Number of parameters updated.
virtual void MityDSP::tcDspThermBase::ComputeTemp ( void   )  [protected, pure virtual]

Member Data Documentation

Conversion from deg-K to deg-C.

SEM_Handle MityDSP::tcDspThermBase::mhMutex [protected]

Serial access across threads.

unsigned int MityDSP::tcDspThermBase::mnAdcSteps [protected]

ADC data range.

Reference voltage.

feedback resistor value (ohms)

thermistor beta value

unsigned short MityDSP::tcDspThermBase::mnAdcCount [protected]

last-known ADC count

last computed temperature (deg-C)

float MityDSP::tcDspThermBase::mnT0 [protected]

Temperature T0 (in deg-K).

float MityDSP::tcDspThermBase::mnRt0 [protected]

Resistance @ T0.

float MityDSP::tcDspThermBase::mnVin [protected]

Thermistor input voltage.


  
Generated on Fri Sep 23 16:33:56 2011 for MityDSP Core by  Doxygen Version 1.6.1
Copyright © 2009, Critical Link LLC, All rights reserved.