AnsweredAssumed Answered

How to do audio with a DAC?

Question asked by Paul Swanson on Jun 24, 2019
Latest reply on Jun 24, 2019 by Mark Butcher

Hello,

 

I'm working with a FRDM-KL25Z and I need to produce analog audio output from the board.

 

Can anyone point me in the right direction for how this is typically done on a controller like this?

 

I've done this before on smaller 8-bit processors, but the Arm Core M0+ is quite different, plus I noticed there's DMA. My needs are fairly basic: single channel, 8-16 bit samples, 11-22khz sample rate should do it.

 

  • Can the DAC (more or less) directly retrieve its values from memory?
  • Callbacks aside, will the DAC with hardware buffer operate asynchronously to the main loop?
  • Can you recommend any good, clear example code or tutorials?

 

To be completely honest, I don't know what I don't know. Just need to be able to produce some basic audio (hopefully) without completely tying up the CPU core.

 

I'm currently working with MCUXpresso SDK, but I'll take any applicable code that I can compile and run.

 

All help will be greatly appreciated.

 

Paul Swanson

Outcomes