Hey guys,
My synth is going absolutely awesomely!
Currently, the audio output is done using two 8bit PWM outputs at ~282.5kHz. I'm writing 16 bits of data at the moment using the small snippet:
pwmWrite(2, PWMWriteVar&255);
pwmWrite(3, PWMWriteVar>>8);
Where pin 2 is connected to a junction through a 56k resistor and pin 3 is connected to the same junction through a 220ohm resistor. While this is a pretty shoddy DAC (as you can imagine, the resistors alone are partially mismatched!), I want to improve the quality.
I'm looking at using the WM8762 (http://pdf1.alldatasheet.com/datasheet-pdf/view/174592/WOLFSON/WM8762GED/RV.html) as its cheap and readily available.
My sample rate is 48kHz. Now what i'm wondering is that according to the data sheet, the MCLK needs to be fed a minimum of 128fs, up to 50MHz (I wouldn't be looking for that much oversampling obviously!), now obviously this means I need to generate a clock of 6.144MHz. Is there any way to easily do this on the maple? I know I could probably configure a spare timer to toggle an output but getting exactly 6.144MHz would require a prescaler of 11.71875 which just isn't possible!
Would the chip be likely to "complain" at a master clock of 6MHz instead? Also, how much jitter would firing an interrupt every 6MHz and writing to a GPIO cause?
If using this DAC wouldn't be a particularly good idea, are there any better ways to create a 16bit output at 48KHz? Would my current PWM method suffice with using precisely matched resistors, such as 300ohm and 76.8kohm?
Cheers,
Harris