Close

I2S & DAC testing

A project log for Ultimate 4 channel audio recorder

Portable, 2 channel, balanced input, 24 bit 96khz recording

lion-mclionheadlion mclionhead 01/12/2018 at 08:380 Comments

In testing the DAC, the single ended output voltage is roughly 1.1 - 3.9 with the center at 2.5.  The DAC is 20 bits, so you need to write -0x80000 to 0x7ffff.  The ARM was configured with I2S_Standard = I2S_Standard_MSB, I2S_DataFormat = I2S_DataFormat_32b, I2S_CPOL = I2S_CPOL_Low.  The AK4524 was configured with I2S mode 1.  The I2S->DR register is written as well as read with most significant 16 bits 1st.  The ADC spits out the sample left justified & the DAC takes it in right justified.  In 96khz mode, the AK4524 drives I2S at twice the bit clock as 48khz mode but the format is the same.

Unfortunately, to minimize noise on the 5V rail, the headphone amplifier is powered by the 3.3V rail & it's DC coupled to the DAC. At least for the 440Hz test tone, the AD8604 dumps loads of current & 100% volume is far too loud.   50% volume is required to get below 3.3V & that is also quite loud.  May just risk using the 5V rail rather than make an AC coupled headphone amplifier.  Other ideas are shifting the midpoint in software to 2.2V, giving roughly 75% volume.  The output does seem to be DC coupled to the DAC.  It also has an intermittent problem of not initializing the left DAC after an ARM reboot until being power cycled.

Didn't notice any noise with the 3.3V power.  Differential output definitely isn't necessary for a simple headphone monitor.

Discussions