fixed clock running too fast on ATmega168p/ATmega328p

The original Code selects a PWM mode instead of CTC, which causes the system clock to run too fast.