Zigbee Module Examples

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures
hal_TI_TMP006_IR_temperature_sensor.h File Reference

Hardware Abstraction Layer (HAL) file for TMP006. More...

`#include <stdint.h>`

## Data Structures
struct | TempReading
#define | TMP006_I2C_ADDRESS 0x40
#define | TMP006_P_VOBJ 0x00
#define | TMP006_P_TABT 0x01
#define | TMP006_P_WRITE_REG 0x02
#define | TMP006_P_MAN_ID 0xFE
#define | TMP006_P_DEVICE_ID 0xFF
#define | TMP006_RST 0x8000
#define | TMP006_POWER_DOWN 0x0000
#define | TMP006_POWER_UP 0x7000
#define | TMP006_CR_4 0x0000
#define | TMP006_CR_2 0x0200
#define | TMP006_CR_1 0x0400
#define | TMP006_CR_0_5 0x0600
#define | TMP006_CR_0_25 0x0800
#define | TMP006_EN 0x0100
#define | TMP006_DRDY 0x0080
void | tmp006Init ()
void | tmp006GetTemperature (struct TempReading *tempRead)

## Detailed Description

Hardware Abstraction Layer (HAL) file for TMP006.

Rev:
  1642

Author:
  dsmith

Date:
  2012-10-31 11:17:04 -0700 (Wed, 31 Oct 2012)

# Support

Please refer to the wiki at www.anaren.com/air-wiki-zigbee for more information. Additional support is available via email at the following addresses:

- Questions on how to use the product: AIR@a.nosp@m.nare.nosp@m.n.com
- Feature requests, comments, and improvements: featu.nosp@m.rere.nosp@m.quest.nosp@m.s@te.nosp@m.slaco.nosp@m.ntro.nosp@m.ls.co.nosp@m.m
- Consulting engagements: sales.nosp@m.@tes.nosp@m.lacon.nosp@m.trol.nosp@m.s.com

# License

Copyright (c) 2012 Anaren Microwave. All rights reserved. This Software may only be used with an Anaren A2530E24AZ1, A2530E24CZ1, A2530R24AZ1, or A2530R24CZ1 module. Redistribution and use in source and binary forms, with or without modification, are subject to the Software License Agreement in the file "anaren_eula.txt"

YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL ANAREN MICROWAVE OR TESLA CONTROLS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSE INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.

Rev:
  1528

Author:
  dsmith

Date:
  2012-08-30 15:58:08 -0700 (Thu, 30 Aug 2012)

# Support

Please refer to the wiki at www.anaren.com/air-wiki-zigbee for more information. Additional support is available via email at the following addresses:

- Questions on how to use the product: AIR@a.nosp@m.nare.nosp@m.n.com
- Feature requests, comments, and improvements: featu.nosp@m.rere.nosp@m.quest.nosp@m.s@te.nosp@m.slaco.nosp@m.ntro.nosp@m.ls.co.nosp@m.m
- Consulting engagements: sales.nosp@m.@tes.nosp@m.lacon.nosp@m.trol.nosp@m.s.com

# License

Copyright (c) 2012 Anaren Microwave. All rights reserved. This Software may only be used with an Anaren A2530E24AZ1, A2530E24CZ1, A2530R24AZ1, or A2530R24CZ1 module. Redistribution and use in source and binary forms, with or without modification, are subject to the Software License Agreement in the file "anaren_eula.txt"

YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL ANAREN MICROWAVE OR TESLA CONTROLS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSE INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.

## Macro Definition Documentation

#define TMP006_CR_0_25 0x0800

Conversion rate of 0.25 per sec; 16 avg

#define TMP006_CR_0_5 0x0600

Conversion rate of 0.5 per sec; 8 avg

#define TMP006_CR_1 0x0400

Conversion rate of 1 per sec; 4 avg

#define TMP006_CR_2 0x0200

Conversion rate of 2 per sec; 2 avg

#define TMP006_CR_4 0x0000

Conversion rate of 4 per sec; 1 avg

#define TMP006_P_DEVICE_ID 0xFF

TMP006 device ID register pointer

#define TMP006_P_MAN_ID 0xFE

TMP006 manufacturer ID register pointer

#define TMP006_P_TABT 0x01

TMP006 ambient temperature register pointer

#define TMP006_P_VOBJ 0x00

TMP006 object voltage register pointer

#define TMP006_P_WRITE_REG 0x02

TMP006 configuration register pointer

#define TMP006_POWER_DOWN 0x0000

TMP006 Configuration Register Bit - Power Down

#define TMP006_POWER_UP 0x7000

TMP006 Configuration Register Bit - Power Up

#define TMP006_RST 0x8000

TMP006 Configuration Register Bit - Reset

## Function Documentation

void tmp006GetTemperature | ( | struct TempReading * | tempRead | ) |

Function to calulate and return the temperature and raw values from TMP006 sensor with transient correction. Also initializes the I2C bus with the TMP006's slave address.

Precondition:
  I2C bus has been properly initialized

Returns:
  TempReading structure containing the temperature values read and converted from the TMP006.

void tmp006Init | ( |  | ) |

Configures the TMP006 Sensor over I2C.

Precondition:
  I2C interface on microcontroller was configured correctly

Note:
  Part maximum baud rate 400kHz for I2C.
  On powerup, the sensor is powered down and needs to be turned on before use.
  Manufacturer register should be 0x5449, and control register should be 0x0067