Looking for a working code for SHT11 or SHT75 with Pic

Status
Not open for further replies.

crocu

Junior Member level 3
Joined
Oct 16, 2008
Messages
29
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Location
FRANCE
Activity points
1,471
Hello

I've read many posts in the forum but i did not found a fully working code for Pic that will display on a LCD temperature, humidity and dew point

Has someone already succeeded to do this ?


I've found some part of code written with CSS, but forum users found temperatures read errors with it.

If someone would share a working code here, i will really appreciate it.
Any code language will be fine with me,

Many thanks for your help,
 

Thank you anotherbrick , but i'm looking only for C18 or CSS codes.
 

Hi,

Attached is a sample code of SHT11 for PIC or similar MCU's. Manufacturer's code was modified to use port direction registers.

Selcuk
 
good day selcukm,
i've download your attachment and i cen see that in sht11.h, its include "main.h".
may i know where is the main.h file

TQVM
 

In main.h there are type definitions:

typedef unsigned char BYTE ;
typedef unsigned int WORD ;
typedef unsigned long DWORD ;
typedef signed char SBYTE ;
typedef signed int SWORD ;
typedef signed long SDWORD ;

Also, please use your mcu's port variables while defining below tags:

DATA_OUT
DATA_IN
SCK
TRIS_DATA

Use your mcu's timer functions to increase periodically TickCount variable, i.e. in every 20ms. Set below constants for your timing requirements:

#define TICK_PERIOD
#define TEMP_PERIOD

Selcuk
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…