I've been using Arduino 0018 and recently switched to 0022. With some minor modifications, everything runs fine, I can compile the same code on 0018 and 0022.
The odd thing is that my PWM (on pin 2, 5,6) behaves weird when compiled with 0022; every 1 second the PWM switches off and on again. I suspect this is related to either millis(); delay(); analogreference() or analogread() commands that are repeated every 1 second.
The PWM frequency is higher than default: prescaler is set to 1 (no prescaling) and it's using 9-bits fast-PWM mode.
This problem doesn't occur when compiled with arduino 0018.
Any ideas? are millis() or delay() using a different timer in 0022 vs 0018?