Interrupt only resets arduino

Hi guys,

I am trying to get the interrupt function for a bigger project to work and have reduced the code to a simplified version. What I want the code to do is to display a number and every time I press a pushbutton, it activates an interrupt which is supposed to add one to an integer value. This number will then be displayed on my seven segment display. Once the number reaches nine, its supposed to reset back to one.
What happens instead is that when I push the button, the interrupt activates and then the arduino practically resets itself. So I am stuck with the display reading one all the time. When I push the button, the seven segments turn off and then turn back on displaying the one value.

Below is my code, any ideas?
Oh yeah, I know the seven segments work, as they have been used to display the speed of my car, so its not that I wired anything wrong.

Any ideas would be helpful,
Thanks

//Created by Frederick
//___________  _________   _______
//|         |  |  ___  |  | _____ |    
//|    |    |  |  ___| |  |     | |
//|    |    |  | |     |  |  ___| |
//|         |  | |____ |  |     | |
//|_________|  |_______|  |__-_-__|

//Oben sind die drei segment displays. sie sind in der reihenfolge 
//den man sie auf dem breadboard montieren muß (mit resistoren).

//Above are the 3 7 segment displays. They are in the order
//that you have to install them. 

//declarationen
//LED display 1 hat (has) Ports 22-28
//LED Display 2 hat (has) Ports 29-35
//LED Display 3 hat (has) Ports 36-42


unsigned int druck;
volatile int function = 1;

void setup(){
 
  
  
  pinMode(22, OUTPUT);
  pinMode(23, OUTPUT);
  pinMode(24, OUTPUT);
  pinMode(25, OUTPUT);
  pinMode(26, OUTPUT);
  pinMode(27, OUTPUT);
  pinMode(28, OUTPUT);
  pinMode(29, OUTPUT);
  pinMode(30, OUTPUT);
  pinMode(31, OUTPUT);
  pinMode(32, OUTPUT);
  pinMode(33, OUTPUT);
  pinMode(34, OUTPUT);
  pinMode(35, OUTPUT);
  pinMode(36, OUTPUT);
  pinMode(37, OUTPUT);
  pinMode(38, OUTPUT);
  pinMode(39, OUTPUT);
  pinMode(40, OUTPUT);
  pinMode(41, OUTPUT);
  pinMode(42, OUTPUT);

  //Serial.begin(9600);
  //analogReference(DEFAULT);
  attachInterrupt(0, plusEins, CHANGE);
}




void loop(){
  
  druck = function;
  led1();  
  
}


void plusEins(){
if (function < 9){
  function = function + 1; 
  }
  else{
  function = 1;
  } 
  }

void aus1(){
  digitalWrite(22, HIGH);
  digitalWrite(25, HIGH);
  digitalWrite(26, HIGH);
  digitalWrite(27, HIGH);
  digitalWrite(28, HIGH);
  digitalWrite(23, HIGH);
  digitalWrite(24, HIGH);
}


void eins1(){
  digitalWrite(22, HIGH);
  digitalWrite(25, HIGH);
  digitalWrite(26, HIGH);
  digitalWrite(27, HIGH);
  digitalWrite(28, HIGH);
  digitalWrite(23, LOW);
  digitalWrite(24, LOW);
}
void zwei1(){
  digitalWrite(27, HIGH);
  digitalWrite(24, HIGH);
  digitalWrite(22, LOW);
  digitalWrite(23, LOW);
  digitalWrite(28, LOW);
  digitalWrite(26, LOW);
  digitalWrite(25, LOW);
}
void drei1(){
  digitalWrite(27, HIGH);
  digitalWrite(26, HIGH);
  digitalWrite(22, LOW);
  digitalWrite(23, LOW);
  digitalWrite(28, LOW);
  digitalWrite(24, LOW);
  digitalWrite(25, LOW);
}
void vier1(){
  digitalWrite(22, HIGH);
  digitalWrite(26, HIGH);
  digitalWrite(25, HIGH);
  digitalWrite(27, LOW);
  digitalWrite(28, LOW);
  digitalWrite(23, LOW);
  digitalWrite(24, LOW);
}
void fuenf1(){
  digitalWrite(23, HIGH);
  digitalWrite(26, HIGH);
  digitalWrite(22, LOW);
  digitalWrite(27, LOW);
  digitalWrite(28, LOW);
  digitalWrite(24, LOW);
  digitalWrite(25, LOW);
}
void sechs1(){
  digitalWrite(23, HIGH);
  digitalWrite(22, LOW);
  digitalWrite(27, LOW);
  digitalWrite(26, LOW);
  digitalWrite(25, LOW);
  digitalWrite(24, LOW);
  digitalWrite(28, LOW);
}
void sieben1(){
  digitalWrite(27, HIGH);
  digitalWrite(28, HIGH);
  digitalWrite(26, HIGH);
  digitalWrite(25, HIGH);
  digitalWrite(22, LOW);
  digitalWrite(23, LOW);
  digitalWrite(24, LOW);
}
void acht1(){
  digitalWrite(22, LOW);
  digitalWrite(27, LOW);
  digitalWrite(28, LOW);
  digitalWrite(24, LOW);
  digitalWrite(25, LOW);
  digitalWrite(26, LOW);
  digitalWrite(23, LOW);
}
void neun1(){
  digitalWrite(26, HIGH);
  digitalWrite(25, HIGH);
  digitalWrite(22, LOW);
  digitalWrite(27, LOW);
  digitalWrite(28, LOW);
  digitalWrite(23, LOW);
  digitalWrite(24, LOW);
}
void null1(){
  digitalWrite(28, HIGH);
  digitalWrite(22, LOW);
  digitalWrite(27, LOW);
  digitalWrite(26, LOW);
  digitalWrite(25, LOW);
  digitalWrite(24, LOW);
  digitalWrite(23, LOW);
}

void led1(){
  if (druck == 9){
    neun1();
    
  }
  else 
    if (druck == 8){
    acht1();

  }
  else 
    if (druck == 7){
    sieben1();

  }
  else 
    if (druck == 6){
    sechs1();

  }
  else 
    if (druck == 5){
    fuenf1();

  }
  else 
    if (druck == 4){
    vier1();

  }
  else 
    if (druck == 3){
    drei1();

  }
  else 
    if (druck == 2){
    zwei1();

  }
  else 
    if (druck == 1){
    eins1();

  }
  else 
    if(druck == 0){
    null1();

  }
}

How have you wired the button up. It sounds like you are shorting out the power supply with it rather than causing an interrupt.

Sorry about the late reply,

Last week I realized that was exactly my problem. I hadn't put a resistor before the ground and it was causing my arduino to short out. It works great now.

Thanks