2
\$\begingroup\$

I have I2S MEMS microphones (transmitters, stereo) in slave mode and a microcontroller in master mode.

enter image description here

When the WS pin iw 0 (low) the data available on the SD pin is for the left channel (microphone 1.) When the WS pin is 1 (high) the data available on the SD pin is for the right channel (microphone 2.)

enter image description here

Is the data on the left and right channels synchronized or is the right channel data delayed by a few microseconds?

Would the delay depend on the sample rate. For example, for 16kHz sample rate, the right channel data is always delayed by 62.5µS?

\$\endgroup\$

2 Answers 2

1
\$\begingroup\$

Good question! They should be synced by the clock and in theory, there should be no additional delays. In reality, there might be propagation delays due to mismatch between clocks and WS lines. The I2S spec tries to accommodate for that.

Assuming there are no propagation delays, data from each microphone is still out of sync by one word length, as they are effectively time division multiplexed.

I have some students working on a project using 6 I2S mics, and you question has inspired me to get them to measure this!

For reference, the original I2S specification can be found here.

\$\endgroup\$
0
\$\begingroup\$

The datasheet is not 100% clear on this, but based on the datasheet block diagram it would be a reasonable assumption that the samples are latched at the same WS edge, and the selection only defines when it is transmitted out.

\$\endgroup\$
3
  • \$\begingroup\$ Meaning both (Left and Right channel's) samples are taken at the same time but available to read one after another? \$\endgroup\$ Commented Apr 11, 2022 at 10:13
  • \$\begingroup\$ Is there any reference code for this? I am not sure how data is packed when using both left and right channel. \$\endgroup\$
    – Grabt234
    Commented Jan 19, 2023 at 20:27
  • \$\begingroup\$ @Grabt234 Reference code for what? There is no software as this is a how data is transferred on a bus question and diagram in the question does describe how data is packed when using two channels. If you have a new question, ask a new question. \$\endgroup\$
    – Justme
    Commented Jan 19, 2023 at 20:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.