I was able to read the temperature of 4 DS18B20's, detailed in an earlier post. I am delving deeper, as I would like to use a DS2438 - Voltage / Temp monitor, in a battery pack. So, I am trying to read the family code of the DS18B20. Then I would like to read the unique 64 bit serial code. I have uploaded the trial. In it, I read the scratchpad, then get bad byte, and print same. The printed sequence is 80,5,75,70,127,255,12,16,28. If I switch out the DS18B20 to another, I get the same sequence. The last # is correct for the family code. If the previous 8 #'s is the unique 64 bit serial code, I would expect it to change, when I switch devices, but it doesn't. Any suggestions? I am using a AVR AT90USB162.
I might mention that I found that it is important which port pin to use, as it did not work on the first random choice. I read in this tutorial <http://www.maxim-ic.com/products/1-wire ... /index.cfm> that the pin needs to be a "open drain, bi-directional port pin", in slide 3 of 17. Maybe that is the trick.
Thanks in advance.
One Wire
Moderator: Benj