Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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?
 
Gayan Soyza said:
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?

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 :D
 
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.

New Articles From Microcontroller Tips

Back
Top