Using less pins - Audio library

Status
Not open for further replies.

Kuba0040

Well-known member
Hello,
So in my latest project I am using a Teensy 4.0 with the audio board. I noticed however (more like saw on this pin diagram: https://www.pjrc.com/store/teensy40_card10a_rev2.png ). That almost all the pins are used up by the audio library. But here is the thing. My project only uses I2S for sound input from the line level input jack and I2S for the sound output. No SD card, no nothing.
So here is my question. Can I free up some of the pins if I just don't use the SD card for example and remove the SD library from my code?
Thank You.
 
Can I free up some of the pins if I just don't use the SD card for example and remove the SD library from my code?

Yes. If you don't call SD.begin(10) in your program (even if you do include SD.h) those SPI pins aren't ever used. Well, except the shield as a pullup resistor on pin 10 which may or may not matter if you use pin 10 for something else.

Likewise, if you only use I2S input and don't create an instance of the I2S output, pin 7 isn't used by the library at all. But if you want both sound in and out, then both data pins are needed.

Any use of I2S causes the 3 clock pins to transmit I2S clocks. You also have to use I2C to configure the SGTL5000 chip, but of course I2C is a shared bus so you can connect other chips to SDA & SCL, as long as they use a different I2C address.
 
Hello,
So in my latest project I am using a Teensy 4.0 with the audio board. I noticed however (more like saw on this pin diagram: https://www.pjrc.com/store/teensy40_card10a_rev2.png ). That almost all the pins are used up by the audio library. But here is the thing. My project only uses I2S for sound input from the line level input jack and I2S for the sound output. No SD card, no nothing.
So here is my question. Can I free up some of the pins if I just don't use the SD card for example and remove the SD library from my code?
Thank You.

No not that much pins :)
Only these:
2021-07-17 16_04_52-Window.png
They are all mentioned on the audio shield page: https://www.pjrc.com/store/teensy3_audio.html
So, you want the pins from the first two rows.. :)

Edit : Plus GND and 3V3 of course.

There is a schematic which shows the needed pins, too...

Edit: Ooops Paul was faster:)
 
Status
Not open for further replies.
Back
Top