请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:MSP430F6435 工具/软件:Code Composer Studio
我尝试使用 mu 代码中的_delay_cycles()来生成1秒延迟。
我无法生成确切的延迟、因为我不知道如何计算 提供给_delay_cycles ()的值
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.
工具/软件:Code Composer Studio
我尝试使用 mu 代码中的_delay_cycles()来生成1秒延迟。
我无法生成确切的延迟、因为我不知道如何计算 提供给_delay_cycles ()的值
以微秒为单位,不精确:((
在我的项目中使用2个 func:uDelay 和 mDelay
/* uDelay - delay Microsecunds */ void uDelay (unsigned int us){while (us--)_delay_cycles (5);}// MSP430FR5959上为8MHz、5 -手动选择的值 /* mDelay -延迟毫秒*/ void mDelay (unsigned int ms){while (while (ms-_8MHz)、MSP430FR5959上为_ 8000 ms)