i want to light the led at portb.0 when the output of comparator is high and to light led at portb.1 when comparator output is low, my code compiled successful and on running this code light a ked at portb.1 always without depending on the output of the copmarator, the output of the comparator doesn't depend on the inputs...what is wrong hear
this is my code and i attach my circuit
Code:
C10UT VAR CMCON.6
ADCON1=7
CMCON=2
PORTB=%00000000
TRISB=%00000000
lop:
if c10ut=1 then
portb.0=1
else
portb.1=1
endif
goto lop
end
Bookmarks