Port B6 & B7 Interrupt on 16F887, not resetting
Posted: Sun Aug 14, 2011 8:45 pm
Port B6 & B7 Interrupt on 16F887, not resetting
Hi,
Attached is a simple test programme for Port B6 & B7 Interrupt on 16F887. It was tested on a HP488 board.
It simulates fine. Press B7 or B6 and the Port A LED goes out.
However, in the chip it works - BUT reset the chip and it does not work again.
Only a power on/off gets it to work, once. Then it does not work again.
There is something relevant in the PIC 16F887 data sheet page 47:
"A mismatch condition will continue to set flag bit RBIF.
Reading or writing PORTB will end the mismatch
condition and allow flag bit RBIF to be cleared. The latch
holding the last read value is not affected by a MCLR nor
Brown-out Reset. After these Resets, the RBIF flag will
continue to be set if a mismatch is present."
Looking through the other posts on Port B interrupt suggests that Flowcode should work with a Port B interrupt without additional C-Code? Am I missing something.
. Thanks in advance.
Hi,
Attached is a simple test programme for Port B6 & B7 Interrupt on 16F887. It was tested on a HP488 board.
It simulates fine. Press B7 or B6 and the Port A LED goes out.
However, in the chip it works - BUT reset the chip and it does not work again.
Only a power on/off gets it to work, once. Then it does not work again.
There is something relevant in the PIC 16F887 data sheet page 47:
"A mismatch condition will continue to set flag bit RBIF.
Reading or writing PORTB will end the mismatch
condition and allow flag bit RBIF to be cleared. The latch
holding the last read value is not affected by a MCLR nor
Brown-out Reset. After these Resets, the RBIF flag will
continue to be set if a mismatch is present."
Looking through the other posts on Port B interrupt suggests that Flowcode should work with a Port B interrupt without additional C-Code? Am I missing something.
. Thanks in advance.