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.
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
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
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.