How about just throw away values that are outside of expected ranges? Like take a running average, and if the temp is way off, disregard it. That way, it can still be 0 deg C, but only if its close to the average temp.
How about just throw away values that are outside of expected ranges? Like take a running average, and if the temp is way off, disregard it. That way, it can still be 0 deg C, but only if its close to the average temp.
http://www.scalerobotics.com
Thank you all for support !
Since the "timming" it's not so important , I made this change :
...and the display works fine now...despite the decrease of speed in display the changes of temperatures.Code:' Start temp.conv.Sensor1 OWOut DQ1, 1, [$CC, $44] OWOut DQ1, 1, [$CC, $BE] OWIn DQ1, 2, [temperature1.byte0, temperature1.byte1] Pause 800 ; because DS18B20 need 750 ms for conversion If Temperature1.15 then Temperature1= ~Temperature1 +1 Twist1 = 1 Endif ...
I rushed... still have, from time to time, "0.0 'c" on display, ONLY for sensor on DQ2 (out sensor) ........
Thanks and Regards;
Gadelhas
I use just :
"Include "Elapsed.bas"" ; for counting seconds
without other interrupts...
fratello,
Try this hex file.
It uses elapsed.bas, adds CRC checking and error correction, while only using 1375 WORDs.
Yours was 1871 WORDs, so it also saves ~500 WORDs (~1/4 of total memory.)
It should run on your .dsn, but the voltage will be off because I changed the circuit a little.
I didn't have your code, so the battery icon is different.
DT
Thank You so much ! I will try soon Your hardware ... I must (re) build the PCB.
In Proteus I have some messages ... It's something wrong ?
...and the temperature on display don't follow the variation of sensor(s)-the new temperature is on display NEXT time when the temperature is show !
Last edited by fratello; - 23rd February 2012 at 06:34.
Bookmarks