Page 1 of 1

Interrupt on RB0 with ECIO

Posted: Sun Oct 18, 2009 9:14 am
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

Re: Interrupt on RB0 with ECIO

Posted: Sun Oct 18, 2009 1:13 pm
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...

Re: Interrupt on RB0 with ECIO

Posted: Sun Oct 18, 2009 2:37 pm
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.

Re: Interrupt on RB0 with ECIO

Posted: Sun Oct 18, 2009 3:39 pm
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.