You're probably getting bit by the "read-modify-write" gotcha because you are operating directly on the PORTA output register.If your LED circuit is loading the output pins so that the logic level read by the bsf PORTA instruction reads a logic zero on that pin -- well that's your answer. Operating with bsf and bcf instructions directly on port pins is always a potential problem (or at least the port loading and timing has to be carefully considered). A better solution is to keep a shadow register of the port contents, operate on them, then write the whole shadow register to the port. C compilers can sometimes obscure the fact that you are operating directly on the port output register. This is another good reason for using a shadow register. It's a tad slower (you have to read, then write the shadow to the port register), but it's always safe. My guess is that in your case, the logic levels of the output port pins are right at the transition level from logic '1' and logic '0'. Of course this will vary from PIC to PIC and with temperature, exact load conditions, etc. which makes the result quite unpredictable! If you try something like: TRISA = 0b00000000; PORTA_Shadow = 0; // setup PORTA_Shadow as a struct of bits PORTA = PORTA_Shadow; while (1) { PORTA_Shadow.2 = 0; PORTA_Shadow.3 = 0; PORTA_Shadow.4 = 0; PORTA_Shadow.5 = 0; PORTA = PORTA_Shadow; DELAY_MS(250); PORTA_Shadow.2 = 1; PORTA_Shadow.3 = 1; PORTA_Shadow.4 = 1; PORTA_Shadow.5 = 1; PORTA = PORTA_Shadow; DELAY_MS(250); } It should work. Matt Pobursky Maximum Performance Systems -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body