View Full Version : i2s Help

11-19-2012, 02:06 AM

I am having trouble finding any documentation or examples on how to use the i2s functionality of the teensy 3.0. Any examples or redirects would be greatly appreciated.

I am trying to read an i2s interface from an adc, which is converting two analog microphone signals. The adc outputs the digital signals via i2s and we bought the teensy 3.0 because of its i2s advertisement capabilities and also because I have had great success using the teensy 2.0.

Let me know if you would like me to provide datasheets on the products I am using or if I need to be more specific in any way.


11-19-2012, 03:11 AM
This application note appears to have example code which may help you.

and Chapter 46 of the manual gives all the gory details of the registers


11-19-2012, 04:10 AM
I haven't worked on I2S yet, but I certainly will. Here's a recent thread where I answered this question.


Yes, on the Kickstarter I did indeed say the chip has I2S and I do plan to support it. I've also said many times the major Arduino functionality and USB types supported by 2.0 come first. There's been a lot of progress, but more remains to be done. I'm certainly going to do USB mouse (actually, did most of it today.... still needs testing), joystick, and midi, and major libraries like Encoder (did the first bit yesterday), OneWire, and several others before diving into audio stuff.

03-18-2014, 08:23 AM
Is I2S the same interface available on PCs as optical inputs/outputs? I would love to get audio from my PC into the Teensy 3.1 via optical cable. I know it would require an optical receiver jack.

Anyway, I did find this: https://github.com/hughpyle/teensy-i2s

03-18-2014, 10:43 AM
This this very old thread, the audio library has been developed and is currently in beta testing. The I2S part works very well, both input and output. Documentation is still somewhat sparse, but improving.


However, the optical interface is S/PDIF. There are chips that receive S/PDIF and make it available as I2S, so a board would likely need to be made with such a chip.

At time point, a USB audio interface will probably be added to Teensyduino, with connectivity into the audio library. When this might happen, I can't say.

Anyway, the main point is the audio library now exists. Much has happened since this old conversation in 2012.

03-19-2014, 06:25 AM
Oh, very cool. I was hoping there was more to the audio side.

Yeah, it did not sound right that I2S was related to SPDIF. After reading up on I2S it is supposed to be better (separation of clock), and more devices are going to start including I2S interfaces. Especially the high end dacs. Not sure what form that will take as external circuits would require a line driver. There are also I2S to SPDIF boards out there. So an optical interface may already be available.

Thanks. I will look at your library!