Go Down

Topic: pins for connecting a MKRx to an I2S Microphone (Read 3605 times) previous topic - next topic

Clemens

Jun 03, 2017, 08:55 pm Last Edit: Jun 03, 2017, 08:58 pm by Clemens
In the "official" tutorial for the I2S microphone, e.g. https://www.arduino.cc/en/Tutorial/ArduinoSoundSpectrumSerialPlotter I found in the code example this snippet

Code: [Select]
Circuit:
 * Arduino/Genuino Zero, MKRZero or MKR1000 board
 * ICS43432:
   * GND connected GND
   * 3.3V connected 3.3V (Zero) or VCC (MKR1000, MKRZero)
   * WS connected to pin 0 (Zero) or pin 3 (MKR1000, MKRZero)
   * CLK connected to pin 1 (Zero) or pin 2 (MKR1000, MKRZero)
   * SD connected to pin 9 (Zero) or pin A6 (MKR1000, MKRZero)

So I would assume that I have to use e.g. for the WS (Word Select / Frame Select) pin 0 for the "normal" Arduino Zero and pin 3 for the MKR1000 and MKRZero.

But have a look at the corresponding Fritzing wiring on top of the same page:



It's the MKRx board but wiring is:
  • WS -> pin 2
  • CLK -> pin 1
  • SD -> pin A5

So what is correct? The information in the Fritzing schema or the comment in the code?

sandeepmistry

Hi @Clemens

From looking at the MKRZero variant (https://github.com/arduino/ArduinoCore-samd/blob/master/variants/mkrzero/variant.h#L147-L151):

Code: [Select]

#define I2S_DEVICE          0
#define I2S_CLOCK_GENERATOR 3
#define PIN_I2S_SD          (PIN_A6)
#define PIN_I2S_SCK         (2u)
#define PIN_I2S_FS          (3u)


The WS/FS pin is 3 and the SCK/CLK pin is 3, so the comments are correct.

Go Up