Hi,
I want to use 2 or 3 external interrupts on a PIC 16F88, but after looking at a pinout diagram I saw that pin 6 is labelled RB0/INT/CCP1, and no other pins have the INT label, does this mean that only one pin is available for use as an interrupt?
Also, I am using Mikrobasic, does anyone know the code needed to enable external interrupts, because I have found several examples and none of them are the same.
Ok, so that means i would have to use flags to detect a press, set the flag when the interrupt fires (if the pin is high). then clear the flag on the next interrupt and execute the code corresponding with the button press... ok, not too difficult.
Anyone know how to set up interrupts in Mikrobasic?
Ok, so that means i would have to use flags to detect a press, set the flag when the interrupt fires (if the pin is high). then clear the flag on the next interrupt and execute the code corresponding with the button press... ok, not too difficult.
Anyone know how to set up interrupts in Mikrobasic?
You have got the interrupts and flag thingies all wrong
The 'interrupt on change' inputs will cause an interrupt if RBIE and GIE (bits are found in INTCON register) are enabled. This will set the RBIF flag which must be cleared somewhere in your interrupt service routine after reading PORTB. Your code for the ISR must be able to determine which of the four pins generated the interrupt.