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.

How to control the brightness of a LED by PWM ?

Status
Not open for further replies.

kit_714

Member level 4
Joined
Jul 5, 2006
Messages
70
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
2,011
8051 and PWM

Dear All,

How to control the brightness of a LED by PWM in writing program?

Can anyone give me some hints??

If possible, attach some source code for reference...

Really thanks a lot...
 

Re: 8051 and PWM

kit_714 said:
Dear All,

How to control the brightness of a LED by PWM in writing program?

Can anyone give me some hints??

Control the brightness of a LED isn't difficult because a frequency of 100Hz is enough. A timer should be suitable.
But to control with PWM on the orig. PCB8031 you could use the asynchronous or synchronous output port.

kit_714 said:
If possible, attach some source code for reference...

No the 8031 is to old.

by Gomez
 

Re: 8051 and PWM

I am sorry that i still do not have any idea in program...

can anyone give me some hints on program?
 

Re: 8051 and PWM

The website attached is using assembly which i am not so familiar...

can anyone give me some source code in c??


Besides, if some hardware configuration can have a better performance, you all can suggest it and attach the circuit diagram to me...

Thanks...
 

Re: 8051 and PWM

Hi...
just make a lookup table with say 100 entries from 0-99
and use each entry as the on time for a 100ms square wave generated via a timer...
Load the LUT entries into the timer to control the brightness of LEDs (i.e controlling the PWM)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top