Black Lives Matter - Action and Equality. ... Adafruit joins the Stop Hate for Profit campaign.
0

nRF52840 boards and audio
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

nRF52840 boards and audio

by MikeB35 on Fri May 29, 2020 8:42 am

Hello,I'd like a clarification. If I'm not mistaken, nRF52840 does not have a built-in DAC.
Therefore, we can't use the 'audioio' module, right?
Yet I have seen articles on the Adafruit website like https://learn.adafruit.com/mp3-circuitpython-lars/overview that mention that the code can work with an nRF52840.
Can you shed some light on this?
And could the JEplayer of the https://learn.adafruit.com/pygamer-mp3-player-with-circuitpython article be transposed to nRF52840 (ex: CLUE) or is there another limitation?
Thank you in advance.
Michael

MikeB35
 
Posts: 21
Joined: Thu Feb 05, 2015 10:18 am

Re: nRF52840 boards and audio

by tannewt on Fri May 29, 2020 1:56 pm

Hi Michael,
You are correct the '840 doesn't have a DAC and audioio isn't available. However, we have `audiopwmio` that acts just like `audioio` for outputting audio via PWM. (https://circuitpython.readthedocs.io/en ... index.html) You should be able to swap it in for audioio and use JEplayer with a clue.

The only other thing that may be a problem is that the clock speed of the '840 is slower than the SAMD51 so I'm not sure how well mp3 decoding works.
~Scott

tannewt
 
Posts: 1669
Joined: Thu Oct 06, 2016 8:48 pm

Re: nRF52840 boards and audio

by MikeB35 on Sat May 30, 2020 3:18 pm

tannewt wrote:Hi Michael,
You are correct the '840 doesn't have a DAC and audioio isn't available. However, we have `audiopwmio` that acts just like `audioio` for outputting audio via PWM. (https://circuitpython.readthedocs.io/en ... index.html) You should be able to swap it in for audioio and use JEplayer with a clue.

The only other thing that may be a problem is that the clock speed of the '840 is slower than the SAMD51 so I'm not sure how well mp3 decoding works.
~Scott


Thanks a lot Scott.
I wasn't thinking about that possibility at all.
I'll test this as soon as I can.

Michael

MikeB35
 
Posts: 21
Joined: Thu Feb 05, 2015 10:18 am

Re: nRF52840 boards and audio

by tannewt on Sun May 31, 2020 9:17 pm

Cool! Let us know how it goes.

tannewt
 
Posts: 1669
Joined: Thu Oct 06, 2016 8:48 pm

Re: nRF52840 boards and audio

by MikeB35 on Mon Jun 01, 2020 11:15 am

I finally didn't try to implant the mp3 into the Feather board.

Indeed, the PWM solution suits me perfectly.
The sound quality is sufficient (wave 16kHz 16 bits).
Moreover, it is really easy to implement.

Thanks again

MikeB35
 
Posts: 21
Joined: Thu Feb 05, 2015 10:18 am

Please be positive and constructive with your questions and comments.