random and LEds question

Joined
Oct 10, 2008
Messages
7
Reaction score
0
how do i make LEDs less bright, i know that u need to do something with the PWM and how to generate a randon number in vhdl




also how do i search in the newsgroup
 
Joined
Mar 10, 2008
Messages
348
Reaction score
0
One more

1) Search for LFSR at the net - could be perfect for random numbers
2) Use a fast running counter - the number will be random if you stop the counter with random intervals.
 
Joined
Oct 10, 2008
Messages
7
Reaction score
0
thanks, i think i got the random numbers going, i did the counter thing, but the pwm thing im still not too sure, im using a spartan 3 and im kinda new to vhdl so i dont know where motors and stuff are located on spartan 3
 
Joined
Mar 10, 2008
Messages
348
Reaction score
0
Depend on your kit or hardware design
Most pins on a Spartan 3 could act as output and hence should it be possible to drive with a PWM signal
 
Joined
Oct 10, 2008
Messages
7
Reaction score
0
i figured most stuff out, what i still dont really quite understand is the PCM value, can anyone elaborate on that?
 
Joined
Mar 10, 2008
Messages
348
Reaction score
0
PCM = Pulse Code Modulated which means a number, value etc which gives the PWM percentance. If you a kit (BASYS, NEXYS etc) could you use the DIP switches to generate numbers like 00001100 = 12 or 10000001 = 129
 
Joined
Oct 10, 2008
Messages
7
Reaction score
0
what i meant is, how does the pcm value affects it like the higher the what and stuff
 
Joined
Mar 10, 2008
Messages
348
Reaction score
0
Well if you watch the simulation (buttom of the page link) can you see the connection between PCM and PWM
If you decide PCM=15 => 100% duty cycle (Full brightness) then PCM=7 should give say 50% duty cycle
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top