MityDSP Documentation Index
tcDspTmp0506

Introduction

The tcDspTmp0506 class is used to obtain temperature readings from a TMP05 or TMP06 device. Up to 8 previous readings are averaged to obtain a temperature (provided in deg-C).

This class uses the generic RAM Block interface to the firmware.

See also:
MityDSP::tcDspTmp0506 Class Reference
MityDSP::tcDspRamBlock Class Reference

Example

This is a simple example of tcDspTmp0506 creation and usage:

{
float temp_degC;
unsigned int myAddress = 0xB0000400;
tcDspTmp0506 *myTemp;
// Create a tcDspTmp0506 object
myTemp = new tcDspTmp0506((void *)myAddress);
...
// Read current temperature
temp_degC = myTemp.getTemperature();
// Check validity and continue
if (temp_degC < -900.0f)
{
tcDspError::report(<strong>FILE</strong>, <strong>LINE</strong>, warning,
"Temperature reading unavailable.");
}
...
}

  
Generated on Mon Apr 22 2013 11:33:02 for MityDSP Core by  Doxygen Version 1.8.1.1
Copyright © 2009, Critical Link LLC, All rights reserved.