# Is there a difference between 100% duty cycle PWM and continuous current?

I was thinking that 100% duty cycle PWM always keeps output HIGH ( just like a continuous current ) but according to Proteus simulation the output still falls and rises in a very little time

Is that normal ?

• depends on the IC/output driver. Some (like my LED driver TLC59116F from Texas Instruments) cannot do 100% duty cycle, they go to more like 99.8%. That remaining 0.2% is enough to have switching waveforms for non-capacitive loads. – KyranF Nov 16 '14 at 22:17
• Does 0% give you exactly zero? There's often kind of an off-by-one thing with PWM.. if you really need 100% (but not 0%) maybe you could invert the signal. – Spehro Pefhany Nov 17 '14 at 11:00

100% duty cycle means flat dc but 99.999% duty cycle means there are still transistions so maybe the simulation has minute errors.

At least for PIC microcontrollers 100% duty cycle means the output will remain high always. This is a note in the CCP in PWM mode in a PIC18F2550:

If the PWM duty cycle value is longer than the PWM period, the CCPx pin will not be cleared.

Those extremely small falls that you see in Proteus is possibly an error in the simulation. Don't trust Proteus completely, it doesn't always work as intended, the best way is to get a breadboard and test it on a real microcontroller.

Some PWM designs divide each cycle into 2^n time slots, and some divide it into 2^n-1 time slots. If your chip or firmware does the former, then typically it cannot do continuous on (or possibly instead cannot do continuous off).

Consider 8 bit PWM, where you can set values of 0 to 255. If there are 256 time slots per cycle (2^8) then you can fill either 0..255/256 (or 1..256/256) of those slots with "ON" - thus being unable to get continuous on (or continuous off).

If you have 255 time slots per cycle (2^8-1) then 8 bit values of 0..255 could indeed fill 0..255/255 slots to allow both continuous on and continuous off.

For a light dimmer or a motor speed control, often this doesn't matter as 255/256 may be hard to distinguish from 256/256, which is why this is not always addressed. However, if you are powering electronics and really need continuous on (or continuous off), sometimes it does matter.

Smart firmware could potentially detect that the maximum value has been set (eg: 255 in the 8 bit example above) and turn off PWM, instead setting the controlled output to continuous ON. So 254 => 254/256 and 255 => 256/256 = continuous on.