Quote Originally Posted by Ioannis View Post

Code:
ADCON0=000101
while !adcon0.0:wend

OK, Perfect this work well now


Quote Originally Posted by Ioannis View Post
Don't you see? You display a decimal number but the number is in fact 245 and not 24.5!

So, maybe you can use word variables and multiply them by 10 so you can compare 245 to 160 and 300.

Ioannis
I have modified code in this mode, but don't work yet

If temperature > (Tmax*10) then
PORTA.6=1
else
PORTA.6=0
Endif

PORTA.6 go high when power on after showing the values on the display

NOTE :
The variables are still "temperature WORD" and "Tmax BYTE". I tried to change Tmax from BYTE to WORD in the declaration area but it gives me an error when compile