• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Digital Signal Processors (DSP) » C6000 Single Core DSP » C67x Single Core DSP Forum » how to view output of sine wave program in graph?
Share
C6000 Single Core DSP
  • Forums
  • Announcements
Options
  • Subscribe via RSS

Forums

how to view output of sine wave program in graph?

This question is not answered
abhishek srivastava
Posted by abhishek srivastava
on Mar 31 2012 01:33 AM
Intellectual270 points

i am not able to see proper sine wave after debugging my program for sine wave.why it is so? what changes required to get expected output/perfect sine wave after debugging.

code used:

#include <math.h>
#include "C:\Users\abhi\Downloads\DSK6713\DSK6713\c6000\dsk6713\include\dsk6713.h"
#include "C:\Users\abhi\Downloads\DSK6713\DSK6713\c6000\dsk6713\include\dsk6713_aic23.h"
#define SINE_TABLE_SIZE 96
#define PI ( ( double )3.1415927 )
#define SINE_MAX 0x7FFE //Peak value of sine wave
int sinetable[SINE_TABLE_SIZE];
DSK6713_AIC23_Config config = { \
0x0017, /* 0 DSK6713_AIC23_LEFTINVOL Left line input channel volume */ \
0x0017, /* 1 DSK6713_AIC23_RIGHTINVOL Right line input channel volume */\
0x00ff, /* 2 DSK6713_AIC23_LEFTHPVOL Left channel headphone volume */ \
0x00ff, /* 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 */ \
};
void InitSineTable( void )
{
int i;
double increment= 0;
double radian = 0;
increment = ( PI * 2 ) / SINE_TABLE_SIZE;
for ( i = 0 ; i < SINE_TABLE_SIZE ; i++ )
{
sinetable[i] = ( int )( sin( radian ) * SINE_MAX );
radian += increment;
}
}
void main()
{
int i;
DSK6713_AIC23_CodecHandle hCodec;
DSK6713_init();
InitSineTable();
hCodec = DSK6713_AIC23_openCodec(0, &config);
DSK6713_AIC23_setFreq(hCodec, 7); //Sampling rate 96 kHz
while(1)
{
for ( i = 0 ; i < SINE_TABLE_SIZE ; i++ )
{
while (!DSK6713_AIC23_write(hCodec, sinetable[i]));
while (!DSK6713_AIC23_write(hCodec, sinetable[i]));
}
}
}

expected output and actual output are attached.

why i do not find proper sinewave? have i chosen right window for graph display?

7183.actual output.doc0336.expected output.doc1638.actual output graph.doc

thank you

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • RandyP
    Posted by RandyP
    on Apr 01 2012 22:41 PM
    Guru61605 points

    Abhishek,

    abhishek srivastava
    after debugging my program for sine wave

    What do you mean by this statement? What debugging have you done? Have you verified that the contents of sinetable[] are correct?

    If no, then you cannot assume a graph would show correct data.

    If yes, then the graph arguments must be incorrect.

    Regards,
    RandyP

    Search for answers, Ask a question, click  Verify  when complete, Help others, Learn more.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • abhishek srivastava
    Posted by abhishek srivastava
    on Apr 02 2012 02:11 AM
    Intellectual270 points

    hello sir,

    i am new to DSP processors. from debugging,i intended that i have build the program successfully without errors and debug windows appears to me.

    now what to do now to see the output of my program? how to verify the content of sinetable?i could not see it in variable pane.

    what to do and how to get output for this program??

    quick response is expected.

    thank you

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • RandyP
    Posted by RandyP
    on Apr 02 2012 07:02 AM
    Guru61605 points

    Abhishek,

    Welcome to TI DSP processors. It sounds like you are also new to C programming and perhaps to the use of an Integrated Development Environment (IDE).

    You need to learn the basics of CCS, and there are training courses online to help you. Search the TI Wiki Pages for "C6000 training" (no quotes). For older training on CCS 3.3, you may need to search for the archived "C6x1x workshop" (no quotes). You can also go to TI.com and search for Training. Do not worry about the fact that these may not apply directly to the C6713, they will still help you learn to use the tools.

    Also, CCS 3.3 has good tutorials built into it. Go to the Help menu and I think that is where you find the tutorials. The newer versions of CCS are better, so if possible, update your CCS to CCSv5. You can also search the TI Wiki Pages for CCSv5 to get installation information and Getting Started Guides for CCSv5.

    There is not a short-cut to learning how to use the CCS tools other than by going through the training material. Use the labs that are provided for the version of CCS that you are running (C6000 training for CCSv5, C6x1x for CCS 3.3).

    Regards,
    RandyP

    Search for answers, Ask a question, click  Verify  when complete, Help others, Learn more.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • abhishek srivastava
    Posted by abhishek srivastava
    on Apr 04 2012 01:38 AM
    Intellectual270 points

    thank you for your detailed response. i would definitely go through with available tutorials. i am using CCS v5(evaluation).

    right now,i just need to see the output for the program (written above) as i do not have DSK available with me and trying to see output using simulator.

    for simple programs i could find output in variable pane (noticing the change in variable values as expected). but do not know a way to see graphical output.

    so could you suggest me the way to see the output for the above given program?what ever output i am getting,is it useful or waste?

    i have attached the same earlier for your reference.

    thank you.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • RandyP
    Posted by RandyP
    on Apr 04 2012 07:17 AM
    Guru61605 points

    Abhishek,

    CCSv5 is the best choice. The "evaluation" version is full-featured and is not different from the "real" version. The only difference is licensing, and there is no license fee required when using CCSv5 with the simulator or with a DSK/EVM with on-board emulation.

    Have you tried searching the Wiki or the CCSv5 built-in Help for "graph" (no quotes)? If not, try it; if yes, what have you found?

    Regards,
    RandyP

    Search for answers, Ask a question, click  Verify  when complete, Help others, Learn more.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use