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.

cannot view sine wave for TMS320C5416

hi all

i have got a code for TMS320C5416 for generating sine wave. sine.out file gets created without any warnings or errors but i cannot see the output graph. 

i have selected view->graph->time/frequency, but can't find any graph being plotted.

where is the problem?some settings needed to be done in graph property or somewhere else?i am not finding any way to see my graph.

please help

        .mmregs
        .def d_x,d_squr_x,d_coff,d_sinx,C_1
d_coff .sect "coeff"
        .word 01c7h
        .word 030bh
        .word 0666h
        .word 1556h
        .global _c_int00
d_x .usect "sin_vars",1
d_squr_x .usect "sin_vars",1
d_temp .usect "sin_vars",1
d_sinx .usect "sin_vars",1
C_1 .usect "sin_vars",1
        .text
_c_int00:
    STM #d_coff,AR3 ; c1=1/72,c2=1/42,c3=1/20,
                    ; c4=1/6
    STM #d_x,AR2 ; input value
    STM #C_1,AR4 ; A1, A2, A3, A4
sin_angle:
    LD #d_x,DP
    ST #6487h,d_x ; pi/4
    ST #7fffh,C_1
    SQUR *AR2+,A
    ST A,*AR2 ; AR2 -> x^2
    || LD *AR4,B ;
    MASR *AR2+,*AR3+,B,A ; (1-x^2)/72
    MPYA A ; 1-x^2(1-x^2)/72
            ; T = x^2
    STH A,*AR2
    MASR *AR2-,*AR3+,B,A ; A = 1-x^2/42(1-x^2/72)
            ; T =x^2(1-x^2/72)
    MPYA *AR2+ ; B = A(32-16)*x^2
    ST B,*AR2 ;
    || LD *AR4,B ; B = C_1
    MASR *AR2-,*AR3+,B,A ; A = 1-x^2/20(1-x^2/42(1-x^2/72)
    MPYA *AR2+ ; B = A(32-16)*x^2
    ST B,*AR2
    || LD *AR4,B
    MASR *AR2-,*AR3+,B,A ; AR2 -> d_squr_x
    MPYA d_x
    STH B, d_sinx ; sin(theta)
    RET
    .end

  • which version of CCS are you using ??

    I had issues in CCSv4

    I read somewhere tht l8re version of CCS works cool..But I havnt tried

  • i am using CCS 3.3 platinum edition on windows 7 since i donot have target hadware/emulator and this version provides me simulator for TMS320C5416

  • i wrote the code and complied and build but when viewing in graph window am not getting the wave , plz set to have a good graph of sin wave what to be changed in display will paste the code let me know what to change in graph properties

    void main()

    {

    int loop=0;

    short gain=10;

    short sine_table[8]={0,707,1000,707,0,-707,-1000,-707}

    short out_buffer[256];

    const short BUFFERLENGHT=256;

    Int i=0;

    while(1)

    {

    out_buffer[i]=sine_table[loop]*gain;

    i++;

    if(i==BUFFERLENGHT)i=0;

    if(loop<7)++loop;

    else loop=o;

    }

    this was the program build completely ,running he program ,but what to type in graph prporties

    what to set the output adres s, and all dilog box what to change to get exact sine wave