Monday

AutoAnalogAudio Library - nRF52 Now supports Successive Approximation Analog-to-Digital Converter for Audio Input

 AutoAnalogAudio Library - nRF52 Now supports SAADC

Support for Successive Approximation Analog-to-Digital Converter for Audio Input

I've been doing a lot of work on my AAAudio library lately in regards to nRF52 devices like the XIAO BLE SENSE 52840 or the Feather Express 52840, and just added support for the onboard SAADC. This allows users to capture input audio from a regular analog microphone instead of requiring I2S. 

After having developed support for PDM, PWM and I2S, this wasn't too complicated. I've grown to understand the nRF52 interface, which is really nice and user friendly, and the documentation is great.



To use the SAADC interface start up analog audio by calling the following:

aaAudio.dinPin = 1; //Where 1 represents the AIN0, 2 represents AIN1, etc...
aaAudio.begin(1, 1, 6);

Where the third option (6) enables SAADC + I2S DAC. 

Settings are as follows for the third option:

0 = PDM and/or PWM input/output

1 = Enable I2S DAC, no ADC

2 = Enable I2S ADC, no DAC

3 = Enable both I2S ADC + DAC

4 = Enable ADC on SAADC, no DAC

5 = Enable ADC on SAADC + PWM output

6 = Enable ADC on SAADC + I2S output



All in all the SAADC seems to work very well, but may require slightly larger buffer sizes than normal to function without sample loss. I am still doing initial testing & code review, but the changes have been pushed to GitHub as usual. Users can install from ZIP to test out the new code, or wait until the next release.

No comments:

AutoAnalogAudio Library - nRF52 Now supports Successive Approximation Analog-to-Digital Converter for Audio Input

 AutoAnalogAudio Library - nRF52 Now supports SAADC Support for Successive Approximation Analog-to-Digital Converter for Audio Input I'v...