tmp75.h File Reference

Routines to access TMP75 temperature sensor. More...

#include "pic_utils.h"
#include "i2c.h"
Include dependency graph for tmp75.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define TMP75_CONF_F0   3
#define TMP75_CONF_F1   4
#define TMP75_CONF_OS   7
#define TMP75_CONF_POL   2
#define TMP75_CONF_R0   5
#define TMP75_CONF_R1   6
#define TMP75_CONF_SD   0
#define TMP75_CONF_TM   1
#define TMP75_CONFIG_REGISTER   0b00000001
#define tmp75_setup()   tmp75_setup_io()
 Setup tmp75 ports and pins.
#define TMP75_TEMP_REGISTER   0b00000000
#define TMP75_THI_REGISTER   0b00000011
#define TMP75_TLOW_REGISTER   0b00000010

Functions

void tmp75_convert_temp (uns8 addr)
 Start temperature conversion on tmp75.
uns8 tmp75_get_config (uns8 addr)
 Get tmp75 config register.
uns16 tmp75_get_temp (uns8 addr)
 Read temperature from tmp75.
void tmp75_set_config (uns8 addr, uns8 config)
 Set tmp75 config register.
void tmp75_setup_io (void)

Detailed Description

Put the following in your config.h

// - - - - - - - - - - - - - - - - - - - - 
// TMP75 defines
// - - - - - - - - - - - - - - - - - - - - 

#define TMP75_ADDR  0x00

Definition in file tmp75.h.


Define Documentation

#define TMP75_CONF_F0   3

Definition at line 62 of file tmp75.h.

#define TMP75_CONF_F1   4

Definition at line 61 of file tmp75.h.

#define TMP75_CONF_OS   7

Definition at line 58 of file tmp75.h.

#define TMP75_CONF_POL   2

Definition at line 63 of file tmp75.h.

#define TMP75_CONF_R0   5

Definition at line 60 of file tmp75.h.

#define TMP75_CONF_R1   6

Definition at line 59 of file tmp75.h.

#define TMP75_CONF_SD   0

Definition at line 65 of file tmp75.h.

#define TMP75_CONF_TM   1

Definition at line 64 of file tmp75.h.

#define TMP75_CONFIG_REGISTER   0b00000001

Definition at line 54 of file tmp75.h.

Referenced by tmp75_get_config(), and tmp75_set_config().

 
#define tmp75_setup (  )     tmp75_setup_io()

Definition at line 74 of file tmp75.h.

#define TMP75_TEMP_REGISTER   0b00000000

Definition at line 53 of file tmp75.h.

Referenced by tmp75_get_temp().

#define TMP75_THI_REGISTER   0b00000011

Definition at line 56 of file tmp75.h.

#define TMP75_TLOW_REGISTER   0b00000010

Definition at line 55 of file tmp75.h.


Function Documentation

void tmp75_convert_temp ( uns8  addr  ) 

This routine starts the temperature conversion in the tmp75. Issue this command before actually reading the temperature.

needs fixing

Definition at line 107 of file tmp75.c.

uns8 tmp75_get_config ( uns8  addr  ) 

Gets the tmp75 config register (memory location 0x01)

Definition at line 102 of file tmp75.c.

References TMP75_CONFIG_REGISTER, and tmp75_read().

Here is the call graph for this function:

uns16 tmp75_get_temp ( uns8  addr  ) 

Returns 16bit raw temperature register from tmp75.

Definition at line 115 of file tmp75.c.

References tmp75_read_16bit(), and TMP75_TEMP_REGISTER.

Here is the call graph for this function:

void tmp75_set_config ( uns8  addr,
uns8  config 
)

Sets the tmp75 config register

Definition at line 97 of file tmp75.c.

References TMP75_CONFIG_REGISTER, and tmp75_write().

Here is the call graph for this function:

void tmp75_setup_io ( void   ) 

Generated on Wed Dec 8 13:47:52 2010 for Pic Pack by  doxygen 1.6.1