博客首页 | 排行榜 |

律动的青春

Break out!

个人档案
博文分类
PWM Period and Duty  2008-07-29 10:39

The duty registers for each channel are double buffered so that if they change while the channel is enabled,the change will NOT take effect until one of the following occurs:

 

• The effective period ends
• The counter(PWMCNTx) is written (counter resets to $00)
• The channel is disabled

 

In this way, the output of thePWMwill always be either the old duty waveform or the new duty waveform,not some variation in between. If the channel is not enabled, then writes to the duty register will go directly to the latches as well as the buffer.

 

A change in duty or period can be forced into effect “immediately” by writing the new value to the duty and/or period registers and then writing to the counter(PWMCNTx). This forces the counter to reset and the new duty and/or period values to be latched. In addition, since the counter is readable it is possible to know where the count is with respect to the duty value and software can be used to make adjustments.

 

上面的文字摘自S12的芯片资料。

类别:FreeCar |
上一篇:摄像头选型中的两个问题,请大家指点 | 下一篇:我们需要帮助
以下网友评论只代表其个人观点,不代表本网站的观点或立场