|
在mega16的datasheet中,有以下这样一段话:
The OCR0 Register is double buffered when using any of the Pulse Width Modulation
(PWM) modes. For the normal and Clear Timer on Compare (CTC) modes of operation,
the double buffering is disabled. The double buffering synchronizes the update of the
OCR0 Compare Register to either top or bottom of the counting sequence. The synchronization
prevents the occurrence of odd-length, non-symmetrical PWM pulses, thereby
making the output glitch-free.
书上对于此段话的解释是不会产生奇边非对称的PWM,对此我一直不是很理解,难道指的是在PWM模式下我每一次对于OCR0的访问,都是先改变缓冲寄存器中的值,然后单片机将自动将OCR0的值在比较匹配时,自动填充? |
阿莫论坛20周年了!感谢大家的支持与爱护!!
知道什么是神吗?其实神本来也是人,只不过神做了人做不到的事情 所以才成了神。 (头文字D, 杜汶泽)
|