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.

Variable intensity leds using generator with variable duty cycle

Status
Not open for further replies.

fpga_beginner

Newbie level 1
Newbie level 1
Joined
May 21, 2014
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
11
Hello!

I want to implement a verilog program that makes the leds on a Nexys2 board light as in the .gif attached below:
180px-Kitt_lights_animation.gif

I also made a matrix to describe better the way the leds i want to be desplayed:20140522_015028.jpg

where
-L7-L0 are the leds on the board;
-l3 is the led with full intensity light;
-l2 and l1 are the leds that have a lower progressive intensity(like l2 50% of l3 and l1 25% of l3);

I took into consideration making a circuit that lights l3 with variable intensity controlled by a value set using switches SW7-SW0 using a generator with variable duty cycle.

My problem is that i'm having trouble in understanding the concepts of implementation. I have some ideas and i've read a few posts on this subject, but can't make a full picture of it.

Any kind of help is worth.
 

Well show us some of those ideas you've got right now. Once we've seen where you are at we can make suggestions or help clear up stuff you may not quite have right.

To give you something to mull over if you have no clue where to start...
At the most basic level you'll need a counter to divide down your clock to something slow enough that you can see the motion. It looks like you need about 1/2 a second to sweep in on direction, which means you'll be sitting with a specific LED lit for 500ms/10=10ms (based on the way the l1 & l2 disappear) so make sure you have a counter that can divide down the clock input to that time interval. You'll use that divided down enable to increment your led selector. If you use a brute force approach you can used the selector in a case statement to determine which LEDs are turned on.

I'll leave it at that for the moment and let you come up with how you implement all that and let you think about how you're going to apply your PWM enable to the correct LED as the led selector increments along. If you really think about it there are some clever things you can do with generating mux selects in a weird bi-direction shift register that might be a neat way to implement this.

Regards
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top