Hello Fratello,

Exactly what is needed for the battery charger when the voltage divider delivers eg 60mV to the GP2 pin 7 is low and cut the load to the battery.

greetings


Quote Originally Posted by fratello View Post
Something like this ?
Main :
......
goto check
......
goto main


CHECK : ; verify for voltage
ADCIN 2, ADVAL
VT = ADVAL * 5000 ; 5V with 3 decimals
VT = DIV32 1023 ; / maximum A/D reading

IF VT > 6000 THEN
GPIO.0 = 0
ENDIF
RETURN