Attiny 45/85 on arduino, will intterrupt work?

i was reading on this site

on how to work attiny 45/85 with arduino board,

so my question is, will interrupt work as atmel328 do?

seems like...

seen the datasheet: ?


yes but does arduino support it?

oh - hum...

since millis() works, interrupts will work, 2...

maybe some register addresses r different... my arduino IDE doesnt know the attiny45... does urs?


Here it shows how can arduino read it

oh - i c - the IDE can be upgraded... cool! 8-)

so can anyone help me on how can i make interupt work?

could u specify what doesnt work?

according to ur URL millis() will work... so interrupts work...

or not?


i tried interrupt and it doesnt work

how did u try it? -arne

attachInterrupt(1, blink, CHANGE); and attachInterrupt(0, blink, CHANGE);

but it seems it can't understand witch one is 1 or 0 interrupt

any idea please?

did u test if millis() works? -arne

nop, why?

why dont u do that first:

void setup() { pinMode(2,OUTPUT); }
void loop() {

(with a led in series with 10kR at digital pin 2)?

my idea is: if delay+millis dont work, then ur URL is wrong... if they do work, then ur sketch is wrong...


i tried this and it doesnt works

int led_pin =4;
volatile int state = LOW;

void setup()
  pinMode(led_pin, OUTPUT);
  attachInterrupt(0, blink, CHANGE);

void loop()


void blink()
  state = !state;

any other code (digitaWrite,analogRead,delay...) works

What is feeding into pin2 that is generating the interrupt? Does the attiny 45/85 use the same input pin for the interrupt that attachInterrupt is supposed to be watching for?

pin2 on attiny 45 is INT2,

so when i call attachInterrupt(0, blink, CHANGE); i call pin2 right? why i have the problem?

can u find out what the content of the interrupt registers is (before and after the attachInt...() call)?

e. g. MCUCR, GIMSK, PCMSK, ...

maybe u could do it with a flash code? 1: long on, then short off 0: short on, then short off after 8 bits: long off

or does serial work?


i really dont understand what you mean, i only know some things on arduino