AnsweredAssumed Answered

ADAU7002 20-Bit PCM Output Format

Question asked by electronguy on Apr 24, 2014
Latest reply on May 13, 2014 by mdeterman

Decoding 8x PDM microphones coming down the path in TDM8 format, at least what I could configure using Kinetis K70 and "tricking" the FS pulse to mimic TDM8 by setting it active high, 1 bit wide, and an early frame sync so that it would line up with the TDM8 mode I see in the datasheet.  I believe I'm getting the data in from the eight microphones okay.


While attempting to convert these PCM samples, I'm running into troubles.  I assumed they were 20-bit signed integers coming in a 32-bit left-aligned word.  Yet a traditional sign extend of the MSB after shifting right 12 bits and converting to float yields a DC bias of something like 0xE0000, which leads me to think that the output may be 1's complemented.  If I complement the result, I get a bias of 0x20000 but this doesn't map to the halfway (zero) point of a 20-bit word (0x80000).


Can someone please direct me to how to convert the ADAU7002 result into a 32-bit floating point value?  Is the output a signed integer, or is it unsigned and offset by a particular bias?


FWIW, I take a block of audio samples and calculate the average in order to see what the bias could actually be.  I hate to admit it, but everything I've tried leaves me all over the map with offsets and values.


My audio sample rate is 24 kHz and I'm using 8x PDM microphones into 4x ADAU7002 coming down a TDM8 I2S channel.


Thanks for any suggestions on this somewhat perplexing issue.  I have multiple I2S channels working great but the microphones and the ADAU7002 are causing grief.