Thanks for atention ! All three programs are - without read_temperature - verry accurate !
I try, in all three cases, to put the "read_temp" code in other places... the results are inadequates !
Thanks for atention ! All three programs are - without read_temperature - verry accurate !
I try, in all three cases, to put the "read_temp" code in other places... the results are inadequates !
@ first you can try your program with a 9 bits resolution, to have the quickest sensor conversion time ...
THEN you will know where is something wrong ...
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 " !!!
*****************************************
Not checked the data sheet so can't confirm if this is an option, but for the sake of a couple of ££ why not use a DS1307 RTC chip ??
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
The clock run ok without read_temp, in all cases and run faster ( strange for me) if use this subroutine.
I try now with 9 bits resolution of DS18B20, wait for result !
Thanks for support !
If DS18B20 it's in 9 bit mode, the clock run faster (!) with ~ 2 sec/hour (5 sec in 3 hours).
Thats about .055%; you ARE using a crystal, not a resonator, right?
Anand
Yes, I use a crystal. But, without code for DS18B20, the clock run correct (~ 1 sec/day).![]()
Hi,
If I read this correctly you have an interrupt frequency of 61.035Hz (prescaler 1:64, 256*64=16384, 1/0.016384=61.035Hz) when you ideally should have 61Hz - that's 0.057% off and as Anand says 2 seconds over one hour is 0.055%.
I currently have no idea why it starts running correct when you remove the DS1820 code - are you sure that's the case?
Bookmarks