Hi, Amoque
something rings my bell,here ...
your code is written for DS1820 and you are stating you use a DS18B20 ... ( see the "count_remain" & "count_per_C" use ... )
Both datasheets have little differences ...
Alain
Hi, Amoque
something rings my bell,here ...
your code is written for DS1820 and you are stating you use a DS18B20 ... ( see the "count_remain" & "count_per_C" use ... )
Both datasheets have little differences ...
Alain
************************************************** ***********************
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, of course.
I forgot the pull-up resistor (4K7) when designing the board. I had intended to add it at the "plug" end of the cable, then forgot that as well; without this pull-up the "Waitloop" never exits. Once the hardware was correct, the temperature readings were suspiciously low (I suspect for the reasons Alain suggests). "Room temperature" reading was 62F, but my analog thermometer read closer to 70F; placing the sensor under my arm should have demonstrated somewhere near 98F, but the measured value was only 85F. Bruce's (Reynold's Electronics) conversion routine gives more accurate results:
Dummy = Raw_Temperature * 1125
Raw_Temperature = DIV32 100
Raw_Temperature = Raw_Temperature +3200
Temp_in_F = Raw_Temperature
While I cannot verify that this formula yields precise results, room temperature reading of 69.14 was much closer to thermometer reading 0f 70; and under arm reading rose to 97+.
Last edited by Amoque; - 22nd March 2015 at 13:50.
4K7 seems to be a bit on the high side, I have always used 2k2 for my pullups. Maybe a reason?
Dave Purola,
N8NTA
EN82fn
The datasheet calls for a "strong" pull-up and recommends 4K7; I searched the internet and saw others having success with this value. I have no knowledge or experience that suggests a better value, so I tried it and it seems to work well.
************************************************** ***********************
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 " !!!
*****************************************
I haven't tested with long wires yet:
http://www.picbasic.co.uk/forum/showthread.php?t=17282
but 4K7 worked at 115,200 at 64MHz in preliminary tests.
(Diagram in post #1 is not updated, only 2 resistors used)
Robert
115,200.... What?
Dave Purola,
N8NTA
EN82fn
Actually the main reason for lower value resistors is when there are several devices on the bus. If you are just using one device, 4.7 K is fine and wastes less current.
Robert, you must have posted on the wrong thread? No RS-232 in this discussion...
Bookmarks