I2S Pins

frippe75
Posts: 7
Joined: Fri Sep 20, 2019 9:27 am

I2S Pins

Postby frippe75 » Sun Sep 29, 2019 7:53 am

Hi!

Naively put together a board using examples on the internet and looking at a few reference designs.
I'm still struggling to understand the required pins to get this working.

GPIO25/26 are listed as DAC1/2 ... There are two I2S channels.
My thinking was that GPIO25/26 was required for the actual ADC but alot of examples use them for the clk.

This is from working examples where DOUT is GPIO32... And no pin is connected to GPIO25/26..

Code: Select all

// The pin config as per the setup
  const i2s_pin_config_t pin_config = {
    .bck_io_num = 14,   // BCKL
    .ws_io_num = 15,    // LRCL
    .data_out_num = -1, // not used (only for speakers)
    .data_in_num = 32   // DOUT
  }; 
I understand some pins can be internally muxed from the I2S blocks to different GPIO pins.
So my hope was that I could get the following config working. But I cant..

Code: Select all

static const i2s_pin_config_t pin_config = {
    .bck_io_num = 15,               // BCKL
    .ws_io_num = 25,                // LRCL (WordSelect)
    .data_out_num = I2S_PIN_NO_CHANGE,
    .data_in_num = GPIO26               // DOUT
};
Any pointers, hints ... links to ref.

ESP_Sprite
Posts: 9589
Joined: Thu Nov 26, 2015 4:08 am

Re: I2S Pins

Postby ESP_Sprite » Mon Sep 30, 2019 7:17 am

DAC1/2 are the 2 8-bit DACs internal to the ESP32; if you want to get an analog output directly from the ESP32 you must use those two pins as the analog output pins. If you use an external DAC, you can use any available GPIO for any I2S signal.

frippe75
Posts: 7
Joined: Fri Sep 20, 2019 9:27 am

Re: I2S Pins

Postby frippe75 » Mon Sep 30, 2019 9:02 pm

Thanks for responding ESP_Sprite!

I'm connecting two MEMS microphones basically doing ADC but I guess the same applies?
MEMS Mic have been set to alternate left and right channel using the same clock signal.
But a lot of example on the internet uses this MEMS mic. And... Not using external ADC/DAC's and still using other pins.

I was almost thinking either pins could be used for DAC/ADC but all timing needed to come from pin 25/26.
So still confused.

What would be a "supported" way of getting a MEMS mic (I2S input) working. Using IS2 channel 0.

Who is online

Users browsing this forum: No registered users and 48 guests