i am trying to read ds18b20 using rom id but i got 0.6 reading even if i replace the sensor with another one i do not know why attached is the code
i am trying to read ds18b20 using rom id but i got 0.6 reading even if i replace the sensor with another one i do not know why attached is the code
Hi, Ahmed
I placed one of MY read command lines ( commented ) close to yours ...
see any difference ??? ...Code:' OWOut DQ, 1, [$55, FAM, ID[6],ID[5],ID[4],ID[3],ID[2],ID[1], CRC, $44 ] OWOut DQ, 1, [$55, $28, $D3, $60, $F6, $01, $00, $00, $00, $41 ,$44] ' Start temperature conversion Sensor 1
Alain
Last edited by Acetronics2; - 11th April 2010 at 10:52.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
hi,
thanks for fast replay so u want me to replace my line with what u sent or to add it
i wnat to be sure from something
DS18B20 rom id $28, $D3, $60, $F6, $01, $00, $00, $41, $4E
so
FAM = $28
ID1 = $D3
ID2 = $60
ID2 = $F6
ID3 = $01
ID4 = $00
ID5 = $00
ID6 = $41
CRC = $4E
'
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
yes ,
you r right this all the code which i got when issue OWOUT DQ, 1, [$33] command
so this id include device manufacture and crc
this what i got when issue command OWOUT DQ, 1, [$33]
$28, $D3, $60, $F6, $01, $00, $00, $41
$28 is the FAM as i think
$41 is the CRC
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
hi,
your are right it was my wrong i add extra 00 on id , now it working good ,
but when i change sensor or remove it i got 0.6 reading on LCD the first part of the program checks for presistance of specific ds18B20 and if it found complete the program and read temp else display no sensor , can u help in that
hi,
i update the code as attached i remove the initialization part and i got the same right reading
do u think it is not important to use initialization part
Bookmarks