Hi, Fratello
I just think ISIS doesn't appreciate you do not wait for DS1820 temp conversion complete to continue running your code ...
not a real problem ( Mikroelektronika lets it as-is in its onewire drivers ... booooo )
in easy words, ....Change
Code:
Main :
OWOut DQ1, 1, [$CC, $44]
OWOut DQ1, 1, [$CC, $BE]
OWIn DQ1, 2, [temperature1.byte0, temperature1.byte1]
for
Code:
'*****************************************************************************
' Start temperature conversion
'*****************************************************************************
main:
OWOut DQ1, 1, [$CC, $44 ]
'*****************************************************************************
' Check for still busy converting
'*****************************************************************************
waitloop:
OWIn DQ1, 4, [Busy] ' Check for still busy converting
Pause 95 ' Slow Down to actual Conv. time
If NOT Busy Then waitloop
'*****************************************************************************
' Read the temperature
'*****************************************************************************
OWOut DQ1, 1, [$CC, $BE ]
OWIn DQ1, 2, [temperature1.byte0, temperature1.byte1]
.
.
.
you will display the very last correct measurement and not get " 85°C" or junk at power up ...
Alain
Bookmarks