SHT-11 code help
Hello All,
To get this Sensirion SHT-11 sensor tested quickly I copied Tracy's code from his site to the editor.
all I get is wrong values in the DeBug window. Here is what results I get:
-40.0·· 65535·· %RH=3731.7····· %RHtc=3715.2
I have tripple checked the code and I do not see the problem.
Help.
Here is the code.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
D. A. Wreski
To get this Sensirion SHT-11 sensor tested quickly I copied Tracy's code from his site to the editor.
all I get is wrong values in the DeBug window. Here is what results I get:
-40.0·· 65535·· %RH=3731.7····· %RHtc=3715.2
I have tripple checked the code and I do not see the problem.
Help.
Here is the code.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
D. A. Wreski
Comments
You have sck and dta as CON 4 and CON 6, instead of PIN 1 and PIN 0?
Your OUTS and DIRS under initialization are different, confirm....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
~~ dRu ~~
I have Pin 1 and Pin 0 set for another use.
I then removed the OUTS and DIRS from the program, that are not necessary for the program to work. Still the same results.
I did scope the Clock and Data pins on the SHT11 and the Stamp ports 4 and 6 and I do see data and clock. Somehow
the data is incorrect. Is there a timming problem?
I even tried another program with the same results. I do not see why P4 and P6 won't work as well as P0 and P1.
Thanks for your reply. I need another set of eyes, I might be overlooking something simple?
Dave
a quick look and found.......
You have sck and dta as CON 4 and CON 6, instead of PIN 1 and PIN 0?
Your OUTS and DIRS under initialization are different, confirm....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
~~ dRu ~~
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
D. A. Wreski
I have found the problem. All the samples I used have the pinout for the sensor itself. Parallax has the SHT-11 sensor on a 8 pin carrier with a different pinout.
So, as soon as it was connected properly everything works. Parallax has built in protection resistors so the external resistors are not needed.
Thanks for all the help.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
D. A. Wreski