Interrupt on RB0 with ECIO

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
JG1
Posts: 20
Joined: Sat Jul 11, 2009 5:00 pm

Interrupt on RB0 with ECIO

Post by JG1 »

Hello

I have a problem with interrupt on RB0 (or RB1) with ECIO40.
The simulation is OK but with my hardware, exclusively based on Matrixmultimedia Eblocks, the interruption runs "all alone" one time after MCLR : oviously it's very awkward.
I specify that after this untimely run the interruption runs normally.

I attach an exemple to verify

Thanks for your help
Attachments
Essais_RB0int_ECIO.fcf
(7.5 KiB) Downloaded 257 times

JG1
Posts: 20
Joined: Sat Jul 11, 2009 5:00 pm

Re: Interrupt on RB0 with ECIO

Post by JG1 »

I have found a solution, but not an explanation, to my problem.
I disconnect the USB cable between the ECIO and the PC, after I make a reset with the button and there is no unexpected interruption...

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: Interrupt on RB0 with ECIO

Post by medelec35 »

I don't claim to have the answer, but how about a short delay before int routine?
Also you only need to activate int routine once. It is not required to constantly active int within a loop.
Try attached file.
no guarantee it will work.
Attachments
Essais_RB0int_ECIO_V2.fcf
(7.5 KiB) Downloaded 278 times
Martin

JG1
Posts: 20
Joined: Sat Jul 11, 2009 5:00 pm

Re: Interrupt on RB0 with ECIO

Post by JG1 »

Thank you Medelec35 for reply.

Before your post I had tried your suggestion. The attached file was only an example : the problem is constant when USB cable is connected. It appears after the ECIO is put on RUN automatically at the end of sending program by the PC, when INTRB0 is enabled (I have verified this by including a few seconds delay before enabling INTRB0)

My "solution" is not at all "elegant", so if someone has a true solution I am obviously interested.

Post Reply