| Author |
Message |
HN
Joined: 15 Jun 2002 Posts: 40
|
|
| Back to top |
|
 |
HN
Joined: 15 Jun 2002 Posts: 40
|
03 Feb 2003 3:26 sht11 bascom |
|
|
|
|
8) STH11 Datasheet
Here!
|
|
| Back to top |
|
 |
Dspnut
Joined: 18 Jul 2002 Posts: 171 Helped: 4
|
03 Feb 2003 8:30 sht11 code |
|
|
|
|
For those whose preferred choice of MCU is MCS51,
Here is (K*E*I*L) c-code for interfacing the SHT11 temp-humid sensor to the MCS51 (in this case the 89C51RD2 + 11.0592 MHz (Speed x2)). The detail how to connect the SHT11 to the 89C51RD2 is explained in the source code.
|
|
| Back to top |
|
 |
asena
Joined: 23 Jan 2003 Posts: 73 Helped: 3 Location: Portugal
|
03 Feb 2003 11:19 sht11 picbasic |
|
|
|
|
This is great thanks!
Do you think you could share the PIC code with us?
I would like to build one my self, and add more functions !!
thanks and regards
asena
|
|
| Back to top |
|
 |
Dspnut
Joined: 18 Jul 2002 Posts: 171 Helped: 4
|
03 Feb 2003 11:40 sht11 asm |
|
|
|
|
After some web surfing,
Here is a link describing how to interface a SHT11 sensor to an AVR mcu. The source code is written in Basic (BASCOM-AVR). I cann't find the PIC code (sorry asena ).
http://www.mcselec.com/an_116.htm
You may add more features and functions to this source code...
|
|
| Back to top |
|
 |
asena
Joined: 23 Jan 2003 Posts: 73 Helped: 3 Location: Portugal
|
03 Feb 2003 13:07 sht11 c code |
|
|
|
|
Thanks anyway!
I'll write the code myself, and then i'll post it here!
Lets wait for HN, he may have the PIC source!
regards
asena
|
|
| Back to top |
|
 |
cancel
Joined: 27 May 2001 Posts: 286 Helped: 11
|
03 Feb 2003 13:59 sht11 atmega |
|
|
|
|
hi ...
can you tell me about availability of this sensor. I am using dallas 1820 and no problems so far .. whats the benefit of this solution ??
regards
cancel
|
|
| Back to top |
|
 |
Nick C.
Joined: 20 Dec 2002 Posts: 184 Helped: 4
|
03 Feb 2003 14:27 sht11 i2c |
|
|
|
|
| cancel wrote: |
I am using dallas 1820 and no problems so far .. whats the benefit of this solution ??
regards
cancel |
Temperature and humidity sensing in one part.
|
|
| Back to top |
|
 |
asena
Joined: 23 Jan 2003 Posts: 73 Helped: 3 Location: Portugal
|
03 Feb 2003 22:17 pic sht11 |
|
|
|
|
cancel,
go to the manufacturer website, and ask for a sample.
They'll send it to you.
www.sensirion.com
regards
asena
|
|
| Back to top |
|
 |
challenger
Joined: 02 Feb 2003 Posts: 27
|
19 Jun 2003 19:18 sht11 pic code |
|
|
|
|
Has any body written Picbasic code they can share for this sensor yet?
I dont know what communications protocall to use with this sensor.
I2C doesnt work.
If you can help me please send on to me .
rgds
challenger
|
|
| Back to top |
|
 |
Kripton2035
Joined: 19 Jul 2001 Posts: 587 Helped: 20 Location: Earth
|
26 Jun 2003 15:07 sht11 sensor |
|
|
|
|
| challenger wrote: |
Has any body written Picbasic code they can share for this sensor yet?
I dont know what communications protocall to use with this sensor.
I2C doesnt work.
r |
here is some picbasic code for the sht11
only to read humidity (temp doesnt interest me for now...) the protocol is NOT I2C, but something like. you have to emulate yourself this pseudo i2c- see the picbasic code below
mysda var PORTC.6
myscl var PORTC.7
hread con %00000101 ' lecture humiditÈ sur sht11
humid var word
humidchk var byte
h1 var word
h2 var word
h3 var word
sht11_init: ' initialisation du sht11
Output mysda
Output myscl
High mysda
Low myscl
For i=1 to 10
High myscl
Pause 1
Low myscl
Pause 1
Next i
Call sht11_ts
return
sht11_ts: ' transmission start
High myscl
Pause 1
Low mysda
Pause 1
Low myscl
Pause 1
High myscl
Pause 1
High mysda
Pause 1
Low myscl
return
sht11_readhumid: ' lecture humiditÈ sur sht11
Call sht11_ts
Shiftout mysda,myscl,1,[hread\8] ' sortie commande lire humiditÈ
Input mysda ' attente ack
Low myscl
While mysda=1
Wend
Pulsout myscl,10 ' envoi ack
While mysda=0
Wend
While mysda=1 ' attente de la fin de la mesure
Wend
Low myscl
ShiftIn mysda,myscl,0,[humid.highbyte\8]
Low mysda
Pulsout myscl,10 ' envoi ack
ShiftIn mysda,myscl,0,[humid.lowbyte\8]
Low mysda
Pulsout myscl,10 ' envoi ack
ShiftIn mysda,myscl,0,[humidchk\8]
High mysda
Pulsout myscl,10 ' envoi ack
Input mysda
Input myscl ' retour en haute impÈdance
return
|
|
| Back to top |
|
 |
Taro
Joined: 28 Jun 2001 Posts: 147 Helped: 3
|
21 Jan 2004 10:56 sht11 microchip |
|
|
|
|
Here's code for AVR (FASTAVR)
'//////////////////////////////////////////////////////////////
'/// FastAVR Basic Compiler for AVR by MICRODESIGN ///
'/// SHT11/15 Temperature and Humidity measurement ///
'/// 14/12 bit ///
'//////////////////////////////////////////////////////////////
$Device= 8515
$Stack = 32 ' stack size
$Clock = 7.3728
$Baud=115200
$ShiftOut Data=PORTD.2, Clk=PORTD.3, 1
$LeadChar=" ", Format(2,3)
$Def dDta=DDRD.2
$Def inDta=PIND.2
$Def Dta=PORTD.2
$Def Sck=PORTD.3
Declare Sub Init()
Declare Sub StartTX()
Declare Sub CommReset()
Declare Function WriteByte(db As Byte) As Byte
Declare Function ReadByte(ack As Byte) As Byte
Declare Function Measure(what As Byte) As Word
Dim tmp As Integer, ftmp As Float
Dim n As Byte
Dim Cta As Byte, Ctb As Integer
Const True=1, False=0
Const ACK=1, NAK=0
Const TmpSHT=&h03
Const HumSHT=&h05
Const ResSHT=&h1e
Const Rstat =&h07
Const Wstat =&h06
Const c1=-4, c2=0.0405, c3=-2.8E-06
Init()
Do
tmp=Measure(TmpSHT) ' measure Temperature
ftmp=tmp/100-40
Print "Temp:"; ftmp
tmp=Measure(HumSHT) ' measure Humidity
ftmp=c1+tmp*c2+Sqr(tmp)*c3
Print "Humy:"; ftmp
Print
Wait 1
Loop
'//////////////////////////////////////////////////////////////
Sub Init()
WaitMs 20
CommReset()
WriteByte(Wstat) ' write to Status
Set dDta
WriteByte(0) ' 14bit for T, 12 bit for RH
End Sub
'//////////////////////////////////////////////////////////////
Function Measure(what As Byte) As Word
Local tmp As Word
CommReset()
If WriteByte(what)=0 Then ' isue Cmd
BitWait inDta, 0 ' wait for data ready
tmp=ReadByte(ACK) ' read first byte
Shift(Left, 8, tmp) ' make it MSB
tmp=tmp Or ReadByte(NAK) ' read second byte and combine
'n=ReadByte(NAK) ' no CRC for now
Else
Print "No sensor!"
tmp=0
End If
Return tmp
End Function
'//////////////////////////////////////////////////////////////
Sub StartTX()
Set dDta
Set Sck
Reset Dta
Reset Sck
Set Sck
Set Dta
Reset Sck
End Sub
'//////////////////////////////////////////////////////////////
Sub CommReset()
Local i As Byte
Set Dta
For i=0 To 8
Set Sck: Reset Sck
Next
StartTX()
End Sub
'//////////////////////////////////////////////////////////////
Function WriteByte(db As Byte) As Byte
Local mask As Byte
ShiftOut db ' send data
Reset dDta ' back to input
Set Sck:Reset Sck ' clock ACK
Return inDta ' return ACK (0=SHT present)
End Function
'//////////////////////////////////////////////////////////////
Function ReadByte(ack As Byte) As Byte
Local i As Byte, db As Byte
db=ShiftIn
Set dDta
Dta=Not ack
Set Sck
Reset Sck
Reset dDta
Return db
End Function
|
|
| Back to top |
|
 |
