Hi Mark,

It sounds like you have found the ReadModifyWrite "feature" of the pics. Even when you manipulate one bit on a port, the pic internally reads the entire port, modifies the bit and then writes it back to the port. This means that if you have a capacitive load on a pin, the pin will need some time to reach the "correct" value. If you try to change another pin on the port too soon, the pic will read an erronous value on the previous pin. The easiest solution is to wait for the pin/port to settle.

However ....... If you have this problem, you have exceeded the pics specifications. If you change your design to get "inside" the specs, the problem will go away.

Cheers
/Ingvar

PS. This problem is usually caused by a capacitor connected directly to a pin or a LED connected without a series res. DS