Yes BSF/BCF do use read-alter-write, and yes this will screw up the int on change stuff if the timing of things is just right (or wrong in this case :-)). At least it screwed things up for me! Anyone got any good solutions for this problem. I managed to work round it by arranging things so that I only need to write to the port during a window when I know that there will be no changes on the input side of things (or at least there shouldn't be!). Not sure what happens if you use some sort of shadow register and then do a byte wide write to the port. I've not tried this anyone know if it helps? One last thing according to my copy of the 87X spec (rather old I'm at work at the moment), RB3 does not have int on change only RB4-RB7. Andy ----- Original Message ----- From: "Howard McGinnis" To: Sent: Wednesday, May 10, 2000 3:49 PM Subject: Mixed use PORTB with Interrupt on Change > Hello, > > I'm using a 16F873 in an application and plan to use PORTB as 5 inputs, 3 > outputs with the inputs being bits 3-7 to take advantage of the interrupt > on change feature. The docs caution against reading the port which is > understandable. > > Does the PIC do a read-alter-write when executing a BSF or BCF instruction > or does it have the ability to set or reset a bit directly? Does using > PORTB in this mixed mode screw up the interrupt on change? > > Thanks, > howard > Howard McGinnis > hmcginni@digital.net > Electronic Visions, Inc. > 1650 Barrett Drive > Rockledge FL 32955 > (321) 632-7530 > http://ddi.digital.net/~hmcginni > mcginnis@e-visions.com