Hello,
I'm trying to generate a PWM signal using PIC16F876
the cirtuit&code is very simple
1: read the variable resistor ( AD converter )
2: configure the PWM duty cycle with this value
but when i simulate the code in proteus.i found everything works just fine when i'm increasing the resistor value (from 0 to 10K)
but the PWM signal turns off when i decrease the resistor value
i didn't put any condition in the code...
i can't figure out what's wrong with it
please. I need help
i have uploaded the code and the circuit (attachment file)
I'm trying to generate a PWM signal using PIC16F876
the cirtuit&code is very simple
1: read the variable resistor ( AD converter )
2: configure the PWM duty cycle with this value
but when i simulate the code in proteus.i found everything works just fine when i'm increasing the resistor value (from 0 to 10K)
but the PWM signal turns off when i decrease the resistor value
i didn't put any condition in the code...
i can't figure out what's wrong with it
please. I need help
i have uploaded the code and the circuit (attachment file)
Attachments
-
21.3 KB Views: 42