Page 1 of 1
How do I write to I2S/DAC in stereo?
Posted: Sat Jun 06, 2020 1:33 pm
by physiii
The
i2s_adc_dac example just mirrors the left and right channels into the built in DAC1/DAC2. But I want to get a 1khz tone from DAC1 and 1khz tone with 180 degree phase shift from DAC2.
How do I
i2s_write to left/right channels separately?
Re: How do I write to I2S/DAC in stereo?
Posted: Wed Jun 10, 2020 1:03 pm
by physiii
Bump.
This seems applicable for many different projects, no one has tried to use I2S DAC1/DAC2 independently?
Re: How do I write to I2S/DAC in stereo?
Posted: Thu Jun 11, 2020 7:42 am
by ESP_Sprite
If I recall correctly, the signal needs to be 32-bit interleaved. In other words, you take the 8-bit DAC values, multiply them by 256, then concatenate the resulting two 16-bit values to get a 32-bit value. You then feed those 32-bit values to the I2S driver.
Re: How do I write to I2S/DAC in stereo?
Posted: Mon Feb 21, 2022 5:49 am
by aldolo
Hi. did you succede with stereo dac?