Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By moodgorning
#55968
Shawn Murray wrote:
cnlohr wrote:I feel weird double-posting, but wanted to make a seprate note. Added my duplex thing here: https://github.com/cnlohr/esp8266duplexi2s/ It's a working project with it.


Anyone use this code yet? Waiting on my boards from OshPark to test with a i2s mic.


Hi Shawn, did yu ever get anywhere with this? I'm also trying to add an I2s mic to my esp setup. Would be super interested to hear any experiences you might have had
User avatar
By joachim77
#69059 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.