Due to high demand, expect some shipping delays at this time - orders may not ship for up to 2-3 business days.
0

Feather M0 I2S pin
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Feather M0 I2S pin

by AKstudios on Thu Jan 20, 2022 7:14 am

I'm using a feather M0 (with RFM69 radio) with an I2S microphone breakout: https://www.adafruit.com/product/3421

I'm following this tutorial: https://learn.adafruit.com/adafruit-i2s ... -breakout/

The question I have is: can the data out pin be connected to any other pin apart from pin 9? I already have pin 9 in my circuit used for something else and it would be convenient if I can simply change this in the library, but I do not see an option for setting this pin anywhere.

AKstudios
 
Posts: 79
Joined: Fri Jun 27, 2014 10:09 pm

Re: Feather M0 I2S pin

by adafruit_support_carter on Thu Jan 20, 2022 12:06 pm

Unfortunately, no. The output uses the I2S peripheral on the SAMD21, which is only available on specific pins.

adafruit_support_carter
 
Posts: 23496
Joined: Tue Nov 29, 2016 2:45 pm

Re: Feather M0 I2S pin

by AKstudios on Thu Jan 20, 2022 3:37 pm

Thanks for the reply. As far as I can see, the SAMD21 has a 2 channel I2S peripheral. There are two SD pins on the chip: https://ww1.microchip.com/downloads/en/ ... 01882F.pdf

Even on the feather, it is marked on the pinout diagram here: https://cdn-learn.adafruit.com/assets/a ... 1504886606
I2SD0 is on pin 9 as well as pin 12.

So this theoretically can be changed, it just looks like it's hard-coded to pin 9 either in the library or the board definition somewhere, not sure.

I would like to know if it's possible to change it from pin 9 to pin 12.

AKstudios
 
Posts: 79
Joined: Fri Jun 27, 2014 10:09 pm

Re: Feather M0 I2S pin

by adafruit_support_carter on Thu Jan 20, 2022 4:06 pm

So this theoretically can be changed, it just looks like it's hard-coded to pin 9 either in the library or the board definition somewhere, not sure.


Correct.

Not seeing any reference to this in the documentation:
https://www.arduino.cc/en/Reference/I2S
but looking at the source code, it appears the constructor can take additional parameters:
https://github.com/arduino/ArduinoCore- ... /I2S.h#L38

So there may be a way? Just not available on *any* pins.

adafruit_support_carter
 
Posts: 23496
Joined: Tue Nov 29, 2016 2:45 pm

Re: Feather M0 I2S pin

by AKstudios on Sat Jan 22, 2022 7:04 pm

Yes, you're correct, it's not *any* pin, just the ones that can be used for the I2S peripheral.

In the library you shared, it's not very apparent where those pins are defined. If I have to change it, would it be a board definition change? I don't see where the constructor is pulling the sdPin from.

AKstudios
 
Posts: 79
Joined: Fri Jun 27, 2014 10:09 pm

Please be positive and constructive with your questions and comments.