Hi everybody,
I compiled the onewire.bas example and i get on lcd the temperature of
16.18° C. (I believe it's correct).
Now i would like to understand how it works. I downloaded ds1820s datasheet
but i can figure out how count_remain and count_per_c work.
I modified the onewire.bas to get on lcd several figures.
Here what i got:
IBIN temperature = % 0000000000100001
IBIN temperature.LOWBYTE = % 100001
IBIN temperature.HIGHBYTE = % 0
IBIN temperature >> 1 = % 10000
IBIN count_remain = % 1001
IBIN count_per_c = % 10000
Well, I do not understand why count_remain and count_per_c are these figures and how they came out.
Last point, where can I get a formula that works with minus temperature ?
Thanks for help