Page 1 of 1
eb-006-00-9 development board interupt
Posted: Thu May 18, 2017 12:49 pm
by scollins22
Hi
I have a development board which has the led board attached to it. I have 10 boards I am teaching on to my class. we have an interrupt on pin rb0 for a pic 16f84a set up to a push button. all the programs work in the flow-code simulator and I have set all the configs from flowcode 6. when we download to board the interrupt button does not interrupt the program. I have tried this multiple times with not one board working.
Re: eb-006-00-9 development board interupt
Posted: Thu May 18, 2017 1:02 pm
by Benj
Hello,
Please can you attach your program and I will make sure there is nothing there that could be causing issues.
Regarding your hardware please can you confirm that you have a wire connected from +V on the EB006 through to the +V on the switch board. This wire supplies power to the switches so they essentially won't work without this in place.
If you're using your own switch circuitry then please can you confirm you are using a similar setup to that shown on the link below for the "active high" type switch.
https://www.matrixtsl.com/wikiv7/index. ... e#Examples
Re: eb-006-00-9 development board interupt
Posted: Fri May 19, 2017 10:26 am
by scollins22
hi
the board is powered as the first two lights come on from the main program. when I press the button the lights don't go to the interrupt routine
Re: eb-006-00-9 development board interupt
Posted: Fri May 19, 2017 3:02 pm
by medelec35
Hi scollins22,
its not a good idea to place an interrupt enable within the continuous loop in main.
Interrupt enables should only be enabled once.
Only activated again, if interrupt disabled has bee used.
Interrupt macros should be as short as possible with no delays if possible and no components that contain delays e.g LCD.
Best way if you can is just set a flag when interrupt has been detected.
Then in main detect the flag being set, if so the call the macro that contains function required after interrupt has been triggered.
Take a look at the attached flowchart.
If still not working, have you tried a
1 sec flasher to make sure your hardware is running at the correct speed?
Martin
Re: eb-006-00-9 development board interupt
Posted: Fri May 19, 2017 3:29 pm
by Benj
Hello,
You have the interrupt enable as part of your main loop. This will be constantly resetting the interrupt registers. Probably best to move this to before your loop.
Here is a re-worked version of your program with all the large delays ect removed from the interrupt macro.
You didn't answer my question regarding your switch wiring?
Edit: Whoops Martin beat me to it

But our solutions are very similar.
Re: eb-006-00-9 development board interupt
Posted: Mon May 22, 2017 10:09 am
by scollins22
Thanks guys your responses are great. I have just got into work so looking through them. Thanks very much to all who have helped me. The forum is great thanks guys