Teensy 4.0 I2S library compatibility issue

Status
Not open for further replies.

nahsam

Member
I am trying to use a SPH0645 adafruit I2S compatible microphone with a teensy 4.0. While following the wiring directions (at https://learn.adafruit.com/adafruit-i2s-mems-microphone-breakout/arduino-wiring-and-test) to test the mic and confirm it is working, I keep getting a incompatible error just trying to use a I2S example. All the I2S.h libraries mention that they are only for SAMD boards. Pjrc mentions that the teensy 4.0 has I2S compatibility as well as the processor is a cortex which should be compatible. How can I get the I2S libraries loaded on to my teensy?
 
Can you post the associated text indicating the error?

Clicking the Adafruit link didn't quickly show the I2S lib used?

While the ARM'ness may be similar - there are likely architectural changes that will need adjusting as the NXP CPU's are not the same.
 
Can you post the associated text indicating the error?

Clicking the Adafruit link didn't quickly show the I2S lib used?

While the ARM'ness may be similar - there are likely architectural changes that will need adjusting as the NXP CPU's are not the same.

Its just any I2S enabled lib. For instance there is a lib called arduinosound.h that uses I2S i was trying to use but was getting a compiling error.
 
Pjrc mentions that the teensy 4.0 has I2S compatibility as well as the processor is a cortex which should be compatible. How can I get the I2S libraries loaded on to my teensy?

I2S support on Teensy is part of the Teensy Audio Library. If you've installed Teensyduino and you have Teensy selected in Tools > Boards, you can find all its examples in File > Examples > Audio.

This 31 page tutorial covers all the essential features, including I2S which is used in every part.

https://www.pjrc.com/store/audio_tutorial_kit.html

You can also find a full 45 minute walkthrough video of the entire tutorial. Of course it's best to do the tutorial yourself, but if you get stuck or you just have limited time and prefer to watch Alysia and me do it, the video might help.

One minor caveat is the tutorial was written 4 years ago with Teensy 3.2. All of it should work with Teensy 4.0, as long as you have the Rev D audio shield which works with 4.0.

For using something other that the audio shield, you will need to adapt the examples somewhat. For most I2S chips, you'll just delete the stuff which controls the STGL5000 chip and add whatever is needed to get your chip to start working (if it doesn't just turn on automatically). One thing to consider is it's all designed for Teensy to generate the clock signals (BCLK, LRCLK, MCLK), so make sure your I2S chip takes those as inputs.
 
Status
Not open for further replies.
Back
Top