Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > random and LEds question

Reply
Thread Tools

random and LEds question

 
 
Jowkar Jowkar is offline
Junior Member
Join Date: Oct 2008
Posts: 7
 
      10-10-2008
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
 
Reply With Quote
 
 
 
 
jeppe jeppe is offline
Senior Member
Join Date: Mar 2008
Location: Denmark
Posts: 348
 
      10-10-2008
Your quite right - a PWM output will be perfect in order to control a LED brigthness.

Try this link for more information: http://www.jjmk.dk/MMMI/Exercises/05...elta/index.htm

Your welcome
Jeppe
 
Reply With Quote
 
 
 
 
jeppe jeppe is offline
Senior Member
Join Date: Mar 2008
Location: Denmark
Posts: 348
 
      10-10-2008
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.
 
Reply With Quote
 
Jowkar Jowkar is offline
Junior Member
Join Date: Oct 2008
Posts: 7
 
      10-10-2008
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
 
Reply With Quote
 
jeppe jeppe is offline
Senior Member
Join Date: Mar 2008
Location: Denmark
Posts: 348
 
      10-10-2008
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
 
Reply With Quote
 
Jowkar Jowkar is offline
Junior Member
Join Date: Oct 2008
Posts: 7
 
      10-10-2008
i figured most stuff out, what i still dont really quite understand is the PCM value, can anyone elaborate on that?
 
Reply With Quote
 
jeppe jeppe is offline
Senior Member
Join Date: Mar 2008
Location: Denmark
Posts: 348
 
      10-11-2008
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
 
Reply With Quote
 
Jowkar Jowkar is offline
Junior Member
Join Date: Oct 2008
Posts: 7
 
      10-11-2008
what i meant is, how does the pcm value affects it like the higher the what and stuff
 
Reply With Quote
 
jeppe jeppe is offline
Senior Member
Join Date: Mar 2008
Location: Denmark
Posts: 348
 
      10-11-2008
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TXD and RXD leds of cisco 837 blinking fastly thiakass Hardware 0 10-14-2010 10:22 AM
Math.random() and Math.round(Math.random()) and Math.floor(Math.random()*2) VK Javascript 15 05-02-2010 03:43 PM
random.random(), random not defined!? globalrev Python 4 04-20-2008 08:12 AM
LEDs Rocker Switch Technoholic Case Modding 9 11-10-2005 09:47 AM
Cisco WIC-1ADSL - No LEDs Bobby Cisco 1 10-21-2003 05:46 PM



Advertisments