Hi everyone, I'm trying to get I2S to work on the GIGA.
I managed to get I2S OUT mode to work with the PCM5102.
It's a very strong signal.
However, when I try to use I2S IN or INOUT with the PCM1808, it starts working and then stops.
I'm using it in default mode for FMY, MD0 and MD1.
The same signals that go to the PCM5102, SCK, LRC and BCK, are used in the PCM1808.
Yellow PCM1808
Blue PCM5102
https://youtube.com/shorts/0AjbzOOxMI8?si=c6AOHk1GmjZGBXSI
Any clue ?
Thank you
Gibran
#include <Arduino_AdvancedAnalog.h>
// WS, CK, SDI, SDO, MCK
AdvancedI2S i2s(PG_10, PG_11, PG_9, PB_5, PC_4);
void setup()
{
Serial.begin(115200);
// while (!Serial)
// {
// }
// delay(2000);
if (!i2s.begin(AN_I2S_MODE_INOUT, 44100, 512, 32))
{
Serial.println("Failed to start I2S");
while (1)
;
}
Serial.println("I2S ok");
}
void loop()
{
if (i2s.available())
{
SampleBuffer rxbuf = i2s.read();
SampleBuffer txbuf = i2s.dequeue();
for (size_t i = 0; i < rxbuf.size(); i++)
{
//txbuf[i] = random(10000);
txbuf[i] = rxbuf[i];
}
rxbuf.release();
i2s.write(txbuf);
txbuf.release();
}
}