Skip to main content
MKuma.8
Visitor II
November 19, 2018
Question

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.

  • November 19, 2018
  • 1 reply
  • 735 views

..

    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    November 19, 2018

    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 VenmoUp vote any posts that you find helpful, it shows what's working..