Maker Pro
Maker Pro

Pic and PWM

B

Billy

Jan 1, 1970
0
Hi all,

I've found something weird today on a pic 16f877, i'm programming an
application wich involves a PWM output, i also have a LED blinking at 1HZ on
D4 wich I use as sort of a watchdog. Problem is when I look at the pwm
signal with the scope, the duty cycle changes slightly (goes up a couple %)
when the led is on. When i disconnect the led (and the software remains the
same) the duty cycle doesn't change...
So what's up with that?

Thanks all
 
E

Eric Bohlman

Jan 1, 1970
0
Hi all,

I've found something weird today on a pic 16f877, i'm programming an
application wich involves a PWM output, i also have a LED blinking at
1HZ on D4 wich I use as sort of a watchdog. Problem is when I look at
the pwm signal with the scope, the duty cycle changes slightly (goes
up a couple %) when the led is on. When i disconnect the led (and the
software remains the same) the duty cycle doesn't change...
So what's up with that?

First place to look is power-supply decoupling. Also make sure you aren't
exceeding the limits for pin and total-port current with your LED (the
normal operating limits, *not* the absolute maximum values).
 
N

Net Hunter

Jan 1, 1970
0
PWM using timer to operate. Make sure your blinking led not using the same
timer where conflict with your pwm
 
Top