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.

[参考译文] MSP430F6459-HIREL:如何借助 TimerB 生成400Hz DAC 输出正弦波

Guru**** 657500 points
Other Parts Discussed in Thread: MSPWARE
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1306275/msp430f6459-hirel-how-to-generate-400hz-dac-output-sin-wave-with-help-of-timerb

器件型号:MSP430F6459-HIREL
主题中讨论的其他器件:MSPWARE

您好!

我使用的示例来自  mspware SDK 中存在的 driverlib 目录,CCS 版本为11.2。

我能够使用下面提到的公式生成正弦波:

 正弦波[i]=(uint16_t)((sinf (2 * M_PI * I)/ table_size)+ 1 )* 1023.75/2.0)、表大小为256、而且我正在使用 SMCLK 时钟

如何使用 TimerB 中断  从 DAC 输出生成400Hz 正弦波形?

此致、

Mounika

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    对于400Hz 正弦波、周期为1/400 = 2.5ms。 在一个周期内有256个点。 因此、每个点的时间外观为2.5ms/256 = 9.77us。 因此、使用 TimerB 将时间间隔设置为9.77us。 然后在中断例程中更改 DAC 的输出数据。  

    此致、

    现金豪