Which Attiny84 pins are interrupt pins?

Hello,

I have this simple test program which works on Arduino Uno, but is not working on Attiny84 when I transfer it there.

int buttonPin1 =1;     
int buttonPin2 =2; 
int ledPin = 6;    

void setup()
{
  pinMode(ledPin,OUTPUT); 
  attachInterrupt(buttonPin1, setDarkness, RISING);  
  attachInterrupt(buttonPin2, setDarkness2, RISING);  
}

void setDarkness ()
{ xBlink(7, 1);      // blink 7 times with 1 second interval
}

void setDarkness2 ()
{ xBlink(4, 1);     // blink 4 times with 1 second interval
}


void loop() 
{
xBlink(2, 2);      // blink 2 times with 2 second interval                
}                                     

void xBlink (int n, int xDelay)           
 {
 xDelay = xDelay*1000;              
 for (int i = 1; i < n+1; i++)
 {
    digitalWrite(ledPin,HIGH);  
    delay(xDelay);
    digitalWrite(ledPin,LOW);
    delay(xDelay);
 }
 }

I have two buttons connected to pin 12 and 11. Not sure if I got interrupt pin numbers right?

// +-/-+
// VCC 1| |14 GND
// 0 2| |13 10/A0
// 1 3| |12 9/A1
// RESET 4| |11 8/A2
// INT0 2 5| |10 7/A3
// 3/A7 6| |9 6/A4 SCK
// MOSI 4/A6 7| |8 5/A5 MISO
// +----+

The single external interrupt is on PB2 (PCINT10 / INT0 / OC0A / CKOUT) which is physical pin 5 / digital pin 2. It is labeled in your diagram as INT0.

Your sketch can never completely work on an ATtiny84 because it does not have the necessary peripherals.

OK, that what I was afraid of. But then I am confused why Attiny84 datasheet says this microcontroler has "Pin Change Interrupt on 12 Pins"?

Pin Change Interrupt != External Interrupt. (or Pin Change Interrupt ? External Interrupt if you prefer a more traditional symbol)

Yes, to use the language of the datasheet. But pin change interrupts are external to the MCU as well (as opposed to something like a timer interrupt which might be called an internal interrupt).

But I don't see how the sketch works even on an Uno. The first argument for attachInterrupt() is an interrupt number, not a pin number. For an Uno, the choices are 0 and 1.

The bigger question is why fool with interrupts just to read buttons. What would be wrong with polling them instead. I haven't thought through it (and don't intend to) but pin change interrupts could probably be used to detect button presses, but there will be some additional logic hoops to jump through.

OK, thanks folks for explanations. Indeed on Uno it would be 0 and 1 logical pins - forgot to change them back to Uno numbering.
Will look in the forums further now how to utilise pin change interrupts. I need them to change some parameters if interrupted by button press anywere in the main loop.