Microcontroller › 8051 › Stopwatch using 8051 microcontroller (AT89C51) › I studied your problems and
I studied your problems and concluded that……
the problems you are facing are not due to controller you are using but due to polling used in the code, the timedelay used are not exactly of one sec.
when you press the start and stop button…. the time jumps an extra second on the LED display because there in no interrupt used so condition to stop is checked every after one second eg if at time 1.2 sec you press the stop button it will complete 2 sec and then display the time.
Instead of again and again switching the power supply on and off numerous times before you sucessfully get “000” diplayed on led you can use reset to reset the controller through 9th pin of controller(make it high to reset).
you can configure timer to get excat time for your stopwatch. through u will even get precise time in msec.
you can interface your circuit to computer by serial port or usb, but serial port is preferred as it is easy to configure and use.
you can connect two controller directly connecting the ports and connecting start pin of both controller to one switch you can have one switch for start
use interrupt pin for start and stop button.
links for timer:-
link for serial port:-