This project is a 1Hz real-time clock built around the PIC16F877A microcontroller and the DS1307 RTC IC. The DS1307 keeps accurate time and date, communicating with the PIC using the I2C protocol. The time and date are updated and displayed every second on an HD44780 16x2 LCD.

Features:

  • Precise 1Hz timebase provided by DS1307 RTC
  • Real-time display of hours, minutes, seconds, day, month, and year
  • User-friendly interface with a standard character LCD

Design Highlights:

  • PIC16F877A is programmed in embedded C using MPLAB X IDE and XC8 compiler.
  • I2C communication leverages the PIC’s MSSP hardware module (RC3, RC4 pins).
  • LCD is operated in 8-bit mode, with control on RB0-RB2 and data on PORTD.
  • Time and date values are read every second, converted from BCD to ASCII, and formatted for the LCD.
  • 4.7kΩ pull-up resistors are used for reliable I2C operation.

Tools Used:

  • PIC16F877A Microcontroller
  • DS1307 RTC Module
  • HD44780 16x2 LCD
  • MPLAB X IDE (Firmware Development)
  • Microchip XC8 Compiler
  • Simulide (for Schematic Simulation)

If required :

  • Soldering tools & breadboard/PCB for prototyping
  • Basic electronics components (resistors, crystal oscillator, pushbuttons, etc.)

Workflow:

  • Schematic designed and verified in simulation software simulIDE.
  • Firmware coded in C and debugged using MPLAB X IDE.
  • The working clock updates every second, leveraging the DS1307’s stable 1Hz timebase.

    This clock is developed as an entry for the Hackaday 1Hz Challenge, showcasing precision and reliability in embedded electronics.