Ken Pergola wrote: > Well, I dug up the details. Sorry, using PIC PWM module and 19.6608 > MHz crystal produced only approximations to the musical scale -- > would have drove people with perfect pitch crazy. > > > The two closest frequencies to 440 Hz were: > 441.38 > 438.86 I don't know where you got that from. It seems that a fast enough crystal gives enough resolution so that you can hit any frequency in the 440Hz range with sufficient accuracy. With a 20MHz crystal you get a 5MHz instruction rate. This is essentially what you get to divide down if using a PIC. 5MHz / 440Hz = 11,363.64 approximately. This means you could hit 5MHz / 11,363 = 440.02Hz 5MHz / 11,364 = 439.99Hz The last one is off by 32ppm, or less than .0006 of a semi-tone. Even the first one is only off by 56ppm or less than .001 semi-tones. At this rate the crystal accuracy becomes a significant portion of the overall error. Isn't that well more than good enough? ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads