Shouldn't it be ADCON0=0? This will turn the comparators off. ADCON1=7 doesn't do anything.
What I see is that none of your LEDs will turn off.
If you want LED 1 on wait two seconds then off, then the same for LED 2, then LED 3 on stay on, LED 4 on stay on, then pause and all off it should look like:
(Just the main program)
RUN:
high porta.1 ' led 1 on
pause 2000
low porta.1 'led 1 off
pause 2000
high porta.2 'led 2 on
pause 2000
low porta.2 'led2 off
pause 2000
high portc.0 'led3 on
pause 2000
high portc.1 'led4 on
pause 2000
low portc 'led3 and led4 off
end
Is this getting to more of what you want?
There are more elegant ways to do this but this is the simplest to read.
Bookmarks