Moshe Fish wrote: > > I have tried to take the same code (to which I added a GIE) and delete all parts > of the code which relate to port B and the other ports leaving only Port A > setup and the test. The code works perfectly and I can see it on the scope > (which by the way is a Tektronix digital scope). Hard to go wrong there... > This leads me to believe at > this stage that somewhere in the portB setup there is something that is > affecting port A. By the way the simulator (I do not have an emulator) shows it > working fine on the code with the portB interrupts. Here are a few more ideas. 1) Are you certain that your pic include file P16C65.INC is O.K.? Specifically, it's possible that your PORT B definitions may be fubarred. 2) Have you tried another target PIC16C65? Maybe you have a bad chip. 3) Where in your code did you enable GIE? Since the interrupt routine does not save the STATUS register and reinitialize it for its on use, there's a chance that RP0 is in the wrong state when the interrupt occurs. Consequently, your write to PORTB would instead be going to TRISB; ditto for the PORTA write. This could change the PORTB inputs to outputs! > I still remain mystified although I am sure that when I discover what > it is I will fell like an idiot..............->feel? or fail? That's O.K. all idiots eventually fell (fail). However, I'm sure your no idiot! Scott