craigcurtin
Senior Member
Guys,
I have gone over previous forum posts and must admit that i am pretty lost when it comes to the maths that is involved with READTEMP12 (probably why i had always used plain old READTEMP before.
I have a routine that Hippy previously posted that is working to format and displat the READTEMP12 routine (on a 40x1) to an LCD panel and this is working well.
However i would like to be able to test within my code for more granular than 1 degree increments and am unsure how to do this
Currently my code goes something like
If AverageBackDoorTemperature >= 22 then Goto Overheat
What i would like to do is be more granular than 1 degree increments.
I am working in Celsius and store the ReadTEMP12 value in a word variable.
Can anyone provide some code i can try to follow to compare on 1/2 (or 1/4 degree numbers) presumably if these were left as binary this would be easiest ?
Craig
I have gone over previous forum posts and must admit that i am pretty lost when it comes to the maths that is involved with READTEMP12 (probably why i had always used plain old READTEMP before.
I have a routine that Hippy previously posted that is working to format and displat the READTEMP12 routine (on a 40x1) to an LCD panel and this is working well.
However i would like to be able to test within my code for more granular than 1 degree increments and am unsure how to do this
Currently my code goes something like
If AverageBackDoorTemperature >= 22 then Goto Overheat
What i would like to do is be more granular than 1 degree increments.
I am working in Celsius and store the ReadTEMP12 value in a word variable.
Can anyone provide some code i can try to follow to compare on 1/2 (or 1/4 degree numbers) presumably if these were left as binary this would be easiest ?
Craig