cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate sine wave of two different frequencies(eg 980 HZ AND 1180 HZ) using DAC without DMA and AND send to send to 8 channels using DMux HC 4051 using HAL Librarys.?? Is there any algo or code for stm32L053r8.

MKuma.8
Associate
 
1 REPLY 1

Have a pair of phase accumulators updating at your DAC output rate, feed the high order bits to a sine table and mix the two values and output to the DAC registers.

Gating via a mux might complicate things as you're going to have to account for how fast the new level outputs/stabilizes, and how quickly the mux switches.

I wouldn't tightly constrain the concept of outputting waveforms via a DAC to the L0, figure how it gets done in a general sense, and then apply the concepts to your own situation.

Being an embedded software engineer involves writing software, prepackaged solutions to address your specific hardware choices don't just fall out of the sky by happenstance.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..