With this code the timer works oke.
After i made the last part of the code active the timer is not working oke anymore.
/* if ( dimtime1 > dimtime2)
{ delayMicroseconds(dimtime2);
digitalWrite(AC_LOAD2, HIGH);
delayMicroseconds(10);
digitalWrite(AC_LOAD2, LOW);
delayMicroseconds( dimtime1 - dimtime2);
digitalWrite(AC_LOAD1, HIGH);
delayMicroseconds(10);
digitalWrite(AC_LOAD1, LOW);
}
else
{ delayMicroseconds(dimtime1);
digitalWrite(AC_LOAD1, HIGH);
delayMicroseconds(10);
digitalWrite(AC_LOAD1, LOW);
delayMicroseconds( dimtime2 - dimtime1);
digitalWrite(AC_LOAD2, HIGH);
delayMicroseconds(10);
digitalWrite(AC_LOAD2, LOW);
}
*/
So it looks that
attachInterrupt(0, zero_crosss_int, RISING); // Choose the zero cross interrupt # from the table above
has influence on the timer.