Kripton2035
Joined: 19 Jul 2001 Posts: 587 Helped: 20 Location: Earth
|
21 Jan 2004 12:47 sht11 pic |
|
|
|
|
I have done it now for ccs compiler for both temp and humidity.
if anybody wants it please msg me and I will post it.
|
|
| Back to top |
|
 |
asena
Joined: 23 Jan 2003 Posts: 73 Helped: 3 Location: Portugal
|
22 Jan 2004 0:13 sht11 gcc |
|
|
|
|
And i have it for Microchips C18.
It works very well with the 18F series.
asena
|
|
| Back to top |
|
 |
spelle
Joined: 24 Jan 2004 Posts: 2
|
24 Jan 2004 8:48 sht11 avr code |
|
|
|
|
Hi,
Does anywone have the asm source code for the 2x16LCD-PIC16F84-SHT11 configuration?
I found the hex file on TURKengineers last week and it works fine (except for the integrated website-add and a strange offset on the temperature) but they are unfortunately not responding to requests for the source code
|
|
| Back to top |
|
 |
Taro
Joined: 28 Jun 2001 Posts: 147 Helped: 3
|
26 Jan 2004 4:51 sht11 ala sicaklik nem olcumu |
|
|
|
|
Try This link and these file. It is what you want
PIC APRS Weather Station
http://www.njqrp.org/digitalhomebrewing/pic-wx/pic-wx-3.html
Source code
http://www.njqrp.org/digitalhomebrewing/pic-wx/part3.asm
http://www.njqrp.org/digitalhomebrewing/pic-wx/picwxcode-3.zip
PC File
http://www.njqrp.org/digitalhomebrewing/pic-wx/setup.exe
|
|
| Back to top |
|
 |
spelle
Joined: 24 Jan 2004 Posts: 2
|
26 Jan 2004 18:29 sht11 ccs |
|
|
|
|
| I've already tried that circuit but did not have any luck getting it to work.
|
|
| Back to top |
|
 |
SNOOP! (Ronnie)
Joined: 27 Jan 2004 Posts: 4 Helped: 1 Location: Germany
|
27 Jan 2004 21:20 sht11 + avr |
|
|
|
|
Hi..
Does anyone have seen some SHT11 sample code for 8051 Assembler?
or the LST file from C code?
Thanks
Ronnie
|
|
| Back to top |
|
 |
asena
Joined: 23 Jan 2003 Posts: 73 Helped: 3 Location: Portugal
|
01 Feb 2004 10:59 sht11 avr gcc |
|
|
|
|
Check SENSIRION website.
http://www.sensirion.com/en/pdf/Sample_Code_SHT11
Thats C code for 8051.
asena
|
|
| Back to top |
|
 |
rvlad23
Joined: 28 Apr 2004 Posts: 1
|
28 Apr 2004 12:26 ssb_sensor.h |
|
|
|
|
hello
anyone can help me with a schematic for connecting sht11 with an AVR Atmega8 and seding results to a PC using USB. I would appreciate some links or advices. I have to do a project with this subject and I can't find anything with usb,atmel and sht11 together.
Thank you in advance
|
|
| Back to top |
|
 |
eth0rupt
Joined: 30 Aug 2004 Posts: 3
|
30 Aug 2004 5:08 bascom sht11 |
|
|
|
|
hey asena,
could you post the code you say you have to interface with pic18F series controllers. i have been working on this for some time now and am feeling a little lost. i would appreciate it very much.
thanks, eth0rupt
|
|
| Back to top |
|
 |
