I'm a relative newbie to this so it seems like an odd question but probably one with an easy answer.
I created a sketch on my Uno and everything works right. Lots of LEDs blinking at certain intervals with some sound. When I uploaded it to my ATMmega328 the sketch works, But every once in a while the timing goes off.
To test, I simply hooked up to LEDs. One goes on for a second and off for half a second, the other goes on for 700 milliseconds and all for 500 milliseconds. They work for a while, then every once in a while one will lag in either the on or off position or both will, then they go back into sync.
I have an oscillator on pins 9 and 10 along with a 22pF capacitor on each leg.
I'm trying to figure out why the external clock is not keeping time. Did I miss a step? Did I hook up something wrong? I'm not sure what else you might need to know
Would you be kind enough to upload your sketch for people to check over? Autoformat it first using Tools | Autoformat. Then Edit | Copy for forum and paste into the forum text box.