Skip to content

Regarding i2s_frame_map #12510

Sep 25, 2023 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

The i2s_frame_map[] table is used when reading samples from an ADC, such as a MEMS microphone. Every audio sample received from an ADC is 4 bytes. There is a left and right channel sample, so 8 bytes, which is called a frame. I2S hardware devices follow the I2S protocol. Left channel is sent first, most significant bit first, followed by the Right channel. But, the I2S peripherals internal to a microcontroller do not deliver data in the same byte order that is observed in the I2S protocol. The mapping table takes the bytes received from the I2S peripheral and reorders them to make the resulting byte order consistent for all ports in MicroPython. The consistent format in MicroPython is lit…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by IFX-Anusha
Comment options

You must be logged in to vote
1 reply
@miketeachman
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants