+ Post New Thread
Results 1 to 3 of 3
  1. #1
    Newbie level 2
    Points: 21, Level: 1

    Join Date
    Jan 2017
    Posts
    2
    Helped
    0 / 0
    Points
    21
    Level
    1

    suitable processor for harmonic analysis

    i want to sample a 230v ac signal using DSP processor to analyse harmonic distortion ,calculating THD and design FIR filter.Which processor is best..I preferred TMS320C6713 or TMS320C6748..Which processor shall i choose...also please tell me the procedure to sample a real time signal...

    this is the simple input output program i have bt now hw to take the samples..
    Code:
    #include "c:\ccstudio_v3.1\c6000\dsk6713\include\dsk671 3.h"
    #include "c:\ccstudio_v3.1\c6000\dsk6713\include\dsk6713_ai c23.h"
    
    DSK6713_AIC23_Config config = { \
    0x0017, /* 0 DSK6713_AIC23_LEFTINVOL Left line input channel volume */ \
    0x0017, /* 1 DSK6713_AIC23_RIGHTINVOL Right line input channel volume */\
    0x00d8, /* 2 DSK6713_AIC23_LEFTHPVOL Left channel headphone volume */ \
    0x00d8, /* 3 DSK6713_AIC23_RIGHTHPVOL Right channel headphone volume */ \
    0x0011, /* 4 DSK6713_AIC23_ANAPATH Analog audio path control */ \
    0x0000, /* 5 DSK6713_AIC23_DIGPATH Digital audio path control */ \
    0x0000, /* 6 DSK6713_AIC23_POWERDOWN Power down control */ \
    0x0043, /* 7 DSK6713_AIC23_DIGIF Digital audio interface format */ \
    0x0081, /* 8 DSK6713_AIC23_SAMPLERATE Sample rate control */ \
    0x0001 /* 9 DSK6713_AIC23_DIGACT Digital interface activation */ \
    };
    
    
    /*
    * main() - Main code routine, initializes BSL and generates tone
    */
    
    void main()
    {
    DSK6713_AIC23_CodecHandle hCodec;
    
    Uint32 l_input, r_input,l_output, r_output;
    
    /* Initialize the board support library, must be called first */
    DSK6713_init();
    
    /* Start the codec */
    hCodec = DSK6713_AIC23_openCodec(0, &config);
    
    DSK6713_AIC23_setFreq(hCodec, 1);
    
    while(1)
    {	/* Read a sample to the left channel */
    while (!DSK6713_AIC23_read(hCodec, &l_input));
    
    /* Read a sample to the right channel */
    while (!DSK6713_AIC23_read(hCodec, &r_input)); 
    
    l_output=l_input;
    r_output=r_input;
    
    /* Send a sample to the left channel */
    while (!DSK6713_AIC23_write(hCodec, l_output));
    
    /* Send a sample to the right channel */
    while (!DSK6713_AIC23_write(hCodec, r_output));
    }
    
    /* Close the codec */
    DSK6713_AIC23_closeCodec(hCodec);
    }

    please help me
    Last edited by KlausST; 3rd January 2017 at 14:40. Reason: added code tags

    •   Alt3rd January 2017, 14:28

      advertising

        
       

  2. #2
    Super Moderator
    Points: 21,983, Level: 36
    andre_teprom's Avatar
    Join Date
    Nov 2006
    Location
    Rio de Janeiro, Brazil
    Posts
    6,721
    Helped
    820 / 820
    Points
    21,983
    Level
    36
    Blog Entries
    5

    Re: suitable processor for harmonic analysis

    I preferred TMS320C6713 or TMS320C6748..Which processor shall i choose...also please tell me the procedure to sample a real time signal...
    Both processors has float point ALU, therefore apparently shouldn't differ in matter of processing performance. I can't see what is the usefulness on using the audio codec in that application, unless to just interface the storage the process of raw data in memory. Anyway, answering your initial question "...tell me the procedure to sample a real time signal......": With a simple inspection and a certain amount of guessing, analyzing back to front...

    The following statement seems like dictating the interval at which data is aqcuired:
    Code:
    /* Read a sample to the right channel */
    while (!DSK6713_AIC23_read(hCodec, &r_input));
    So, the handler hCodec is likely enabling the next instructions:
    Code:
    l_output=l_input;
    r_output=r_input;
    Intuitively, everything leads one to believe that flag config is what defines the sample rate of the readings, but the assignment of values to this variable is not present in the above code .
    --------------------------------------------------------------------------------------------------
    Part of the world that you live in, You are the part that you're giving ( Renaissance )



    •   Alt3rd January 2017, 19:36

      advertising

        
       

  3. #3
    Newbie level 2
    Points: 21, Level: 1

    Join Date
    Jan 2017
    Posts
    2
    Helped
    0 / 0
    Points
    21
    Level
    1

    Re: suitable processor for harmonic analysis

    this is the default codings in library file..instead of audio input signal i am going to give a ac voltage signal..and display the output in CRO..i tried the steps given in manual but i am not getting the output ..i used TMS320C6713



+ Post New Thread
Please login
--[[ ]]--