led pwm problem

Status
Not open for further replies.

bouvett

New Member
hi,
i generated a code (attached with this post) which is made to increase/ decrease the intensity of an led depending on some input...

now i did the code and when i tested on mplab sim and proteus and it worked very fine. i then tried this practically but it works wrong, i tried this on 3 different boards and it still doesn't work...

the output through an oscilloscope was actually working well but the duty cycle is horrendous.. it has 10 steps. the first step and last work well, but the ones in between don't..
when i increment the percentage increase in duty cycle increases very little and at the last step it increases immediatly..

can anyone help please?
thanks a lot
 

Attachments

  • led code.txt
    4.3 KB · Views: 217
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…