Hey Arduino and MCU Lovers! I recently thought about implementing a small I2S Arduino program to output a sine or pulse wave, because I have trouble doing so with my university project MCUs...
However as much I can read the Arduino I2S Library reference Link:https://www.arduino.cc/en/Reference/I2S refers only to SAMD21 based boards. But why? Why there is this restriction. As much as I know to implement the I2S protocol you only have to make sure the right Data Pins are on the correct values for the correct times.
So you have a "Word Select (WS)", a "Serial Clock (SCK)" and a "Serial Data (SD)" Pin which you control in an interrupt routine which be fired at the frequency See:https://en.wikipedia.org/wiki/I²S
f_intrq = samplerate * bits per channel * channels * 2
The 2 at the end is because you need 2 Interrupts to transfer 1 Bit of Data. 1 Interrupt for the clock to get high and 1 interrupt for it to get low. So you need twice as many interrupts for this as your bit cock frequency.
And again. I don't understand why this restriction exists and hope someone which better understand of hard or software could maybe give me a quick tipp
THX for that!