Kripton2035
Joined: 19 Jul 2001 Posts: 587 Helped: 20 Location: Earth
|
31 Aug 2004 13:41 sht75 avr |
|
|
|
|
as lot's of you asked for it, here is the ccs code for sensirion sht11 :
//------------------------------------------------------------------------------
// Module hygrometre-thermometre sensirion sht11
//
// adaptations JYP 2003
//
//------------------------------------------------------------------------------
#include "math.h"
typedef union
{ unsigned int i;
float f;
} value;
enum {TEMP,HUMI};
#define sht_noACK 0
#define sht_ACK 1
//adr command r/w
#define sht_STATUS_REG_W 0x06 //000 0011 0
#define sht_STATUS_REG_R 0x07 //000 0011 1
#define sht_MEASURE_TEMP 0x03 //000 0001 1
#define sht_MEASURE_HUMI 0x05 //000 0010 1
#define sht_RESET 0x1e //000 1111 0
//------------------------------------------------------------------------------
char sht11_write_byte(unsigned char value)
//------------------------------------------------------------------------------
// writes a byte on the Sensibus and checks the acknowledge
{
unsigned char i,error=0;
for (i=0x80;i>0;i/=2) //shift bit for masking
{
if (i & value)
output_high(sht11_data); //masking value with i , write to SENSI-BUS
else
output_low(sht11_data);
output_high(sht11_sck); //clk for SENSI-BUS
delay_us( 5); //pulswith approx. 5 us
output_low(sht11_sck);
}
output_high(sht11_data); //release DATA-line
output_high(sht11_sck); //clk #9 for ack
error=input(sht11_data) ; //check ack (DATA will be pulled down by SHT11)
output_low(sht11_sck);
return error; //error=1 in case of no acknowledge
}
//------------------------------------------------------------------------------
char sht11_read_byte(unsigned char ack)
//------------------------------------------------------------------------------
// reads a byte form the Sensibus and gives an acknowledge in case of "ack=1"
{
unsigned char i,val=0;
output_high(sht11_data); //release DATA-line
for (i=0x80;i>0;i/=2) //shift bit for masking
{
output_high(sht11_sck); //clk for SENSI-BUS
if (input(sht11_data)==1)
val=(val | i); //read bit
output_low(sht11_sck);
}
output_bit(sht11_data,!ack); //in case of "ack==1" pull down DATA-Line
output_high(sht11_sck); //clk #9 for ack
delay_us( 5); //pulswith approx. 5 us
output_low(sht11_sck);
output_high(sht11_data); //release DATA-line
return val;
}
//------------------------------------------------------------------------------
void sht11_transstart(void)
//------------------------------------------------------------------------------
// generates a transmission start
// _____ ________
// DATA: |_______|
// ___ ___
// SCK : ___| |___| |______
{
output_high(sht11_data);
output_low(sht11_sck); //Initial state
delay_us( 1);
output_high(sht11_sck);
delay_us( 1);
output_low(sht11_data);
delay_us( 1);
output_low(sht11_sck);
delay_us( 3);
output_high(sht11_sck);
delay_us( 1);
output_high(sht11_data);
delay_us( 1);
output_low(sht11_sck);
}
//------------------------------------------------------------------------------
void sht11_connectionreset(void)
//------------------------------------------------------------------------------
// communication reset: DATA-line=1 and at least 9 SCK cycles
// followed by transstart
// _____________________________________________________ ________
// DATA: |_______|
// _ _ _ _ _ _ _ _ _ ___ ___
// SCK : __| |__| |__| |__| |__| |__| |__| |__| |__| |______| |___| |______
{
unsigned char i;
output_high(sht11_data);
output_low(sht11_sck); //Initial state
for(i=0;i<9;i++) //9 SCK cycles
{
output_high(sht11_sck);
output_low(sht11_sck);
}
sht11_transstart(); //transmission start
}
//------------------------------------------------------------------------------
char sht11_softreset(void)
//------------------------------------------------------------------------------
// resets the sensor by a softreset
{
unsigned char error=0;
sht11_connectionreset(); //reset communication
error+=sht11_write_byte(sht_RESET); //send RESET-command to sensor
return error; //error=1 in case of no response form the sensor
}
//------------------------------------------------------------------------------
char sht11_read_statusreg(unsigned char *p_value, unsigned char *p_checksum)
//------------------------------------------------------------------------------
// reads the status register with checksum (8-bit)
{
unsigned char error=0;
sht11_transstart(); //transmission start
error=sht11_write_byte(sht_STATUS_REG_R); //send command to sensor
*p_value=sht11_read_byte(sht_ACK); //read status register (8-bit)
*p_checksum=sht11_read_byte(sht_noACK); //read checksum (8-bit)
return error; //error=1 in case of no response form the sensor
}
//------------------------------------------------------------------------------
char sht11_write_statusreg(unsigned char *p_value)
//------------------------------------------------------------------------------
// writes the status register with checksum (8-bit)
{
unsigned char error=0;
sht11_transstart(); //transmission start
error+=sht11_write_byte(sht_STATUS_REG_W);//send command to sensor
error+=sht11_write_byte(*p_value); //send value of status register
return error; //error>=1 in case of no response form the sensor
}
//------------------------------------------------------------------------------
char sht11_measure(unsigned char *p_value, unsigned char *p_checksum, unsigned char mode)
//------------------------------------------------------------------------------
// makes a measurement (humidity/temperature) with checksum
{
unsigned error=0;
unsigned int i;
sht11_transstart(); //transmission start
switch(mode)
{ //send command to sensor
case TEMP : error+=sht11_write_byte(sht_MEASURE_TEMP); break;
case HUMI : error+=sht11_write_byte(sht_MEASURE_HUMI); break;
default : break;
}
for (i=0;i<65535;i++)
if(input(sht11_data)==0)
break; //wait until sensor has finished the measurement
if(input(sht11_data)==1)
error+=1; // or timeout (~2 sec.) is reached
*(p_value+1) =sht11_read_byte(sht_ACK); //read the first byte (MSB)
*(p_value)=sht11_read_byte(sht_ACK); //read the second byte (LSB)
*p_checksum =sht11_read_byte(sht_noACK); //read checksum
return error;
}
char sht11_measure_temp(unsigned char *p_value, unsigned char *p_checksum)
{
return sht11_measure( p_value, p_checksum, TEMP);
}
char sht11_measure_humi(unsigned char *p_value, unsigned char *p_checksum)
{
return sht11_measure( p_value, p_checksum, HUMI);
}
//------------------------------------------------------------------------------
void sth11_calc(float *p_humidity ,float *p_temperature)
//------------------------------------------------------------------------------
// calculates temperature [°C] and humidity [%RH]
// input : humi [Ticks] (12 bit)
// temp [Ticks] (14 bit)
// output: humi [%RH]
// temp [°C]
{ const float C1=-4.0; // for 12 Bit
const float C2=+0.0405; // for 12 Bit
const float C3=-0.0000028; // for 12 Bit
const float T1=+0.01; // for 14 Bit @ 5V
const float T2=+0.00008; // for 14 Bit @ 5V
float rh,t,rh_lin,rh_true,t_C;
// rh_lin: Humidity linear
// rh_true: Temperature compensated humidity
// t_C : Temperature [°C]
rh=*p_humidity; // rh: Humidity [Ticks] 12 Bit
t=*p_temperature; // t: Temperature [Ticks] 14 Bit
t_C=t*0.01 - 40; //calc. temperature from ticks to [°C]
rh_lin=C3*rh*rh + C2*rh + C1; //calc. humidity from ticks to [%RH]
rh_true=(t_C-25)*(T1+T2*rh)+rh_lin; //calc. temperature compensated humidity [%RH]
if(rh_true>100)rh_true=100; //cut if the value is outside of
if(rh_true<0.1)rh_true=0.1; //the physical possible range
*p_temperature=t_C; //return temperature [°C]
*p_humidity=rh_true; //return humidity[%RH]
}
//--------------------------------------------------------------------
int sht11_calc_humid_int( int16 w_humidity)
//--------------------------------------------------------------------
{
// calcul de l'humidite en entier (sans calcul float)
int32 h1,h2;
h1 = ((int32) w_humidity) * ((int32) w_humidity);
h1 = h1 / (int32)1000;
h1 = h1 * (int32)28;
h2 = ((int32) w_humidity) * (int32)405;
h2 = h2 - h1;
h2 = h2 / (int32)1000;
h2 = h2 - (int32)40;
h2 = h2 / (int32)10;
return (h2);
}
//--------------------------------------------------------------------
int sht11_calc_temp_int( int16 w_temperature)
//--------------------------------------------------------------------
{
// calcul de la temperature en entier (sans calcul float)
int16 temp1;
temp1 = w_temperature / (int16)100;
temp1 = temp1 - (int16)40;
return (temp1);
}
//--------------------------------------------------------------------
int sht11_calc_temp_frac10( int16 w_temperature)
//--------------------------------------------------------------------
{
// calcul de la temperature en fractionnaire 0.X (sans calcul float)
// exemple si t=25.367 ° renvoie 3
int16 temp1;
temp1 = w_temperature / (int16)10;
temp1 = w_temperature - (int16)400;
temp1 = abs(temp1) - ((int16)10 * abs(sht11_calc_temp_int(w_temperature)));
return (temp1);
}
//--------------------------------------------------------------------
int sht11_calc_temp_frac100( int16 w_temperature)
//--------------------------------------------------------------------
{
// calcul de la temperature en fractionnaire 0.XX (sans calcul float)
// exemple si t=25.367 ° renvoie 36
int16 temp1;
temp1 = w_temperature - (int16)4000;
temp1 = abs(temp1) - ((int16)100 * abs(sht11_calc_temp_int(w_temperature)));
return (temp1);
}
//--------------------------------------------------------------------
float sht11_calc_dewpoint(float h,float t)
//--------------------------------------------------------------------
// calculates dew point
// input: humidity [%RH], temperature [°C]
// output: dew point [°C]
{
float logEx,dew_point;
logEx=0.66077+7.5*t/(237.3+t)+(log10(h)-2);
dew_point = (logEx - 0.66077)*237.3/(0.66077+7.5-logEx);
return dew_point;
}
|
|
| Back to top |
|
 |
