Dave VanHorn wrote: ......... >>With an xtal frequency of 10Mhz, your choices of PWM frequencys that will >>still give you maximum 10-bit duty cycle resolution are: >> >>2,500,000 / 256 = 9,765.625 hz >>2,500,000 / (256 * 4) = 2,441.40625 hz >>2,500,000 / (256 * 16) = 610.3515625 hz > >The chip giveth, and the chip taketh away.. >I definitely need to switch better than 9.7k, looks like 7 or even 6 bits >is about the best I'll be seeing. > >Ok, well at least I understand the machine now. Thanks :) >(Maybe the mfgrs should let us re-write their manuals for them!) > With 20 Mhz xtal, you can get 10-bit PWM at 19.53 Khz, and 8-bit at 78.12 Khz. Another thing that the 2nd gen PIC PWM system gives you is a really fine, digitally-controllable precision pulse generator. With a 20 Mhz xtal, you can get short 50 nsec pulses at up to 5 Mhz rep-rate. Because you can set 256 different values into PR2, you can get 256 adjacent rep-rates, in addition to 1024 pulsewidths. By using the /4 and /16 prescalers, you can greatly increase the overall frequency range. I wrote an appnote to this effect a while back: "AN-ECD06 - Precision 50-nsec Pulse Generation Using a PIC16C63" http://www.sni.net/~oricom/appnotes.htm best regards, - Dan Michaels Oricom Technologies =================== -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics