DS18S20 temperature sensor , reading problem.

Assuming the OP has the ds18s20, and not the ds18b20. Both have 3 pins..... but different in terms of convenience of usage.