Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

C code for varying brightness of LED using PWM

Status
Not open for further replies.

puppy_55

Newbie level 6
Joined
Jul 2, 2008
Messages
11
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,331
I need your help in slowly varying the brightness of an led using pwm
I need 'c' code for that.
 

Re: C code for pwm

puppy_55 said:
I need your help in slowly varying the brightness of an led using pwm
I need 'c' code for that.
No one can give you C code for that without knowing the uC family.

Also, what is so hard about it? A duty cycle of 0% = completely off, 100% duty cycle = completely on, and in-between adjusts the intensity. The other factor depends on your hardware design -- the ballast resistor will determine the current and thus the brightness throughout the range.
 

Re: C code for pwm

C code for which microcontroller?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top