On 02/01/2011 10:34, MCH wrote: > Any Assembly code examples you could point me to? How much resolution > would I need? 8-bit? 16-bit? More? I want a pretty pure sounding since > wave. I know the more the better, but certainly there is a point that is > nearing a true sine wave for practical audio purposes. 6bits is usable but noisy & distorted 8bits is what ISDN uses (with uLaw or Alaw compression) 16bits is what CDs use. The sample rate and bit resolution depend on post filtering and amount=20 of distortion you want "pretty pure sounding" can be done with 1 bit on/off at desired=20 frequency and suitable filter. So you need to define how pure sounding,=20 frequency and amplitude range and amount of analogue filtering to be used. Usually I use a 1/4 table of sine values (calculated in a spreadsheet=20 using scaled fixed point arithmetic for result where 1 =3D max int) at=20 8bit or 16 bit resolution for output to PWM register or DAC. you change=20 the DAC or PWM register at the audio sample rate. The PWM clock=20 frequency will be a minimum of PWM bits x sample rate. Sample rate is a=20 minimum of twice your highest audio frequency. Oversampling (x4, x8, x16=20 etc) allows for simpler single R C filter for desired distortion level. So pick highest speed your PWM / PIC can go at. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .