just for fun try this:
Code:
speed=50: porta.2=1' power to pic is on LED
portb.4 = 1
portb.5 = 1
portb.6 = 1
pause 2000
main:
This way you have a 2 second all on to verify they all work, it will also tell you what loop turned them off (i think). If they both go off, its autosweep, else if only 1 goes off its the first part