-
Notifications
You must be signed in to change notification settings - Fork 229
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
Missing digitalPinToInterrupt definition #81
Comments
instead of -1 use NOT_AN_INTERRUPT |
I though the sale but it seems all pins can be interrupt in the tiny85. Does anyone have a working interruptions code with damellis/attiny? |
No this is wrong. There are PinInterrupts (1 on Attiny I think) and PinChangeInterrupts (all pins on Attiny x5). This code should work, but was never tested by me, at least not for Attinys, but for All other platforms: PinInterrupt issue still exist though, and should be added as well. |
Thanks @NicoHood I'll try. I tried some other similar code but there was some incompatibility with SoftwareSerial. |
It is incompatible too. Otherwise you have to code your own interrupt vectors. Then you are working on such a low level where the Arduino IDE doesnt suit your needs anymore or a 328 would be the better choice. |
Yeah, I am going to use a 328. Too much hustle. The tiny85 is just lovely, but not this time |
FWIW, I think the discussion above about supporting PCINT interrupts on all pins is orthogonal to the subject of this issue. The |
Problem: damellis/attiny#81 Stolen from: tkem/mbino@34cbb89
The core doesn't define digitalPinToInterrupt for attinys.
I think correct implementation for attiny8 is:
define digitalPinToInterrupt(p) ( (p) == 2 ? 0 : -1)
and for attiny14:
define digitalPinToInterrupt(p) ( (p) == 8 ? 0 : -1)
The text was updated successfully, but these errors were encountered: