>>I am using the BSF instruction to set bits >>on PORTD on a 16c74A. The whole port is >>configured as output (CLRF TRISD). The >>problem is, when I set a bit on the port, any >>other bits that were set, clear and then the >>bit the instruction specifies, sets. >>Why don't the other bits remain set? >So suppose you set an output pin high, and then drain enough current >from it to pull the voltage at the pin below the logic-low threshold. >(Example: driving an LED without a series resistor) Then when you BSF >or BCF another pin of the same port, that first pin is read in, >and re-written as LOW. >regards >Alec You hit the nail right on the head, Alec. I was driving LED's without a series resistor and the voltage was dropping to about 2.3V. The Schmitt trigger inputs must have seen it as a 'low' and cleared the bit. Thanks very much. Gavin vulcan@ihug.co.nz - - - - - - - - - - - - - -