The 80c51 has 2 16-bit timer/counters registers which can be configured to perform a variety of operations. When configured as a timer, the timer will count from the user specified value up to the overflow value (65,535 if the timer is configured to 16-bit mode). Upon overflowing, an interrupt will be generated, at which time an interrupt service routine can be performed. Knowing this, you can measure more precise time intervals rather than rely on the arbitrary "delay" functions you have seen in previous labs.
In this lab you will build a reflex timer to measure a person's reaction time. The reflex timer works by displaying "Go!" on an LCD after a random length of time and the user will have to respond by pushing a button as quickly as possible. If the user presses the button within one second of "Go!" being displayed, you will output the reflex time, in milliseconds (10-3 seconds), on the LCD. Otherwise, you should notify the user that he or she was too slow.
Additionally, you should also detect early presses (before "Go!" has been displayed as cheat attempts and respond accordingly.
You should refer to the 8051 Pinout Diagram in assembling your circuit.
Hint: You should connect the button to your circuit in the same manner that you connected the DIP switch. Additionally, the button we will provide you has four leads, two on either side. You should use the leads on a single side, like so:

Note: You should strive to keep your board wiring looking neat and structured. Your grade depends on it.
Hint: Incremental development is the path to success. Begin with something simple. Try to answer the following questions: Does the base code compile? How do I read a value from the button? What values does the button provide under different conditions? When is my timer interrupt being called? Proceed in the same vein.
vmplayer /vmware/images/winxppro.vmx