Hi! The datasheet does not specify it was possible (or sensible) to read the temperature while a conversion is in progress. It only explains, if externally powered, how to find out if a conversion is still in progress or done.
If, for example, the device uses successive approximation for the AD conversion, some bits may already have changed the time you're reading the temperature. In that case it is pure luck if you get a reading that is near the real temperature, or complete garbage. Now, reading the datasheet again... As the conversion time drops to a half for each bit you don't request, one can assume that the conversion is done by a single-slope method, though. In that case, you'll probably get a valid reading, either the old one or the new one. But still, the datasheet tells you to wait... So I'd suggest not to start a conversion and then read the previous value, but to read the previous value and *then* start another conversion. If using parasite power, it is even impossible to do it the other war round. Greets, Kiste > But I did only > loop > show_temp > read_temp_without_delay > end loop > > And is working with that exception: a wrong temperature in > the firs > 750ms of the loop cycle. This is ok as long you only > display > temperature. In the first second it will show a wrong one > but it will > not hurt anyone. This is why I said is working without > delay - and I > said also in which conditions. > > The device is exactly DS18B20 - I have the feeling that my > messages > don't arrive on your side.... > -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
