interrupt delay

I have on my program an interruption whose problem is when i press a button the counter counts more than 1, and i want to know what i can do to fix this.

Your button is bouncing. I don't know how you would go about debouncing in an ISR. Perhaps you should use an external debounce chip.

and if i put a delay inside a interruption for stabilize?

You can't put delay(xx) directly in the interrupt routine, but you could count from 1 to 10,000 or something. You are better off setting a flag in the interrupt routine, then in your main program ignore the button push if the flag was already set and your program wanted to act on it again. Then read millis() and clear the flag after some time has passed.

can you put a example please?

CrossRoads is right you can't use delay() in an IRQ, so do it the "blink without delay" way ;)

only update the counter if last IRQ is longer than 20 millis ago.

#define THRESHOLD 50    // to be determined experimentally

volatile unsigned long lastIRQ = 0;
volatile unsigned long count = 0;

void irq()
  if ( millis() - lastIRQ > THRESHOLD)
    lastIRQ = millis();

in void loop

// all time related variables are of type 'unsigned long'

if (interrupt_flag == 1 && time_passed == 0){
// got a new interrupt
interrupt_time = millis();  // capture time
interrupt_flag = 0;  // clear the flag
time_passed = 1;  // flag to indicate waiting for debounce time to pass
// execute button response code

if (interrupt_flag == 1 and time_passed == 1){
      interrupt_flag = 0;
// see if enough time has passed
debounce_time = millis();
  if((debounce_time - interrupt_time)>=debounce_duration){
      time_passed = 0;  // lets next interrupt be acted on

This is the essence of Blink without Delay - lets you keep track while allowing other things to happen while you are waiting.

Crossroads when you put interrupt_flag is the name of my flag right? and where i put the counter?

interrupt_flag gets set to 1 by the interrupt service routine. debounce_time - interrupt_time is the "counter", that is checking how much time elapsed to let the mechanical button settle back to the unpressed state.