I'm using the above code with a 16f84a and getting a consistent number, which is clearly wrong. I'm getting humvalue 16003 and tempval 4000. And since I haven't burst into flames this seems unlikely to be accurate.

I also tried using a modified Keunyoung Oh's code for the 16f877 (found http://itp.nyu.edu/physcomp/sensors/Code/SHT11 ) but received similar results (consistent & wildly inaccurate numbers), though with different numbers.

Any idea why this might be?

Also, as a possible explanation: I'm using the DIP sht11 which has a 117 on the sensor. I'm assuming I should use the pin diagram which goes with sensirion sht11 sensor module #28018, but all the other pin diagrams are different.

any suggestions would be helpful.

thanks,
Adam