Embedded Systems & Firmware
A PWM signal has a period of 1000 counts, with the output high (1) for 250 counts of each period. What is the duty cycle?
- A75%
- B25%
- C250%
Show answer and explanation
Answer: B. 25%
The duty cycle is the fraction of each period during which the output is high: 250 ÷ 1000 = 25%. PWM (pulse-width modulation) adjusts average voltage or power by changing the high time while keeping the period constant. A microcontroller timer switches the output by comparing its counter with a compare value, so it can produce PWM continuously without CPU involvement.
- A. 75% is the fraction of time the output is low.
- B. Correct. 250 ÷ 1000 = 0.25.
- C. A fraction cannot exceed 100%.