Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Available external interrupts #1

Closed
mfreema5 opened this issue Jan 14, 2020 · 3 comments
Closed

Available external interrupts #1

mfreema5 opened this issue Jan 14, 2020 · 3 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@mfreema5
Copy link

mfreema5 commented Jan 14, 2020

I had difficulty tracking down information on which pins can be used with attachInterrupt(), so I thought I'd share what I found. Hopefully it's useful to someone.

Board PIN Internal PIN Interrupt
A2 16 EXTERNAL_INT_0
A3 17 EXTERNAL_INT_1
A6 20 EXTERNAL_INT_4
A7 21 EXTERNAL_INT_5
D2 2 EXTERNAL_INT_2
D3 3 EXTERNAL_INT_3
D9 9 EXTERNAL_INT_9
D10 10 EXTERNAL_INT_10
D11 11 EXTERNAL_INT_11

That information was extracted from github.com/arduino/ArduinoCore-samd/blob/master/variants/nano_33_iot/variant.cpp. Use at your own risk, etc.

Edit: Trials show the analog pins don't seem to work as interrupts.

@ostaquet ostaquet added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 20, 2020
@ostaquet
Copy link
Owner

Thanks, very useful!

Added in the doc ;-)

@mfreema5
Copy link
Author

So, it seems I wasn't reading the information on github.com/arduino/ArduinoCore-samd/blob/master/variants/nano_33_iot/variant.cpp quite right. Turns out you need to look at the column labeled Peri.A EIC (EXTINT); entries with an asterisk (*) are available as interrupts.

Corrected table:

Board PIN Internal PIN
A1 15
A5 19
A7 21
D2 2
D3 3
D9 9
D10 10
D11 11

I've tested all these and they do act as interrupts. (At least they do in a simple sketch that does nothing but detect interrupts.)

@ostaquet
Copy link
Owner

Thanks for the update ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants