

Digclockv1
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
3PIC16F877A-I/P
DIP-40-40℃~+85℃ 10bit 14KB 20MHz 256Byte 33 368Byte 4V~5.5V 8 Bit External FLASH PIC DIP-40 Microcontrollers (MCU/MPU/SOC) ROHSMicrochip TechnologyMicrocontrollers (MCU/MPU/SOC)LM7805
TO-2630℃~+125℃ 1 1A 20V 2V 42uV 5V 62dB@(120Hz) 8mA Fixed Over Temperature Protection、Short Circuit Protection Positive TO-263 Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSYONGYUTAIVoltage Regulators - Linear, Low Drop Out (LDO) RegulatorsBC547
TO-92Bipolar (BJT)Jiangsu Changjing Electronics Technology (CJ)
README
README.md8051 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
.
├── 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 pin | Function |
|---|---|
| P1.0 | LEFT |
| P1.1 | RIGHT |
| P1.2 | UP |
| P1.3 | DOWN |
| P1.4 | BUZZER |
| P2.0 | ALARM mode select |
| P2.1 | TIMESET mode select |
| P3.2 / INT0 | MODE / configuration interrupt |
| P0 | 7-segment segment bus |
| P2.7..P2.2 | Digit 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:
hardware/fabrication/gerbers_final/The final source PCB is:
hardware/pcb/final/digclock.kicad_pcbOpening 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.
- System wired using a breadboard.
- PCB fabricated using the final version design but unassembled
- Components Assembled PCB
- 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
- Nuvoton W78E052D / W78E054D datasheet: https://www.nuvoton.com/resource-files/W78E054D_W78E052D_A13.pdf
- KiCad project files: see
hardware/
License
No license is asserted by this repository yet.
Parts
51| Qty | Value | Footprint | References |
|---|---|---|---|
| 14 | 1k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal | Rb1, Rb2, Rb3, Rb4, Rb5, Rb6, Rp1, Rp2, Rp3, Rp4, Rp5, Rp6, Rp7, Rp8 |
| 8 | 330 | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal | Rc1, Rc2, Rc3, Rc4, Rc5, Rc6, Rc7, Rc8 |
| 6 | BC547 | Package_TO_SOT_THT:TO-92_Inline | Q1, Q2, Q3, Q4, Q5, Q6 |
| 6 | D168K | Display_7Segment:D1X8K | U1, U2, U3, U4, U5, U6 |
| 2 | 33pF | Capacitor_THT:C_Radial_D5.0mm_H5.0mm_P2.00mm | C1, C2 |
| 1 | 10k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal | R1 |
| 1 | 10uF | Capacitor_THT:CP_Radial_D5.0mm_P2.00mm | C3 |
| 1 | 11.0592Mhz | Crystal:Crystal_HC49-U_Vertical | Y1 |
| 1 | 9V | Capacitor_THT:CP_Radial_D5.0mm_P2.00mm | BT1 |
| 1 | ALARM | Button_Switch_THT:SW_PUSH_6mm | SW7 |
| 1 | Buzzer | Buzzer_Beeper:Buzzer_12x9.5RM7.6 | BZ1 |
| 1 | DOWN | Button_Switch_THT:SW_PUSH_6mm | SW4 |
| 1 | LEFT | Button_Switch_THT:SW_PUSH_6mm | SW1 |
| 1 | LM7805 | Package_TO_SOT_THT:TO-220-3_Vertical | U8 |
| 1 | MODE | Button_Switch_THT:SW_PUSH_6mm | SW5 |
| 1 | RESET | Button_Switch_THT:SW_PUSH_6mm | SW8 |
| 1 | RIGHT | Button_Switch_THT:SW_PUSH_6mm | SW2 |
| 1 | TIMESET | Button_Switch_THT:SW_PUSH_6mm | SW6 |
| 1 | UP | Button_Switch_THT:SW_PUSH_6mm | SW3 |
| 1 | W78E052DDG | digikey-footprints:DIP-40_W15.24mm | U7 |
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 layers75 × 90 mm

- 2 layers191.7 × 104.9 mm

- 2 layers72.8 × 72.8 mm

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 layers200.7 × 123.2 mm

- 2 layers131.8 × 99.9 mm

- 2 layers206.2 × 138.1 mm

- 2 layers78.7 × 53.3 mm

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 mm

Datasette bridge
arvjus/Extended_RC6502_Apple1
Flash Disk Storage for RC6502 Apple1 Replica
42 partsMIT