Arduino Projects    |   Raspberry Pi  |     Electronic Circuits   |   Electronics Reference Design Library  |   AVR    |    PIC    |    8051    |    Electronic Projects

Stopwatch using 8051 microcontroller (AT89C51)


Developed By: 
Himanshu Choudhary

A stopwatch is a timepiece that measures the amount of time between any two occurrences. Usually, at the first occurrence, the stopwatch is started while at the second it is stopped. To use it again, a reset option is also provided with the stopwatch. The total time elapsed can thus be obtained. A stopwatch is very commonly used in racing competitions and other gaming activities. The circuit given here is a digital stopwatch that displays time on four seven segment displays using 8051 microcontroller (AT89C51) .

8051 Microcontroller (AT89C51) based stopwatch


The stopwatch keeps the track of time the same way as a simple digital clock does. It is basically an up time counter that starts from 00:00. The control options are provided by means of tactile switches which are active low. This circuit uses three such switches for following operations:
Switch 1 (S1)   :           Start               
Switch 2 (S2)   :           Stop                
Switch 3 (S3)   :           Reset              
Initially when Vcc supply is provided to the circuit, the stopwatch goes in reset mode with 00:00 display state on seven segments. The stopwatch starts running when S1 is pressed. The time is displayed on four seven segments (in common anode configuration) by using the concept of multiplexing. (Also refer Digital Clock) On pressing S2, the stopwatch stops and displays the total time elapsed since the start. It can be taken to reset mode at any instant by using S3.
The seven segments are interfaced to port P2 of the microcontroller AT89C51 through its data pins (a - h). The enable pins are connected to pins 1-4 of port P1 (P1^0 – P1^3). The switches S1-S3 are connected to pins 5-7 of port P1 (P1^4 – P1^6).


Circuit Diagram



This Code is only visible to Registered users. Please Login/Register



BC547 | Transistor BC547  | PDF Datasheet
Transistor BC547
BC547 is an NPN bi-polar junction transistor. A transistor, stands for transfer of resistance, is commonly used to amplify current. A small current at its base controls a larger current...
7 Segment Display | Seven Segment LED Display
Seven Segment Display
A seven segment display is the most basic electronic display device that can display digits from 0-9. They find wide application in devices that display numeric information like digital clocks, radio, microwave ovens...
Piezo Buzzer
Piezo Buzzer
The piezo buzzer produces sound based on reverse of the piezoelectric effect. The generation of pressure variation or strain by the application of electric potential across a piezoelectric material is the underlying...
AT89C51 Microcontroller, Atmel 89C51 Controller Image
AT89C51 Microcontroller

AT89C51 is an 8-bit microcontroller and belongs to Atmel's 8051 family. ATMEL 89C51 has 4KB of Flash programmable and erasable read only memory (...

Free TI Design & Simulation Tools


WEBENCH Design Center

WEBENCH Design Environments are unique and powerful software tools that deliver customized power, lighting, filtering, clocking and sensing designs in seconds. These easy-to-use tools help you generate, optimize and simulate designs that conform to your unique specifications. They allow you to make value-based tradeoffs at a design, system and supply chain level before your design is committed to production.

Design & Simulation Tools

Power Design


Sensors, Filter, Clock and Amplifier Design

Download Tools, Models and Symbols



You are here