In this article I’ll demonstrate a digital stopwatch design based on PIC16F876A micro controller. Similar project showing a Digital Timer design can be found here. Current circuit can be used to count in minutes and seconds in two directions, UP/Down. The display is implemented using 7-Segment Common Cathode LED Displays, two for the minutes and two for seconds. Time is derived from an external Real-Time Clock (RTC) PCF8583P which is connected to the micro-controller via I2C interface.The user can operate the stopwatch in two modes: Up-count: from 00:00 to a user specified time. Down-count: from a user specified time to 00:00.Stopwatch mode selection is done by a switch, default count is down. Additional Push buttons are used for the following operations: To start and stop the timing, to reset the user set time and to set the user specified time. Also holding down UserSetTime push button will increment the time to a desired value.A buzzer was used to signal if remaining time near zero or approaching user settings by beeping every 5 seconds when the time is within 30 seconds, every 2 seconds when within 15 seconds and every second when within 5 seconds.In the next figure you can see design prototype board and schematic.
Other analogous micro controllers can be used like PIC16F88 or PIC16F877 with minimal changes to the circuit/software. The design source code was written in assembly language and can be downloaded at the bottom of the page.
Source code for this circuit was not written from scratch, instead a number of functions were taken from previous designs like multiplexing routine for 7-Segments displays, I2C communication. Current code may be not the most efficient implementation of Stopwatch design but it works. Some bugs may exist. You can see circuit operation in a short video. Design source code is here.