Skip to the content
PCBKitNew board
2 layers130 × 95 mmDigclockv1, the printed circuit board in 3D

Bare-metal 8051 digital clock and alarm with custom KiCad PCB and assembly firmware.

Size
130 × 95 mm
Copper layers
2
Thickness
1.6 mm
Parts
51
Nets
67
Pads
211
Tracks, vias
392, 0
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
27 Sep 2026
Updated
27 Sep 2026

Overview

Digclockv1 is an open-source printed circuit board by Rishvanth-SK-2002, from the Rishvanth-SK-2002/8051-Digital-Clock repository on GitHub. It is a 2-layer board of 130 × 95 mm with 51 parts on 67 nets, routed with 392 tracks and 0 vias.

It is built around the PIC16F877A-I/P, LM7805 and BC547. Its parts include 8 ICs, 8 switches, 6 transistors, 3 capacitors and 1 resistor. It belongs with the lEDs and displays boards and the PIC boards of this library.

Main components

3

README

README.md

8051 Digital Clock with Alarm

A bare-metal digital clock and alarm project built around the Nuvoton W78E052DDG, an 8051-compatible microcontroller. The project combines firmware, a custom two-layer through-hole PCB, display multiplexing, push-button UI, an audible alarm, and multiple PCB revisions.

Project highlights

  • Nuvoton W78E052DDG 8051-compatible MCU
  • 11.0592 MHz clock source
  • Six multiplexed 7-segment displays
  • Six discrete BC547 digit drivers
  • 6-position user interface: LEFT / RIGHT / UP / DOWN / MODE / TIMESET/ALARM selection
  • Timer0-driven software time base
  • External interrupt 0 used for entering configuration mode
  • Alarm time comparison and buzzer output
  • 2-layer through-hole PCB developed through multiple revisions
  • Final PCB source, schematic, and manufacturing Gerbers included
  • Firmware is written in 8051 assembly

Repository structure

text
.
├── firmware/
│   ├── digclock.asm
│   ├── MEMORY_MAP.md
│   ├── FIRMWARE_ARCHITECTURE.md
│   ├── README.md
├── hardware/
│   ├── schematic/
│   │   ├── digclock.kicad_sch
│   │   ├── digclock.kicad_pro
│   │   ├── digclock-eagle-import.kicad_sym
│   │   └── sym-lib-table
│   ├── pcb/
│   │   ├── final/
│   │   │   └── digclock.kicad_pcb
│   │   └── revisions/
│   │       ├── v1/digclockv1.kicad_pcb
│   │       ├── v2/digclockv2.kicad_pcb
│   │       ├── v3/digclockv3.kicad_pcb
│   │       └── v4/digclockv4.kicad_pcb
│   ├── fabrication/
│   │   ├── gerbers_final/
│   │   └── historical/
│   │       ├── v2/

Firmware architecture

The firmware uses two primary interrupts:

  • INT0 / P3.2: enters the time/alarm setting interface and temporarily stops Timer0.
  • Timer0 overflow: updates the software clock counters.

The main loop multiplexes the six displays and checks the alarm buffer against the current six-byte clock field.

The software time base uses Timer0 Mode 1 with a reload of EFDBH. That corresponds to 4133 timer counts. Assuming the project's 11.0592 MHz oscillator is operated in conventional 12T mode, one overflow is approximately 4.4846 ms and 223 overflows are nominally about 1.000064 s before accounting for exact interrupt/instruction overhead.

Hardware architecture

The display uses a shared segment bus on P0 and six digit-select controls on P2.7 through P2.2. The digit-select outputs drive six transistor stages so that only one display position is active at a time.

The user-interface and alarm connections are:

MCU pinFunction
P1.0LEFT
P1.1RIGHT
P1.2UP
P1.3DOWN
P1.4BUZZER
P2.0ALARM mode select
P2.1TIMESET mode select
P3.2 / INT0MODE / configuration interrupt
P07-segment segment bus
P2.7..P2.2Digit select 1..6

PCB development

The repository deliberately keeps the numbered PCB revisions because this was the first PCB project and the revisions document the design process. The revision history is described in hardware/PCB_DESIGN_HISTORY.md.

The current manufacturing output is in:

text
hardware/fabrication/gerbers_final/

The final source PCB is:

text
hardware/pcb/final/digclock.kicad_pcb

Opening the KiCad project

Open hardware/schematic/digclock.kicad_pro in KiCad. The PCB can then be opened from the project or directly from hardware/pcb/final/digclock.kicad_pcb.

The revision .kicad_pcb files are retained as historical snapshots and do not need to be used for the final board.

Important schematic note

For ease of schematic development and unavailability of the actual IC's symbol, an imported symbol of PIC MCU was used.

