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
Interrupt on RB0 with ECIO
Moderator: Benj
Re: Interrupt on RB0 with ECIO
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...
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
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.
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
Re: Interrupt on RB0 with ECIO
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.
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.