joachim77 wrote:Hi guys,
I wanted to use a I2S microphone SPH0645 with the esp8266. Although I never finished the application (due to lack of time) I had some interesting insights.
First I downloaded and managed to run the "Unofficial Development Kit for Espressif ESP8266". It contains an i2s-full-duplex example that served as a good starting point. I.e. the example sets up a 24 bit i2s-full-duplex-transfer.
One of my main problems when reading the esp8266 technical reference manual was how to adjust the number of bits. I think they just forgot to explain it. Nevertheless the example writes 4 bits to the I2SCONV-register starting at offset 12 (I2S_BITS_MOD_S). That number can go from 0 to 15. With a scope I saw that this changed the bits from 16 to 31. So for 24 bits set the number to 8.
But the spec of the microphone SPH0645 say it requires 32 bits per sample.
Yet for my test it also worked with 31 bits. (It didn't work with 30 bits though.)
So that's it. I hope this might help someone.
Hi Joachim77,
could you share some code to show how to configure the hardware correctly? I understand most of the demo but couldn't get it to work. Maybe i'm missing something.
Thanks in advance.