Did the declaration of volatile byte dimmerCount fix your problem? If not, please post your current code.