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.

产生正弦波问题



在一个30K中断频率里面使用IQ15sinPu这个函数产生50Hz正弦波,频率始终差点,只有49.4左右!

if(theta < 32768)theta += 54;

else theta = 0;

A = _IQ15sinPu(theta & 0x7FFF);

B = _IQ15sinPu((theta - 10922)&0x7FFF);

C = _IQ15sinPu((theta + 10922)&0x7FFF;

我想问问有什么办法让频率更接近50Hz?