
Digital Electronics
Design and Implementation of a Digital Clock with Alarm and Stopwatch Using FSM
Abstract:
This project focuses on designing a digital clock with alarm and stopwatch functionality using a Finite State Machine (FSM). The system displays real-time hours, minutes, and seconds, allows users to configure an alarm, and provides stopwatch functionality with start, stop, and reset controls. It combines digital counters, decoders, display drivers, and sequential logic to implement multiple timekeeping functions in a single digital controller.
Project Description:
The project develops a multifunctional digital clock using digital logic ICs or Verilog HDL. The system consists of three operating modes:
1. Clock Mode: Displays the current time in HH:MM:SS format using six seven-segment displays.
2. Alarm Set Mode: Allows users to configure the desired alarm hour, minute, and second values.
3. Stopwatch Mode: Measures elapsed time in MM:SS.hh format with start, stop, and reset controls.
An FSM manages the operating modes, while counters maintain time values. A comparator checks whether the current clock time matches the configured alarm time. When a match occurs, a buzzer and LED provide an audible and visual alert.
Working Principle:
1. The system initializes in Clock Mode after reset.
2. A clock pulse drives the timekeeping counters.
3. Seconds, minutes, and hours are updated using suitable modulo counters.
4. The MODE button switches between Clock, Alarm Set, and Stopwatch modes.
5. In Alarm Set Mode, SET and INC buttons configure the alarm time.
6. The alarm comparator continuously checks the current time against the stored alarm time.
7. When both values match, the buzzer and LED activate.
8. In Stopwatch Mode, the START button begins counting elapsed time.
9. The STOP button pauses the stopwatch, while RESET clears the elapsed-time counters.
10. The display updates according to the selected operating mode.
Notes:
- Use an accurate clock source, such as a crystal oscillator or RTC module, for reliable timekeeping.
- Use modulo-60 counters for seconds and minutes and a modulo-24 counter for a 24-hour clock.
- Use suitable counters, flip-flops, decoders, and seven-segment display drivers.
- Implement the FSM to manage operating modes and button inputs.
- Add debouncing circuits or software filtering for physical push buttons.
- Use a comparator circuit or HDL logic to detect alarm-time matching.
- Include an alarm acknowledgement or stop button.
- The stopwatch can use centisecond resolution if the clock frequency and counter design support it.
- Simulation tools include Logisim, CircuitVerse, Proteus, ModelSim, and Vivado.
- Optional upgrades include an RTC module, battery backup, snooze function, 12/24-hour selection, and adjustable alarm tones.
- Verify counter rollover, alarm matching, mode switching, and stopwatch pause/reset operations.
Expected Outcome:
The expected outcome is a functional multifunctional digital clock capable of displaying time, setting an alarm, and measuring elapsed time using a stopwatch. The system provides audible and visual alarm alerts and supports user-controlled operating modes. The project demonstrates FSM design, digital counters, clock division, comparison logic, seven-segment display interfacing, and sequential circuit implementation for digital timekeeping applications.
All Projects