Before using the schematic as the starting point for a new design, verify the MCU pin mapping against the W78E052DDG datasheet and the final PCB routing.

Photos / project presentation

Photos of the stage-by-stage progression of this project are uploaded for reference as mentioned below.

  1. System wired using a breadboard.
  2. PCB fabricated using the final version design but unassembled
  3. Components Assembled PCB
  4. Assembled PCB enclosed in a 3D-printed Enclosure.

The 3D-printed enclosure was designed by a collaborator.

Engineering context

This project demonstrates a complete small embedded product workflow:

requirements → schematic → PCB placement/routing → revision → firmware → bring-up/debug → assembled hardware → enclosure integration

The firmware is intentionally retained at the assembly level so the implementation details of interrupts, timer configuration, register banks, indirect addressing, table lookup, multiplexing, and bare-metal UI logic remain visible.

References

License

No license is asserted by this repository yet.

Parts

51
QtyValueFootprintReferences
141kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalRb1, Rb2, Rb3, Rb4, Rb5, Rb6, Rp1, Rp2, Rp3, Rp4, Rp5, Rp6, Rp7, Rp8
8330Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalRc1, Rc2, Rc3, Rc4, Rc5, Rc6, Rc7, Rc8
6BC547Package_TO_SOT_THT:TO-92_InlineQ1, Q2, Q3, Q4, Q5, Q6
6D168KDisplay_7Segment:D1X8KU1, U2, U3, U4, U5, U6
233pFCapacitor_THT:C_Radial_D5.0mm_H5.0mm_P2.00mmC1, C2
110kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1
110uFCapacitor_THT:CP_Radial_D5.0mm_P2.00mmC3
111.0592MhzCrystal:Crystal_HC49-U_VerticalY1
19VCapacitor_THT:CP_Radial_D5.0mm_P2.00mmBT1
1ALARMButton_Switch_THT:SW_PUSH_6mmSW7
1BuzzerBuzzer_Beeper:Buzzer_12x9.5RM7.6BZ1
1DOWNButton_Switch_THT:SW_PUSH_6mmSW4
1LEFTButton_Switch_THT:SW_PUSH_6mmSW1
1LM7805Package_TO_SOT_THT:TO-220-3_VerticalU8
1MODEButton_Switch_THT:SW_PUSH_6mmSW5
1RESETButton_Switch_THT:SW_PUSH_6mmSW8
1RIGHTButton_Switch_THT:SW_PUSH_6mmSW2
1TIMESETButton_Switch_THT:SW_PUSH_6mmSW6
1UPButton_Switch_THT:SW_PUSH_6mmSW3
1W78E052DDGdigikey-footprints:DIP-40_W15.24mmU7

Questions

How big is the Digclockv1 PCB?

It measures 130 × 95 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Digclockv1 use?

51 parts, built around the PIC16F877A-I/P, LM7805 and BC547. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Digclockv1 KiCad files?

From the Rishvanth-SK-2002/8051-Digital-Clock repository on GitHub, at the commit this page was made from: the board is hardware/pcb/revisions/v1/digclockv1.kicad_pcb and its schematic hardware/schematic/digclock.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Digclockv1 design in my own project?

Its repository states no licence, so its author keeps all rights: ask Rishvanth-SK-2002 before reusing the design.

Similar boards

  • 2 layers191.7 × 104.9 mmVersion current, the printed circuit board in 3D

    Version current

    oomlout/oomlout_oomp_project_src

    117 parts
  • 2 layers72.8 × 72.8 mmTACHYM, the printed circuit board in 3D

    TACHYM

    AssaadMH/power-electronics-simulation

    AC power controllers, a 0–10 V industrial dimmer, a digital tachometer and a brushless drive, designed and simulated end to end.

    23 parts1MIT
  • 2 layers131.8 × 99.9 mmUps-12v, the printed circuit board in 3D

    Ups-12v

    dilshan/12v-automatic-ups

    12V Automatic UPS system

    77 parts50MIT
  • 2 layers206.2 × 138.1 mmOric, the printed circuit board in 3D

    Oric

    Board-Folk/Oric-Remix

    Oric Remix

    133 parts4
  • 2 layers78.7 × 53.3 mmElectronic Laboratory PSU LM2596-IC, the printed circuit board in 3D

    Electronic Laboratory PSU LM2596-IC

    andres-garcia-alves/electronics-laboratory-psu-lm2596-ic

    Electronic adjustable laboratory power supply unit based on LM2596-ADJ. Output 1.4-33V@2.5A, with current limitation feature.

    29 parts1GPL-3.0
  • 2 layers83.1 × 95.3 mmDatasette bridge, the printed circuit board in 3D

    Datasette bridge

    arvjus/Extended_RC6502_Apple1

    Flash Disk Storage for RC6502 Apple1 Replica

    42 partsMIT