Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

CCS/LAUNCHXL-F28379D: May you give me some idea how to generate sine wave with LAUNCHXL-F28379D?

$
0
0

Part Number:LAUNCHXL-F28379D

Tool/software: Code Composer Studio

I am using CCS8 coding on LAUNCHXL-F28379D to  drive DAC8564/5EVM to generate a sine wave.

I can now  succefully generate a direct voltage by outputing 24bit data to DAC8564.

But how to generate a sine wave?

I have seen on the page 50 in the document of 'sgen_mdl.pdf'   of TI'S controlSUITE the following code.

And I have also seen the struct which defines the paramters which  would be  used to generate sine wave. 

typedef struct { 
        void (*calc)(void *);
        unsigned long int freq;
        unsigned long int step_max;
        unsigned long int alpha;
        int gain;
        int offset;
        int out;
        }SGENHP_1;

(1) However, I did not see the definiton of void (*calc)(void *).

(2) It also said that this function combines loop-up table and linear interpolation method to generate a sine wave. This means I would have to first  put a 512 point table( x-> sinx) in the programme memory.

then I define the function which generate sin(x), then I will output this output  to the DAC8564 in a 20KHz interrut routine?

(3) As  I seen in the datasheet of DAC8564 that the time delay of SPI to DAC out is 10us, then what is the max frequency of sine wave which I could get for DAC8564?

May you give me some idea to generate sine wave?

Thank you! 

 


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>