It's possible use external interrupts/attachInterrupt() with the ATtiny85 when I program with Arduino IDE?

If is possible, how many inputs (for external interrupts) the ATtiny85 have and which are they? Someone have an example code?

  • 1
    The ATTINY 85 doesn't have external interrupts. You'll have to use pin change interrupts instead.
    – Delta_G
    Mar 25 '20 at 16:15
  • 2
    Except... PB2 has INT0...
    – Majenko
    Mar 25 '20 at 16:28
  • Darnit. I just looked at the spec sheet and didn't see one listed.
    – Delta_G
    Mar 25 '20 at 18:34

Pin PB2 is the only pin that has a real external interrupt. This is INT0.

Whether you can use attachInterrupt(0, ...) or not is entirely down to whether it is implemented in the core that you are using.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.