About PWM and precise delayed output of square wave

Publisher:温暖心情Latest update time:2017-11-26 Source: eefocusKeywords:PWM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Most AVR microcontrollers have PWM hardware. Today, I will explore whether the square wave generated by PWM or precise delay is more accurate. Welcome to discuss.

The editor takes the output of 4KHz square wave as an example

1. The following figure shows the 4K square wave output by the editor using PWM

   

About PWM and precise delayed output of square wave
From the figure, we can see that the frequency of PWM output is 4.03KHz;

2. Below is the output graph of the precise delay (the precise delay used by the editor is the cycles function in intrinsic.h in the IAR compiler)

About PWM and precise delayed output of square wave
From the figure we can see that the frequency of the precise delay is 4.01KHz, and it is in a state of jumping to 4KHz


Keywords:PWM Reference address:About PWM and precise delayed output of square wave

Previous article:ATmega16 fuse settings
Next article:Summary of AVR CSTACK and RSTACK

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号