How to Fade a LED Through PIC 16f84a

Status
Not open for further replies.

Gayan Soyza

Active Member
I need to fade a led through pic 16f84a (from a single line output).
but it doesn't have any pwm function.but I heard a project done by pic16f84a,I coudn't get it.

anybody knows pls help me to do it or if cannot do it by 84a is it possible to do
with another type pic ic which has pwm.

what are the pic ics have pwm & How?
 
just create a PWM signal manualy , ie deside a freq, 1KHz is sufficient, then change its on and off time in a loop.
 

There's come code out there, which I Googled a few weeks back, for driving a radio-controlled model servo using software generated PWM on a PIC16F84.

I used it without any modification to successfully dim a small light bulb from full to zero brightness. The blub was driven via an external transistor, obviously!
 
mvadu said:
Then Why don't you post that code here..

Was that directed at me?

I could post the code here, but that would save you the effort of using Google to find it. It wouldn't take you five minutes to find it, so pull your finger out and have a go
 
You could always make a software PWM, it is very easy I have used a 16F628 mcu to control the intensities of 7 laser beams (individual control), this was done using a software based PWM.

Keep in mind that the PWM wavelength must be a constant, you can then vary the high or the low times accordingly. I could post some more info on PWM if required, but I will not post the source code as it was developed for a company by me.

thanks
arunb
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…