3v0 Coop Build Coordinator Forum Supporter Sep 30, 2010 #2 The one wire devices follow a protocol that is well documented in their datasheets. In general you first select the device you want to talk to with MATCHROM or SKIPROM. Then you can communicate with the device.
The one wire devices follow a protocol that is well documented in their datasheets. In general you first select the device you want to talk to with MATCHROM or SKIPROM. Then you can communicate with the device.
Transistorman Member Sep 30, 2010 #3 3v0 said: The one wire devices follow a protocol that is well documented in their datasheets. In general you first select the device you want to talk to with MATCHROM or SKIPROM. Then you can communicate with the device. Click to expand... any asm example ?
3v0 said: The one wire devices follow a protocol that is well documented in their datasheets. In general you first select the device you want to talk to with MATCHROM or SKIPROM. Then you can communicate with the device. Click to expand... any asm example ?
ericgibbs Well-Known Member Most Helpful Member Sep 30, 2010 #4 Transistorman said: any asm example ? Click to expand... hi TT, The Forum SEARCH is a useful tool... https://www.electro-tech-online.com/search.php?searchid=571871
Transistorman said: any asm example ? Click to expand... hi TT, The Forum SEARCH is a useful tool... https://www.electro-tech-online.com/search.php?searchid=571871
Transistorman Member Sep 30, 2010 #6 ericgibbs said: hi TT, The Forum SEARCH is a useful tool... https://www.electro-tech-online.com/search.php?searchid=571871 Click to expand... i dont really understand the datasheet if 85 c = 0000 0000 1010 1010 and what is the other ? example : 75 c , 22 c , 35 c , etc **broken link removed**
ericgibbs said: hi TT, The Forum SEARCH is a useful tool... https://www.electro-tech-online.com/search.php?searchid=571871 Click to expand... i dont really understand the datasheet if 85 c = 0000 0000 1010 1010 and what is the other ? example : 75 c , 22 c , 35 c , etc **broken link removed**
P Pommie Well-Known Member Most Helpful Member Sep 30, 2010 #7 What don't you understand? It's just BCD numbers. Edit, 75 would be 150 converted to BCD, so 0x96. Mike. Last edited: Sep 30, 2010
What don't you understand? It's just BCD numbers. Edit, 75 would be 150 converted to BCD, so 0x96. Mike.
Transistorman Member Sep 30, 2010 #8 Pommie said: What don't you understand? It's just BCD numbers. Edit, 75 would be 150 converted to BCD, so 0x96. Mike. Click to expand... ok i understand but what about the - letter ?
Pommie said: What don't you understand? It's just BCD numbers. Edit, 75 would be 150 converted to BCD, so 0x96. Mike. Click to expand... ok i understand but what about the - letter ?
P Pommie Well-Known Member Most Helpful Member Sep 30, 2010 #9 Transistorman said: but what about the - letter ? Click to expand... No idea what you are talking about. Mike.
Transistorman said: but what about the - letter ? Click to expand... No idea what you are talking about. Mike.
Transistorman Member Sep 30, 2010 #10 Pommie said: No idea what you are talking about. Mike. Click to expand... like -35 c
ericgibbs Well-Known Member Most Helpful Member Sep 30, 2010 #11 Transistorman said: like -35 c Click to expand... hi, When the most significant BIT of the READ value is set to 1, it indicates negative temperature value.
Transistorman said: like -35 c Click to expand... hi, When the most significant BIT of the READ value is set to 1, it indicates negative temperature value.
Transistorman Member Sep 30, 2010 #12 ericgibbs said: hi, When the most significant BIT of the READ value is set to 1, it indicates negative temperature value. Click to expand... does it mean if 1111 1111 = - and 0000 0000 = + if yes then what is 110 c ?
ericgibbs said: hi, When the most significant BIT of the READ value is set to 1, it indicates negative temperature value. Click to expand... does it mean if 1111 1111 = - and 0000 0000 = + if yes then what is 110 c ?
ericgibbs Well-Known Member Most Helpful Member Sep 30, 2010 #13 Transistorman said: does it mean if 1111 1111 = - and 0000 0000 = + if yes then what is 110 c ? Click to expand... hi TT, Think about it. the least significant BIT is equal to 0.5C So 110C = 220decimal which equals hex.........................??????
Transistorman said: does it mean if 1111 1111 = - and 0000 0000 = + if yes then what is 110 c ? Click to expand... hi TT, Think about it. the least significant BIT is equal to 0.5C So 110C = 220decimal which equals hex.........................??????
3v0 Coop Build Coordinator Forum Supporter Sep 30, 2010 #14 You need to understand 2's compliment numbers. In 2's comp the leftmost bit is assumed to be negative. All other bits are positive. In a 4 bit binary number the bit values are 8 4 2 1 if we choose 2's comp representation they are -8 4 2 1 So a decimal 1 would be 0001 and a decimal -1 is 11111 because -8 +4 +2 +1 = -1 (we just added the bit values where we had a 1) a decimal -4 would be 1100 because -8 +4 = -4 Regardless of the number of bits it is always the leftmost bit that is assumed to be negative. But as Eric said in the case of this sensor the rightmost bit is worth .5 rather then 1 . Last edited: Sep 30, 2010
You need to understand 2's compliment numbers. In 2's comp the leftmost bit is assumed to be negative. All other bits are positive. In a 4 bit binary number the bit values are 8 4 2 1 if we choose 2's comp representation they are -8 4 2 1 So a decimal 1 would be 0001 and a decimal -1 is 11111 because -8 +4 +2 +1 = -1 (we just added the bit values where we had a 1) a decimal -4 would be 1100 because -8 +4 = -4 Regardless of the number of bits it is always the leftmost bit that is assumed to be negative. But as Eric said in the case of this sensor the rightmost bit is worth .5 rather then 1 .
Transistorman Member Sep 30, 2010 #15 hi i made a random number if 0096h = 150 / 2 = 75c then 00c8h = 200 / 2 = 100c is it right ? Last edited: Sep 30, 2010
ericgibbs Well-Known Member Most Helpful Member Sep 30, 2010 #16 Transistorman said: hi i made a random number if 0096h = 150 / 2 = 75c then 00c8h = 200 / 2 = 100c is it right ? Click to expand... Its close enough.
Transistorman said: hi i made a random number if 0096h = 150 / 2 = 75c then 00c8h = 200 / 2 = 100c is it right ? Click to expand... Its close enough.
Transistorman Member Sep 30, 2010 #17 ericgibbs said: Its close enough. Click to expand... why do you say " close enough " ?
ericgibbs Well-Known Member Most Helpful Member Sep 30, 2010 #18 Transistorman said: why do you say " close enough " ? Click to expand... Its correct, thats what I mean........
Transistorman said: why do you say " close enough " ? Click to expand... Its correct, thats what I mean........