Custom I2S with 8 devices on one data line

raygun

New member
I am working on an audio project in which I need to sample 8 PDM microphones (can't use I2S ones unfortunately, it's part of the constraint) and stream them over USB.

To do that so far I've been using the PCMD3180 which samples all of them and uses a single I2S interface to stream the samples to my microcontroller. Said microcontroller is not powerful enough so I'm considering using a teensy instead but don't have a lot of experience with it.

If I can set the I2S master (teensy) bit clock rate 256 times faster than the LRCLK, the PCMD3180 sends I2S samples from the microphones to be allocated as 4 samples on the "left" and 4 samples on the "right".

Is it something the I2S audio library can support?
 
If I can set the I2S master (teensy) bit clock rate 256 times faster than the LRCLK,

That is essentially what TDM does.

The main difference is the LRCLK with is 50% high and 50% low to indicate the left vs right channel, TDM instead replaces LRCLK with a frame sync bit which it high for just 1 clock cycle just before the beginning of each new data frame.


Is it something the I2S audio library can support?

I see the PCMD3180 at TI says is supports I2S or TDM.

Since the audio library already supports TDM, you're (probably) better off to use TDM rather than attempt an unusual I2S protocol. While the Teensy 4 hardware has extremely flexible hardware which can theoretically be configured to support almost any I2S-like digital audio streaming format, in practice that much configurability comes with several registers having dozens of setting to figure out, plus the complexity of the highly configurable DMA engine to move all the incoming data into RAM. It almost certainly can be done, but just using TDM will (probably) be much easier.
 
Back
Top