AnsweredAssumed Answered

ADAU1761 strange I2S behavior

Question asked by eric_engineer on Jan 27, 2015
Latest reply on Jan 30, 2015 by eric_engineer

So I have an ADAU1761 that's been working pretty well, I have my filters and blocks all outputting to the headphone dac fine and everything sounds good.   I started with a sample rate of 48Khz and have since dropped it to 8khz.   I'm interfacing it with a pic micro over I2S and I want a low sample rate to store the audio in flash.  

 

To prove the I2S connection I did a loop back application in my pic32 using DMA, so I suck in 256 samples, swap buffers then record the next 256 samples while playing back the first.  I had trouble here it worked but the sound was tinny and I could hear a tone over the top of everything.  So I simplified by just using a 1Khz tone generator inside the DSP.   I should point out that when I output this to the DAC everything is clear, but loopback not so much same odd issue of the tone being not quite right.

 

Anyway to dig deeper I hooked it up to a LA and confirmed that the samples on the line are indeed the samples I'm getting in the sample buffer.   It's a repeating pattern that looks like this:

 

       

SampleHexDecimal
000
0.000125002D413B2965819
0.0002500C00001-4194303
0.000375002D413B2965819
0.000500
0.00062500D2BEC4-2965820
0.00075003FFFFE4194302
0.00087500D2BEC4-2965820
0.00100

 

Which is odd because that's more like a 3Khz tone there.   I also looked at the DAC output on a PC and it looks periodic, but it's no clean sin wave.

 

I started looking some more and have a 12.288Mhz input clock and I'm trying to get to a 8Khz sample rate on I2S.  But I see now that sample rate is limited to input clock divided by 1024?  Should I be using a lower input clock?  Or is there a way to set the sample rate of the I2S to 8Khz and run the dsp faster?  I'm just a little confused here, like I said it seems to be working except for these issues, and it works great coming out of the DAC.

 

Hopefully you guys aren't too snowed in up there.

 

Thank you,

-Eric

Outcomes