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.
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...