Thursday

AutoAnalogAudio Library & I2S Output Now Working on nRF52840

 AutoAnalogAudio Library & I2S Output Now Working on nRF52840

Playing around with high quality audio on the XIAO Sense 52840

Its been a while since my last post regarding I2S audio on the nRF52840, but I finally got it working!

It came down to too small of buffer sizes, plus incorrect pins used for the MAX98357A breakout board. Now that the main problems are figured out, I have it working. There are still some issues with buffering, as there are small clicks or pops here or there throughout playback, especially if the buffer sizes are too small.

To get it working with the current code from GitHub users need to enable I2S by calling the begin(); function a little differently:

aaAudio.begin(0, 1, 1);  //Setup aaAudio using DAC and I2S

This example enables the 'DAC' output using I2S within the AutoAnalogAudio library.

Valid sample rates have now been modified to standard sample rates: 16kHz, 20kHz, 32kHz & 44kHz. These are the only accepted sample rates.

I've decided to leave the PWM output as the default behavior since it is simpler in nature, gives good results and works OK with smaller buffer sizes. 

Users need to edit /src/NRF52840/AutoAnalogAudio.cpp to configure I2S Amplifier pins.

Default Arduino Pin-Out for MAX98357A on XIAO Sense 52840:

BCLK: D1

LRCK: D3

DIN: D5

SD Pin needs to be set HIGH for left output


No comments:

AutoAnalogAudio Library & I2S Output Now Working on nRF52840

  AutoAnalogAudio Library & I2S Output Now Working on nRF52840 Playing around with high quality audio on the XIAO Sense 52840 Its been a...