Also, for the Voltage conversion ...
The way you are doing it will overflow the variables and isn't very accurate.
A better way would be to use DIV32 ...hth,Code:CHECK : ADCIN 3, ADVAL VT = ADVAL * 5000 ; 5V with 3 decimals VT = DIV32 1023 ; / maximum A/D reading IF VT > 550 THEN GPIO.5 = 0 GPIO.0 = 0 ENDIF RETURN



... I damage two PIC, now I have just one, and this project don't work, even with so much help...I write so many lines of code but nothing works right...

Bookmarks