Hi Guys,
I want to use an interrupt to pause a program by using a specific pin on port B. How can I specify the pin for this?
Using Interupts with Arduino Uno
Moderator: Benj
-
- Valued Contributor
- Posts: 661
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 184 times
- Been thanked: 203 times
- Contact:
Re: Using Interupts with Arduino Uno
Hi
I don't use the Arduino and I don't have a copy of FC to hand but I'm sure a quick search of the forum will give you the specifics you need.
Briefly (and I don't know about Arduino versions) you would insert the Interrupt Component (hexagon with INT if memory isn't too bad), and from within there it will give you all interrupt options available to that chip (e.g. RxINT / TMR0 / Interrupt On Change Port B / blah blah).
It sounds like any dedicated Interrupt pin or any pin that has Interrupt On Change would do what you need.
However as I said I don't use Arduino so can only assume they have such.
Not much of a help, but perhaps searching the forum or downloading Interrupt examples will help further.
Regards
I don't use the Arduino and I don't have a copy of FC to hand but I'm sure a quick search of the forum will give you the specifics you need.
Briefly (and I don't know about Arduino versions) you would insert the Interrupt Component (hexagon with INT if memory isn't too bad), and from within there it will give you all interrupt options available to that chip (e.g. RxINT / TMR0 / Interrupt On Change Port B / blah blah).
It sounds like any dedicated Interrupt pin or any pin that has Interrupt On Change would do what you need.
However as I said I don't use Arduino so can only assume they have such.
Not much of a help, but perhaps searching the forum or downloading Interrupt examples will help further.
Regards
Re: Using Interupts with Arduino Uno
Thanks Chipfryer, I had already looked but all info seems to be for the PIC. I have found the options and wanted to use the IOC Port B but cannot seem to isolate the interupt to a single pin despite selecting only one pin in the options. it seems that the whole port will trigger the input, but i am using some inputs for port b to operate my program. I will keep searching
-
- Valued Contributor
- Posts: 661
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 184 times
- Been thanked: 203 times
- Contact:
Re: Using Interupts with Arduino Uno
Hi
Sorry, being unfamiliar with the Arduino I can't help much, but it sounds like the Arduino is a bit restrictive. I'm surprised the Arduino doesn't have a dedicated pin though. If you have the option to select a single pin in FC but the whole port gets selected perhaps it's a bug?
Good luck.
Sorry, being unfamiliar with the Arduino I can't help much, but it sounds like the Arduino is a bit restrictive. I'm surprised the Arduino doesn't have a dedicated pin though. If you have the option to select a single pin in FC but the whole port gets selected perhaps it's a bug?
Good luck.