资 源 简 介
I am an EECS Major at the University of California - Davis, this is my first attempt at a randomizing circuit. It is not very pretty with all the wires going everywhere, but it gets the job done. Pressing the reset button restarts the program, begins the "spinning" of the lights. Pressing the button (P1.3) Interrupts the spinning and pulls out a random number that is then displayed on the board.
The method I decided to use to choose a "random" number is a little weak. The main loop that spins the lights counts the number of rotations 1-50, I used a bitwise modulus function to look at the last digit in the counter for the result of the "random" behavior. for example, if you interrupt the spinning 36th loop, your number will be 6.
This could have been done more accurately using 2 timers, 1 timer as an input to another timer.. this is talked about in one of the tech documents. for the scope of this project, however, I chose not to delve tha