Need help on PWM and interrupt issue

I've been using this tutorial to set up my interrupts for a few times: http://www.instructables.com/id/Arduino-Timer-Interrupts/?ALLSTEPS

It's been working great until today. I set timer1 at 2.5khz to perform the interrupt. Mainly use it as a clock and serial reading from the console. The problem is that when I use timer1, PWM on pin 9 and 10 is dead. Pin 9 is the worst one, if I try to use it as analogWrite, arduino will stall. If I use pin 10, arduino will ignore any analogWrite request. It doesn't affect pin 3 and 5. however, if I use timer0, i think it was pin 11 and 3 got affected in the same way. I'm assuming if I try to use timer2, 2 out of the 6 pins will be affected as well.

My board is UNO.

Any suggestion on how to get rid of the problem? or if you guys know the reason behind it, please do explain here. maybe PWM for PIN 3, 5, 6, 9, 10, 11 use timer0, 1, 2?

Thank you guys for the help in advance, and any reply is welcome.

The ATmega328 has hardwired PWM generators:

timer0 controls pins 5, 6 timer1 controls pins 9, 10 timer2 controls pins 11, 3

The datasheets has all the gory details, but if some code puts a timer into a non-PWM mode those pins will not do PWM anymore.

It is possible to use timer interrupts with them in a PWM mode quite happily though (timer0 does millis() and delay() in exactly this way).

MarkT: The ATmega328 has hardwired PWM generators:

timer0 controls pins 5, 6 timer1 controls pins 9, 10 timer2 controls pins 11, 3

The datasheets has all the gory details, but if some code puts a timer into a non-PWM mode those pins will not do PWM anymore.

It is possible to use timer interrupts with them in a PWM mode quite happily though (timer0 does millis() and delay() in exactly this way).

Can you elaborate on "use timer interrupts with them in a PWM mode quite happily"? Are you saying to generate timed digital pulse on my own in the timer? I think that will work.

It would appear that you are wanting to do some timer interrupts, which means that you are altering the settings of the timers to something othar than the Arduino libraries are expecting. Because you are changing the hardware yourself, other things can be expected to break. When you make low-level changes, the high-level language programming language doesn't know what you did and makes the assumption that everything is just as it wants.

You can leave the timer in a PWM mode and enable timer interrupts - there are lots of modes and they depend on the timer. The ATmega328 datasheet is the place to go for full details.

Can you post your timer1 setup code? That link has lots of stuff in it, it would be good to see what mode you are actually using on timer1