Sylvia Karla
Joined: 13 Aug 2004 Posts: 12
|
03 Sep 2004 1:20 sht11 + avr + circuit |
|
|
|
|
I'm very pleased for your reply about the code.
But I still have a doubt: Which microcontroller is this code for?
Regards,
Sylvia Karla
|
|
| Back to top |
|
 |
Kripton2035
Joined: 19 Jul 2001 Posts: 587 Helped: 20 Location: Earth
|
03 Sep 2004 7:17 sht71 pic assembler |
|
|
|
|
this is ccs source code for the sht11 humidity sensor, and it will compile on I think all pic the ccs can compile to !
I tested it with a 16f876 and it works fine.
|
|
| Back to top |
|
 |
eth0rupt
Joined: 30 Aug 2004 Posts: 3
|
06 Sep 2004 21:21 winavr sht11 |
|
|
|
|
hey there people,
could anyone post the picbasic code to interface with pic18F or 16F series controllers. this would be a huge help. thanks
|
|
| Back to top |
|
 |
Google AdSense

|
06 Sep 2004 21:21 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
Sylvia Karla
Joined: 13 Aug 2004 Posts: 12
|
07 Sep 2004 1:45 i2c sht11 |
|
|
|
|
Kripton,
Would you mind to send me the code you tested with the PIC16f876?
I have doubts about how to use the CSS comands to read the temperature and humidity from the code you post. Which variables did you use to represent temperature and humidity? There are lots of them. I just want to show the temperature and humidity values in an LCD display; could you help me?
Thank you in advance.
Regards,
Sylvia
sylvia_karla(at)yahoo.com.br
|
|
| Back to top |
|
 |
