Page 1 of 1
PORT INTERRUPT in flowcode v5.4
Posted: Thu Aug 16, 2012 7:12 am
by asbase
When I using the port int macro on portb.4 and output a led on port b.0, 1, 2, 3 or other portb pin beside portb.4, the int portb.4 will become not function. My software need to using two pin for interrupt, portb.0 (int0 int) and portb.4(port int). Previously I be using ccs to done this project and working but failed using flowcode v5 even the 5.4 version. Please advice.
Re: PORT INTERRUPT in flowcode v5.4
Posted: Thu Aug 16, 2012 9:46 am
by Benj
Hello,
How are you outputting the value to PortB?
If it's using an output icon then are you using masking or single pin mode to make sure you are not converting RB4 to be an output?
Re: PORT INTERRUPT in flowcode v5.4
Posted: Thu Aug 16, 2012 9:54 am
by Enamul
Hi,
Which pic you are using? Can you please post the program What you are using for testing this?
Enamul
Re: PORT INTERRUPT in flowcode v5.4
Posted: Thu Aug 16, 2012 12:14 pm
by asbase
proteus and real pic simulator and also real hardware.
Simulator in flowcode work, other failed.
Re: PORT INTERRUPT in flowcode v5.4
Posted: Thu Aug 16, 2012 12:24 pm
by asbase
i use single pin mode, 16f682a, 16f887....failed...
Re: PORT INTERRUPT in flowcode v5.4
Posted: Thu Aug 16, 2012 12:35 pm
by Benj
Are you coming out of the interrupt macro before the interrupt is being triggered again?
If you can provide a minimum flowchart that exhibits the problem then I will have a look and see if I can spot the issue.
Re: PORT INTERRUPT in flowcode v5.4
Posted: Thu Aug 16, 2012 1:12 pm
by Enamul
Hi,
I have just tried in PIC 16f887 in FCV5.4 and it seems that there is some issue in PORTB int. I am using PORTB<4> as input although FC simulation shows it responds on both edge as it should but in Real PIC I can see only PGT response..
Re: PORT INTERRUPT in flowcode v5.4
Posted: Thu Aug 16, 2012 5:03 pm
by Benj
Ok thanks for confirming, I will investigate here. Think I have a 16F887 lying around somewhere.
Re: PORT INTERRUPT in flowcode v5.4
Posted: Tue Aug 21, 2012 10:17 am
by Benj
Right sorry about the delay.
I have tested the 16F887 with Enamul's program and the hardware is correctly responding to both the rising and falling edges. If I click the switch in a certain way it looks like the interrupt has not fired but it has actually fired twice due to the bouncing on the switch contacts.
I then modified the program so it output on port B pins 0-3 rather then Port C. This is also worked as expected on the hardware and in simulation.
Re: PORT INTERRUPT in flowcode v5.4
Posted: Tue Aug 21, 2012 11:59 am
by Enamul
Hi Ben,
Thanks for the confirmation. I can't test it on hardware as I don't have that IC in hand. So it clarifies me one thing that Real PIC has a bug in PORT interrupt. I have just tested your program but the response is same as earlier.