Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Counter (digital)
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Pulse width modulator=== Binary counters are an essential building block in digital [[pulse width modulation|pulse width modulators]], which are commonly used to control motor speed, temperature, LED brightness, and other physical processes. These can be implemented in various ways. For example, the pulse width modulator shown below uses a single binary up-counter with synchronous reset to control both the width and frequency of output pulses: [[File:PWM generator.jpg|450px|border|Digital pulse width modulator]] The value stored in the PWM period register (<math>Period</math>) determines the output frequency. <math>Count</math> increments at clock frequency <math>f_{clock}</math> until it matches <math>Period</math>, which causes the identity comparator to strobe EndCycle, thus resetting the counter and starting the next output cycle. Consequently, the counter modulus is <math>Period + 1</math> and the output pulse frequency <math>f_{out} = f_{clock} / (Period + 1)</math>. <math>Width</math> specifies the output pulse width in clock periods. The magnitude comparator asserts <math>Preview</math> while Count is less than <math>Width</math>, thus producing a pulse that starts at the beginning of the output cycle and ends when the count reaches <math>Width</math>. A flip-flop buffers <math>Preview</math> to prevent glitches from appearing on the PWM output. The [[duty cycle]] is the percentage of PWM cycle time in which the pulse is active: <math>Duty cycle = 100 * Width / (Period + 1)</math>. For example, the following diagram shows signal timing for <math>Period = 11</math> and <math>Width = 3</math>, resulting in a 25 percent duty cycle at <math>f_{clock} / 12</math> Hertz. [[File:PWM generator timing.jpg|450px|border|Example timing diagram for digital pulse width modulator with Period=11 and Width=3]]
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Counter (digital)
(section)
Add topic