H_u_n_t_e_r
Joined: 24 Nov 2001 Posts: 207 Helped: 4
|
08 Sep 2004 10:06 sht11 avr code |
|
|
|
|
Hi Kripton2035,
your code should use as a driver?
Regards.
|
|
| Back to top |
|
 |
Sylvia Karla
Joined: 13 Aug 2004 Posts: 12
|
09 Sep 2004 2:21 avr + sht15 |
|
|
|
|
In which order (sequence) and format, in the main program, should I call the functions in the ccs code for sensirion sht11 posted here by Kripton ?
For example:
Sample program that shows how to use SHT11 functions
1. sht11_softreset();
2. sht11_connectionreset();
3. sht11_measure(unsigned char *p_value, unsigned char *p_checksum, unsigned char mode);
4. sth11_calc(float *p_humidity,float *p_temperature);
5. sht11_calc_dewpoint(float h,float t);
6. print temperature, humidity, dew point.
void main()
{
float *p_humidity;
float *p_temperature;
sht11_softreset();
sht11_connectionreset();
sht11_measure(unsigned char *p_value, unsigned char *p_checksum, unsigned char mode);
sth11_calc(*p_humidity,p_temperature);
sht11_calc_dewpoint(float h,float t);
printf("\fTemp:%3.2fC\nHumi:%3.2f%%",p_temperature,p_humidity);
}
Is this correct ?
Can anyone help me ?
Regards,
Sylvia Karla
|
|
| Back to top |
|
 |
Kripton2035
Joined: 19 Jul 2001 Posts: 587 Helped: 20 Location: Earth
|
09 Sep 2004 21:59 sht11 sample |
|
|
|
|
the file I uploaded is the transcription for CCS of the original work made by sensirion itself for the 805x in their appnote available here :
http://www.sensirion.com/en/pdf/Sample_Code_SHT11
just read it and program the same way with the file I provided.
I did this thing some times ago and I dont remember all from it now !
|
|
| Back to top |
|
 |
eth0rupt
Joined: 30 Aug 2004 Posts: 3
|
13 Sep 2004 1:19 atmel sht11 |
|
|
|
|
DOES ANYONE HAVE THE CODE FOR PICBASIC????
seriously, any help in this matter would be GREATLY APPRECIATED
|
|
| Back to top |
|
 |