A PIC16F84A Alarm Clock

Summary of A PIC16F84A Alarm Clock


This article describes a simple PIC16F84A alarm clock project designed for educational purposes, featuring timekeeping for seconds, minutes, hours, and days of the week. It utilizes four seven-segment LED displays for output and three buttons (up, down, enter) for setting start times and alarms. The device supports multiple alarms limited only by ROM space, with alerts indicated on an RA4 open collector output and a decimal point on the display. The firmware is written in MikroBasic to assist beginners.

Parts used in the PIC16F84A Alarm Clock:

  • PIC16F84A microcontroller
  • Four seven segment LED displays
  • Three adjustment buttons (up, down, enter)
  • RA4 open collector output pin
  • MikroBasic compiler

Here is a simple PIC16F84A alarm clock. This page summarizes this discussion (in french) in my forum, where Samir (aka numerique1) requested for help to build a weekly alarm clock for his school. Many thanks to him for his tests and patience.

A Alarm Clock

This clock counts seconds, minutes, hours and day of the week.
Time is displayed on 4 seven segment LED displays, and is adjustable with three buttons at start time (up, down, enter).
You can program the day of the week, hour, minute and duration of the alarms.
The number of alarms are limited by ROM space only.
The alarm is on the RA4 open collector output of the PIC, and is repeated on a decimal point of the display.

For once, the program is in BASIC (mikroBasic) and I hope it will make a good start for beginners.

First, the BASIC source code.

Schematic A Alarm Clock

Note that you can build it either for common cathod or common anode LED display.

 

For more detail: A PIC16F84A Alarm Clock

Quick Solutions to Questions related to PIC16F84A Alarm Clock:

  • What components are required to build this alarm clock?
    You need a PIC16F84A microcontroller, four seven segment LED displays, and three buttons for adjustments.
  • Can the display be configured for common cathode or common anode types?
    Yes, the design allows building it for either common cathod or common anode LED displays.
  • How many alarms can the system support?
    The number of alarms is limited only by the available ROM space.
  • Which programming language is used for the source code?
    The program is written in BASIC using the mikroBasic compiler.
  • How does the user adjust the time settings?
    Time is adjustable using three buttons labeled up, down, and enter at the start time.
  • What indicates when the alarm is active?
    The alarm activates the RA4 open collector output and repeats on a decimal point of the display.
  • Does the clock track the day of the week?
    Yes, the clock counts seconds, minutes, hours, and the day of the week.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter