Take the 2-minute tour ×
Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. It's 100% free, no registration required.

I am using an Arduino Uno with the Arduino as ISP sketch to program an ATtiny85.

I followed this tutorial to set up to program the ATtiny, and successfully got it to run Blink and an interrupt-free version of my program.

I then added an interrupt triggered by a button and got it working on the Arduino Uno (with a software debounce in the ISR). Now I want to run that sketch, with appropriate pin changes, on the ATtiny. Which pins correspond to which interrupt IDs for attachInterrupt()?

Or can I not use attachInterrupt()? If I can't, how do I do set up an interrupt on an ATtiny85?

share|improve this question

migrated from electronics.stackexchange.com Aug 26 '14 at 5:17

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

    
attiny is kind of a piece of crap. Get arduino-tiny instead. –  Ignacio Vazquez-Abrams Aug 26 '14 at 4:26
    
@IgnacioVazquez-Abrams attiny is kind of a piece of crap. I assume you refer to the device? If that is the case then how does an Arduino core change anything? The "instead" statement is what confuses me. –  alexan_e Aug 26 '14 at 6:44
1  
No I think Ignacio refers to the attiny library that is referenced by the tutorial. –  jfpoilpret Aug 26 '14 at 8:03
    
I am indeed talking about the extension module for the IDE. –  Ignacio Vazquez-Abrams Aug 26 '14 at 12:43
    
In arduino-tiny you can use the constant EXTERNAL_INTERRUPT_0 for INT0 at physical pin 7 –  Gerben Aug 26 '14 at 15:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.