• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
Circuits Gallery

Circuits Gallery

All about Electronics and Circuits

  • Home
  • Basics
    • Components
    • Wiring
    • Circuitry
    • Oscilloscope
    • Conductivity
  • Project
    • Using 555 Timer
    • Using Op-Amp
  • MicroController
    • PIC
  • Arduino
  • Simulation
  • Digital
  • Communication
  • How To
  • About Us

Real-Time Clock Circuit Using MCU PIC16F84A | 24 Hours Digital Clock

April 20, 2022 by Charles Clark Leave a Comment

Here I am going to teach you a simple circuit of a 24-hour digital clock display that can also be used in 12-hour format by simply loading the corresponding clock program.

Coming to the technical part, the main component of the circuit is a PIC16F84A microchip. It generates the one-second clock to run the device and also controls the seven-segment display.

Three pushbuttons are also provided to set the time. One for reset by which you can reset the complete circuit as it is connected to the reset pin of the PIC microcontroller. The other two pushbuttons are for setting hour and minute. By Pressing these buttons continuously you can increment hours and minutes.

The main feature of this real-time clock circuit is that it only draws less than 100mA, so it can be run with rechargeable batteries. By increasing the value of resistors connected to the seven-segment display you can decrease the current gain.

Circuit Diagram of Pacific Time Clock

24 HoursTime Clock Circuit Diagram

Components Required for Real-Time Clock Circuit

  1. PIC 16F84A
  2. Transistor BC548 (4-Nos)
  3. Resistor (180R-9Nos,10K,1K-4Nos)
  4. LED
  5. Capacitor(22pf2Nos)
  6. Push-button (3-Nos)
  7. Crystal 4MHz
  8. Common cathode seven segment display (4-Nos)

How to Make a Digital Clock

  • We use four common cathode seven segment displays which are connected in PORTB of the PIC.
  • The seven inputs of seven-segment displays are connected in parallel but it shows different values it is done by continuous scanning, that is if a value won’t display on the first seven-segment display activates the corresponding transistor and then sends the value through the port that is shown below.
  • To display a value on the second display activate the second transistor and send the value through PORTB.
  • This scanning is continually done by PORTA and PORTB sends the display value.
  • Three pushbuttons are used one for resetting the microcontroller and the remaining two for a set minute and hour which are connected in PORTB which scan to get a zero volt on the pins RB6and RB7.
  • An LED connected to the RB0 blinks for a second

Components Pinout

Pinout of BC548

Conclusion

24 (international time clock) to 12-hour time clock conversion can be done simply by burning the PIC microchip with the corresponding hex file of the real-time clock circuit using MCU PIC16F84A.

Filed Under: Digital, MicroController, PIC, Project

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

More To See

How Far Can You Run Low Voltage Lighting

How Far Can You Run Low Voltage Lighting? Exploring the Limits of Low Voltage Lighting Installations

What is the Difference between RC Coupling and Transformer Coupling

What is the Difference between RC Coupling and Transformer Coupling? In-Depth Guide

Oscilloscope Probe X1 X10 Difference

Oscilloscope Probe X1 X10 Difference | Detection and Compensation of Probes

How to Measure Amps on 240V Circuit With Multimeter

How to Measure Amps on 240V Circuit With Multimeter | Step-By-Step Guide

More About

  • Arduino
  • Basics
  • Circuitry
  • Communication
  • Components
  • Conductivity
  • Digital
  • How To
  • MicroController
  • Oscilloscope
  • PIC
  • Project
  • Simulation
  • Using 555 Timer
  • Using Op-Amp
  • Wiring

Footer

QUICK LINKS

  • About Us
  • Privacy Policy
  • Terms and Conditions
  • Contact

AFFILIATE DISCLOSER

Circuits Gallery is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for website owners to earn advertising fees by advertising and linking to amazon (.com, .co.uk, .ca etc) and any other website that may be affiliated with Amazon Service LLC Associates Program

© 2023 · Circuits Gallery | All Rights Reserved