16-bit DAC too arduino for nice sinus waves

The I2S protocol isn't the same as the I2C as far as I remember. I also remember getting confused with the difference at first (oh sweet! this supports the protocol!...wait...). If you look at pg 9 in the datasheet it shows you how the I2C protocol works. You need to generate a 9.2 MHz bit clock (just up-down-up-down-up-down) and a feed data (LSB first) at the same rate but with a slight phase offset (2ns it says). Every 16 cycles of BCK you flip the word clock to feed the other channel.

The protocol itself is pretty simple, generating that 9.2MHz bit clock...hmm..not so much. One saving point might be that it says 9.2Mhz is the minimum rate, so you might be able to get away with 10 or 12 Mhz by dividing down the arduino's own clock.

I2S is only used in sound chips (hence inter-ic sound). It suuuure would be nice if somebody would write a library for it...WINK WINK NUDGE NUDGE

Quick digital audio primer, hopefully this helps your understanding - 16 bit sound means that for each sample you represent it by a word that has 16 "letters", those letters being 1 or 0. Obviously you can spell more words with 16 spaces than you can with 8 or 12. Now to make a sound you string a bunch of 16 bit samples together and play them back at an appropriate rate. That rate must be 2x the highest frequency you want to generate (called the Nyquist Freq). So for human hearing the highest pitch is 20kHz (really ~16kHz for most people) so you need to have your DAC spit out samples at 40kHz+. In CDs the sampling rate is 44.1kHz, and in most pro audio stuff its 48kHz (or more).

Now your DAC handles the rate thing, you just need to feed it samples. You can either blast 16 bits at it every 1/40,000th of a second - this is called parallel data - or feed it one bit at a time 16 times as fast which is called serial data. In parallel you would need 16 data lines and probably a clock line too, in serial you need 1 data line and 1 clock line.

Fun Fact - Generating sinusoidal tones for audio synthesis is kind of a pain in the neck. Generating a sinusoid of one freq easy, making one tunable over 3 decades...not so much. As Mr. Mike pointed out the easiest way digitally is to use a lookup table. More points = better sine.

I would start with a simple square or saw just to get started then go on to sines or more complex waveforms (aka wavetable synthesis).

Hope that helps / hope somebody has some idea of how to make 9.2Mhz bit clocks.