On 12/29/06, Harry Pfeifer wrote: > I have a problem with a circuit which I have designed and constructed, using a PIC16F867. PORT A bit 4 is behaving erratically during single bit writes to other bits of port A All other I/O appears to be working well. > > Port A bit 4 is a bi-directional input or output, as a schmitt trigger when used as an input, and an open collector output. It may also be used as the external clock input for TIMER 0. It's an open drain output. What kind of pullup do you have on it and what's it connected to? If it doesn't get pulled up over the threshold for the Schmitt trigger, it's going to read as 0. Remember single bit writes to other Port A bits actually read the entire port, modify the bit, then write the entire port... so if bit 4 reads as 0, then writing any other bit of Port A will have the effect of setting bit 4 to 0. Orin. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist