PORT INTERRUPT in flowcode v5.4
Moderator: Benj
-
- Posts: 20
- Joined: Sun Jun 03, 2012 12:53 pm
- Location: Malaysia
- Has thanked: 13 times
- Contact:
PORT INTERRUPT in flowcode v5.4
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.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: PORT INTERRUPT in flowcode v5.4
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?
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?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
Re: PORT INTERRUPT in flowcode v5.4
Hi,
Which pic you are using? Can you please post the program What you are using for testing this?
Enamul
Which pic you are using? Can you please post the program What you are using for testing this?
Enamul
-
- Posts: 20
- Joined: Sun Jun 03, 2012 12:53 pm
- Location: Malaysia
- Has thanked: 13 times
- Contact:
Re: PORT INTERRUPT in flowcode v5.4
proteus and real pic simulator and also real hardware.
Simulator in flowcode work, other failed.
Simulator in flowcode work, other failed.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: PORT INTERRUPT in flowcode v5.4
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
Re: PORT INTERRUPT in flowcode v5.4
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..
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..
- Attachments
-
- RB4_INT.fcf
- (11 KiB) Downloaded 320 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: PORT INTERRUPT in flowcode v5.4
Ok thanks for confirming, I will investigate here. Think I have a 16F887 lying around somewhere.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: PORT INTERRUPT in flowcode v5.4
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
Re: PORT INTERRUPT in flowcode v5.4
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.
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.