Alan Smith wrote: > I am relatively new at programming PICS and I have encountered my > first uncrackable bug! No problems! > My problem is: I can't seem to control IO pin 10 in a certain region > of code. The instruction I am using is as follows: bcf portB,4. Rule No.1 Don't use BSF/ BCF/ ANDWF/ COMF/ ORWF /IORWF or any similar instruction with the I/O register as destination, on a PORT register. Always set it using the MOVLW mask; MOVWF PORTx sequence you used for the OPTION and TRIS set-ups. If necessary, keep a "shadow" register with the settings you want on the outputs, modify that one bit at a time and copy to teh PORT. > Pin 10 is only connected to a 0.1uF cap which goes to 0v. Why on earth? A 0.1µF capacitor at microcontroller execution speeds appears as a SHORT CIRCUIT. Why would you do that? Also, how would you know if/ when the pin state changed with this connected? Put that cap across pin 5 & pin 14 instead! Rule No.2 Don't connect large capacitors across I/O pins. Rule No.1+2 Don't *ever* use BSF/ BCF etc... instructions on port pins connected to capacitors. These are "Read-Modify-Write" instructions which base their estimate of the pin states not specifically defined in the instruction, on what the pin state is, *not* what you last wrote in the register. -- Cheers, Paul B.