MODBUS laajempi esimerkki
sht11.h File Reference

Header file for sht11.c. More...

#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/wdt.h>
#include <math.h>
#include <stdio.h>
#include <compat/deprecated.h>
Include dependency graph for sht11.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SCK_YLOS   SENSOR_PORT |= (1<<SENSOR_CLK)
 
#define SCK_ALAS   SENSOR_PORT &= ~(1<<SENSOR_CLK)
 
#define DATA_ALAS   SENSOR_PORT &=~( 1<<(anturi) ) /* PORTA Set bit to 0 */
 
#define DATA_YLOS   SENSOR_PORT |= ( 1<<(anturi) ) /* PORTA Set bit to 1 */
 
#define MAX_ANTURI   NRO_OF_SENSORS+1 /** @warning This is set to 5 because of the I/O reading (Bit 0 is SENSOR_CLK, must use bits 1...4). The true number of sensors is currently 4 */
 
#define SENSOR_TIMER   0x96 /** Changed 17.3.2010, Previous value 0x9B */
 
#define TIMER_DIVIDER   0x02 /** This value is used to set TIMER/Counter Prescaler to 8 */
 

Functions

void wait (uint16_t time)
 Basic wait. More...
 
void humiandtemp (void)
 Communicates with the SHT75 sensors. Retrieves the measurement values from sensors. More...
 

Detailed Description

Header file for sht11.c.


Revision
160
Author
juma@.nosp@m.PUV..nosp@m.FI
Log
sht11.h,v

Revision 1.2 2009/08/07 08:50:01 juma

Revision 1.1 2009/08/06 07:43:00 e0700008

Macro Definition Documentation

#define DATA_ALAS   SENSOR_PORT &=~( 1<<(anturi) ) /* PORTA Set bit to 0 */
#define DATA_YLOS   SENSOR_PORT |= ( 1<<(anturi) ) /* PORTA Set bit to 1 */
#define MAX_ANTURI   NRO_OF_SENSORS+1 /** @warning This is set to 5 because of the I/O reading (Bit 0 is SENSOR_CLK, must use bits 1...4). The true number of sensors is currently 4 */
#define SCK_ALAS   SENSOR_PORT &= ~(1<<SENSOR_CLK)
#define SCK_YLOS   SENSOR_PORT |= (1<<SENSOR_CLK)
#define SENSOR_TIMER   0x96 /** Changed 17.3.2010, Previous value 0x9B */
#define TIMER_DIVIDER   0x02 /** This value is used to set TIMER/Counter Prescaler to 8 */

Function Documentation

void humiandtemp ( void  )

Communicates with the SHT75 sensors. Retrieves the measurement values from sensors.


Warning
Do not change TCNT0 Register value. If changed, sensors may not work.
Todo:
Why is this set to 0??

Here is the caller graph for this function:

void wait ( uint16_t  time)

Basic wait.


Parameters
timeTime to wait in milliseconds.