Arduino 0012 available.

Well it seems that replacing the code with your two lines of code did the trick! The entire program now runs like a charm again! This makes me wonder though why the interrupts are disabled (and restored to their previous state) by the millis() function. In the wiring.c file I found the following reason: "disable interrupts while we read timer0_millis or we might get an inconsistent value (e.g. in the middle of the timer0_millis++)" but I'm not sure whether this will affect my code too. Thanks a lot anyway Mikal!

regards,
Dr. D.

P.S. I looked at the implementation of the delay() function, and now it seems to me that this statement in the Arduino reference isn't true anymore:

"Certain things do go on while the delay() function is controlling the Atmega chip however, because the delay function does not disable interrupts. Serial communication that appears at the RX pin is recorded, PWM (analogWrite) values and pin states are maintained, and interrupts will work as they should." (source: http://arduino.cc/en/Reference/Delay)

Since delay() calls millis(), and millis() disables and restores the interrupts, this means that during a delay() the interrupts are regularly switched off and on. I wonder if interrupts still keep "working as they should".