问答

汇集网友智慧,解决技术难题

demons123

TA的家园币:10  

  • DSP28335编程问题:正弦波查找表中相位值不更新

    **main.c**Createdon:2023年10月30日*Author:DELL*/#include"DSP2833x_Device.h"//DSP2833xHeaderfileIncludeFile#include"DSP2833x_Examples.h"//DSP2833xExamplesIncludeFile#defineTABLE_SIZE128//查找表的大小#defineTABLE_SCALE32767//查找表的缩放因子typedefunsignedlongulong;floatb;floatc;floatphase=20;floatsin=0;intsin_table[TABLE_SIZE]={0,1608,3212,4808,6393,7962,9512,11039,12539,14010,15446,16846,18204,19519,20787,22005,23170,24279,25329,26319,27245,28105,28898,29621,30273,30852,31356,31785,32137,32412,32609,32728,32767,32728,32609,32412,32137,31785,31356,30852,30273,29621,28898,28105,27245,26319,25329,24279,23170,22005,20787,19519,18204,16846,15446,14010,12539,11039,9512,7962,6393,4808,3212,1608,0,-1608,-3212,-4808,-6393,-7962,-9512,-11039,-12539,-14010,-15446,-16846,-18204,-19519,-20787,-22005,-23170,-24279,-25329,-26319,-27245,-28105,-28898,-29621,-30273,-30852,-31356,-31785,-32137,-32412,-32609,-32728,-32767,-32728,-32609,-32412,-32137,-31785,-31356,-30852,-30273,-29621,-28898,-28105,-27245,-26319,-25329,-24279,-23170,-22005,-20787,-19519,-18204,-16846,-15446,-14010,-12539,-11039,-9512,-7962,-6393,-4808,-3212,-1608};voidmain(){while(1){inta=phase;sin=sin_table[a];}}各位,问大家个问题。我用ccs的watchexpression功能在线修改phase得值时,sin值并不会随着改变。哪里有问题吗?