While I was waiting for a reply, I wrote a “writePCM()” method for the Arduino101. It uses two clocks: It uses CurieTImerOne as an interval timer, generating an interrupt once every sample period. And it uses one of the four Quark PWM timers to generate the PWM signal itself.
The technique is simple: in the sample interrupt method, it fetches the next sample (a user supplied method) and updates the PWM timer counts with that sample.
It works at 8KHz with unsigned 8bit samples, and it sounds surprisingly good because the PWM runs at 32MHz, giving it good resolution.
Unfortunately, we can’t use it since our application needs the Servo library which takes over the CurieTimerOne clock. (Now that took me a while to debug… )
This is inspiring me to create an “Arduino Head-Butt” wiki, which lists the I/O pins and computing resources used by each library. This way, you’ll know if there will be conflicts among various published libraries. Or has someone done this already?