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(__FILE__, __LINE__, warning, 
                            "Temperature reading unavailable.");
     }

     ...
 } 

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