Feather M0 I2S pin

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
AKstudios
 
Posts: 79
Joined: Fri Jun 27, 2014 10:09 pm

Feather M0 I2S pin

Post by AKstudios »

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.

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: Feather M0 I2S pin

Post by adafruit_support_carter »

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

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

Re: Feather M0 I2S pin

Post by AKstudios »

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.

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: Feather M0 I2S pin

Post by adafruit_support_carter »

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.

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

Re: Feather M0 I2S pin

Post by AKstudios »

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.

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”