Hi jcleaver,
You might want to check Maxim forum at:
http://discuss.dalsemi.com/index.php?
They had rejects on DS1820 family showing wrong temperature and there is a fix for it.
Nick
Hi jcleaver,
You might want to check Maxim forum at:
http://discuss.dalsemi.com/index.php?
They had rejects on DS1820 family showing wrong temperature and there is a fix for it.
Nick
I Do Appreicate Your Inputs
Manwolf Your Program Looks Great But Way Beyond My Knowledge
And As For As The Ds18 Goes I Have Tried Several
Again To Ask ?
Why Does Mikro Work Where Pbp Does Not
There Has To Be Some Difference In The Compliers
Using Exactly The Same Hardware Easypic4
Could It Be The Math Conversion Using Pbp
Both Programs Use The Same Formula For C To F
How are you reading the temp form the DS18S20 in PBP?
Are you using one-wire or something else?
i have attached the 2 programs one in pbp which reads temperature incorectly
the other mikroe which works no hardware changes are made really interested in the difference
thanks
jack
Last edited by jcleaver; - 23rd July 2008 at 00:54.
Speaking strictly about PBP....
You know, just like it says in the manual, define's have to be in CAPS.
Therefore, the
define osc 20
is ignored and the timing generated by the code is generated for an oscillator of 4mhz, but apparently you are running it at 20mhz, and therefore, probably far too fast.
Did you write this code or copy/paste it? Why not use PBP's built-in OWIN/OWOUT commands?
Last edited by skimask; - 23rd July 2008 at 02:41.
maybe you should check the math.
With a change to the math the program works correctly. Running on a EasyPIC5 board.
Sorry I was sleeping that day in class, so I can't explain why PBP and MBasic work differently.
The solution simply is here ...
Why not use PBP's built-in OWIN/OWOUT commands?
MKB reads Byte by Byte and Pbp ... as you want !
just need to program a correct reading with Pbp !
Further ... TempF = TempC *9/5 + 32 ...
Remember PbP works with UNSIGNED INTEGERS ...
Alain
PS: Ski, MKB has a built-in timing adjustment,( you check an option in the project window instead of writing a DEFINE ) and The "conversion complete" polling built-in. That surprised me a bit at first time, not to see it in the source listing ...
Last edited by Acetronics2; - 23rd July 2008 at 09:01.
************************************************** ***********************
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 " !!!
*****************************************
Bookmarks