How do I set PWM speed?

I hear default is around 30kHz, I need mine to be 1/16th of the clock speed, which is 16MHz.

Also, can I change this with just the USB arduino board and an ATMEGA168? I don't want to buy a dedicated burn programmer.

Thanks, I tried searching for a while but found nothing on PWM speed...

(The reason I ask is that I need to clock a chip synchronously with the arduino clock at 1MHZ and CD4024 can't work that fast.)

You can set the PWM frequency as fast as half the clock speed, but it requires some fiddling with low-level registers. You can do it all in the setup() routine, but figuring out the exact commands isn't easy. You'll need to read the ATmega168 datasheet sections on timers. Sorry I can't offer more specific advice, but feel free to ask more questions and I'll see what I can do.

No, thanks man, I eventually think I had something, but I forgot to actually write an analogOut() when testing, and Apparently, I disabled an interrupt, so now I can't load new code in unless I reburn the bootloader on through ISP.

APPARENTLY, that is. I don't know very much at all about uCs and how they work, but I have a wiring board that I might try it on.

I deleted the actual code, but it would have worked mostly fine (didn't have the right prescale, but I can multiply freq with PLL). Anyway, if you know of a simple fix, I'd love to hear it but as it looks now, I'm going to be buying a parallel to ISP cable.

Thanks for the help!

I jsut lost my post, but I do have a question:

Where can I go to larn about those commands that set specific bits in the registers. I'd be comfortable doing it in ASM if I knew how. Do you know of any places I could go to learn about that?

You want the ATmega8 or ATmega168 processor manual. They cover all of it in detail. You can find them on Atmel's site.. .products, microcontrollers, avr, mega...