{"id":25871182,"url":"https://github.com/sulaimanniazi/timer-based-digital-stopwatch","last_synced_at":"2026-03-06T11:03:06.429Z","repository":{"id":279498671,"uuid":"938694511","full_name":"SulaimanNiazi/Timer-Based-Digital-Stopwatch","owner":"SulaimanNiazi","description":"Digital stopwatch using Timer1. Displays elapsed time over UART in the format MM:SS:MS.","archived":false,"fork":false,"pushed_at":"2025-03-05T05:30:45.000Z","size":145,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T06:28:21.130Z","etag":null,"topics":["embedded","embedded-c","embedded-systems","interrupt","interrupt-driven-programs","interrupt-handler","interrupt-handling","interrupts","mplab","mplab-ide","mplabx","mplabxide","pic12f1572","pic16f877a","proteus","stopwatch","stopwatch-application","timer","uart","usart"],"latest_commit_sha":null,"homepage":"","language":"SWIG","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SulaimanNiazi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-25T11:01:50.000Z","updated_at":"2025-03-05T05:30:49.000Z","dependencies_parsed_at":"2025-02-25T22:36:56.710Z","dependency_job_id":null,"html_url":"https://github.com/SulaimanNiazi/Timer-Based-Digital-Stopwatch","commit_stats":null,"previous_names":["sulaimanniazi/timer-based-digital-stopwatch"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SulaimanNiazi/Timer-Based-Digital-Stopwatch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SulaimanNiazi%2FTimer-Based-Digital-Stopwatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SulaimanNiazi%2FTimer-Based-Digital-Stopwatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SulaimanNiazi%2FTimer-Based-Digital-Stopwatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SulaimanNiazi%2FTimer-Based-Digital-Stopwatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SulaimanNiazi","download_url":"https://codeload.github.com/SulaimanNiazi/Timer-Based-Digital-Stopwatch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SulaimanNiazi%2FTimer-Based-Digital-Stopwatch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30173359,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T07:56:45.623Z","status":"ssl_error","status_checked_at":"2026-03-06T07:55:55.621Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["embedded","embedded-c","embedded-systems","interrupt","interrupt-driven-programs","interrupt-handler","interrupt-handling","interrupts","mplab","mplab-ide","mplabx","mplabxide","pic12f1572","pic16f877a","proteus","stopwatch","stopwatch-application","timer","uart","usart"],"created_at":"2025-03-02T06:36:44.813Z","updated_at":"2026-03-06T11:03:06.400Z","avatar_url":"https://github.com/SulaimanNiazi.png","language":"SWIG","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Timer Based Digital Stopwatch\n\n## Project Overview\n\nThis project implements a digital stopwatch using the PIC12F1572 microcontroller. The stopwatch uses Timer1 to count milliseconds and displays the elapsed time over UART in the format MM:SS:MS. The project is evaluated using software simulation in MPLAB X IDE.\n\n## Objective\n\n- Implement a digital stopwatch using Timer1.\n- Display elapsed time over UART in the format MM:SS:MS.\n- Use software simulation in MPLAB X IDE to evaluate functionality.\n\n## Skills Tested\n\n- ✅ Timer configuration (1ms resolution)\n- ✅ UART data formatting (Sending real-time updates)\n- ✅ Interrupt handling\n- ✅ Software simulation debugging\n\n## Task Details\n\n1. Use Timer1 to count milliseconds.\n2. Convert time to Minutes:Seconds:Milliseconds (MM:SS:MS) format.\n3. Send the formatted time over UART every second.\n4. Use a software breakpoint in MPLAB X to verify correct time updates.\n\n## Table of Contents\n\n- [Prerequisites](#prerequisites)\n- [Building the Project](#building-the-project)\n- [Apparatus](#apparatus)\n- [Uploading to the Microcontroller](#uploading-to-the-microcontroller)\n- [Usage](#usage)\n- [Troubleshooting](#troubleshooting)\n\n## Prerequisites\n\n- MPLAB X IDE\n- XC8 Compiler\n- PIC16F877A Microcontroller\n- Proteus (optional)\n\n## Building the Project\n\n1. Open the project in MPLAB X IDE.\n2. Ensure the XC8 compiler is selected.\n3. Build the project to generate the `.hex` or `.cof` file.\n4. Alternatively, you can build the project using Visual Studio Code with the MPLAB extension. Set the project output file path, name, and extension using `Ctrl+Shift+P` and selecting \"Edit Project Properties\".\n\n## Apparatus\n\nThe circuit simulation can be found [here](./Proteus%20Simulation/).\n\nNecessary components that can't be changed:\n\n1. PIC12(L)F1572/3 microcontroller: To run the program.\n2. UART module (configured to 8bit receive with 9600 Baud rate): To receive and interpret output.\n\nOptional components depending on your circuit:\n\n1. Button: For start/stop.\n7. 1 Resistors.\n\n## Uploading to the Microcontroller\n\nAfter building the project, upload the generated `.hex` or `.cof` file to the PIC16F877A microcontroller using a suitable programmer. The file can be found in either of the following paths:\n\n1. In case of using MPLAB X IDE: [dist\\default\\debug\\Timer_Based_Digital_Stopwatch.X.debug.cof](./dist/default/debug/Timer_Based_Digital_Stopwatch.X.debug.cof)\n2. In case of using Visual Studio Code (if the file name was set as default): **out\\Timer_Based_Digital_Stopwatch\\default.hex**\n\n## Usage\n\n1. The code is largely customizable, however for changing USART pins please consult the [datasheet](https://ww1.microchip.com/downloads/en/devicedoc/40001723d.pdf)\n\n## Troubleshooting\n\n- Ensure all connections are secure and correct.\n- Verify the microcontroller is programmed with the correct `.hex` or `.cof` file.\n- Check the power supply to the microcontroller and other components.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsulaimanniazi%2Ftimer-based-digital-stopwatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsulaimanniazi%2Ftimer-based-digital-stopwatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsulaimanniazi%2Ftimer-based-digital-stopwatch/lists"}