This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DAC8411EVM: Need help with DAC8411IDCKT

Part Number: DAC8411EVM
Other Parts Discussed in Thread: DAC8411

Hi,

I am working on a design to generate sine wave using DAC8411IDCKT interfacing with msp430, Can i get the working C source code, I tired on the internet but could not find.  

Or Any ARM controller or any reference code would do, I will modify it to suit my application. 

  • Hi,

    What difficulty are you having with this application? Is it the actual SPI communication with the device? Or creating the codes for the sine wave? Or timing the updates for the desired period?

    Here is what I would focus on first:

    1. Try just writing to the DAC.  There are many SPI examples available for using SPI on the MSP430.  You just need to tailor that code for the DAC8411.  Verify that the edge positions look correct and the data is formatted as you need.  After you have confirmed this is working, you can move on to the next step.

    2.  Configure your timers for the desired sample rate.  Generally, it is simpler to have a static number of samples per period, and then change the sample rate to adjust your sinewave frequency.  Creating a timer for the MSP430 is relatively easy, and there are many examples of that.  Once you have the timer configured, try writing a known value to the DAC on each sample and verify that your period timing is correct.  A saw-tooth wave is the simplest way to do this.

    3.  Now is the tricky part.  Calculating sin(t) functions is a bit processor-intensive, so you might have bottlenecks.  I recommend you create an array of values of an ideal sine wave.  For example, let's say you want 1000 points per period.  Use excel to calculate the array of DAC codes and store that in the MSP memory.  Then you just need to keep track of the array index when you update the DAC.

    Give this a try and let us know!

    Paul

  • Thanks Paul for the reply..

    I will try your suggestions.

    it would be great if you can share any SPI code that works with this DAC. I will  modify the code as per my application. This request is just to speed up my job!!..