Real-time systems often require precise timing for data sampling and control operations. This is usually achieved through the use of a programmable timer circuit that periodically interrupts the main processor at precise times.
Two seven-segment display digits will be used to display the time in seconds and tenths of a second (roll over from 9.9 to 0.0 and continue). The stopwatch is to be controlled with two switches:
Switch 1) start/stop timing
Switch 2) clear the display to 0
A loop in the main program is to continuously test these switches to determine when to start the timer, stop the timer, and reset (clear) the display. Whenever the stopwatch is running, the timer service routine should update the display every 0.1 second. When the stopwatch is
stopped, the display should freeze at the last time value. If the clear switch is activated while the stopwatch is stopped, the display should reset to 0.0. The clear switch should have no effect when the stopwatch is running. When the stopwatch is restarted, the time should
continue from the displayed value. Design the complete system using 8086 and peripherals.