On Thu, 17 Jul 1997 18:07:02 -0400 Mike Keitz writes: >Ah-ha! If the data just written to port A hasn't had time to settle, >the >BCF will tear up A0-A4 (especially likely at 16 MHz). It's most >likely not that you're re-enabling interrupts, just that you're >killing a little time that makes it work. Try moving the enableirq >back up and either (a) put a few NOPs between movwf PORTA and bsf >PORTA,5 or (b) my preferred solution since it doesn't depend on port >loading or clock speed at all, do this: > iorlw 0xF0 ;High bit set at first > movwf PORTA ;Output data, keep ack high > andlw b'11011111' ;Now make bit 5 (-ACK) low > movwf PORTA ;set ack low > Wonderful!!!!! That DID fix it! At the Microchip seminar they kept making a big deal about doing port reads right after writes, and did mention that bit manipulation instructions are read-modify-writes... but I guess it didn't sink in. So... THANKS! I was battling that for close to a week. I now have two things to check whenever a PIC program is behaving strangely. The first is to look for jump tables going over page breaks (generally answers the question of "How did it get THERE?), and, second, watch for BSF and BCF instructions to ports shortly after writing to ports! Thanks! Harold