{"id":24312474,"url":"https://github.com/mytechnotalent/atmega328p_io_driver","last_synced_at":"2026-03-12T15:01:17.858Z","repository":{"id":272525809,"uuid":"916892120","full_name":"mytechnotalent/ATmega328P_IO_Driver","owner":"mytechnotalent","description":"An ATmega328P IO driver written entirely in Assembler.","archived":false,"fork":false,"pushed_at":"2025-06-08T21:36:13.000Z","size":1794,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-04T14:24:43.062Z","etag":null,"topics":["arduino","arduino-nano","arduino-platform","arduino-programming","arduino-project","assembler","assembly","atmega328p","avr","avr-programming","avrdude","input-output"],"latest_commit_sha":null,"homepage":"","language":"Assembly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mytechnotalent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-01-15T00:28:04.000Z","updated_at":"2025-06-08T21:36:17.000Z","dependencies_parsed_at":"2025-01-15T01:44:26.361Z","dependency_job_id":"197520d6-a748-4c50-b467-9b7d323e1f71","html_url":"https://github.com/mytechnotalent/ATmega328P_IO_Driver","commit_stats":null,"previous_names":["mytechnotalent/atmega328p_io_driver"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mytechnotalent/ATmega328P_IO_Driver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mytechnotalent%2FATmega328P_IO_Driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mytechnotalent%2FATmega328P_IO_Driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mytechnotalent%2FATmega328P_IO_Driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mytechnotalent%2FATmega328P_IO_Driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mytechnotalent","download_url":"https://codeload.github.com/mytechnotalent/ATmega328P_IO_Driver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mytechnotalent%2FATmega328P_IO_Driver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30429287,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T14:34:45.044Z","status":"ssl_error","status_checked_at":"2026-03-12T14:09:33.793Z","response_time":114,"last_error":"SSL_read: 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":["arduino","arduino-nano","arduino-platform","arduino-programming","arduino-project","assembler","assembly","atmega328p","avr","avr-programming","avrdude","input-output"],"created_at":"2025-01-17T08:17:53.285Z","updated_at":"2026-03-12T15:01:17.850Z","avatar_url":"https://github.com/mytechnotalent.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://raw.githubusercontent.com/mytechnotalent/ATmega328P_IO_Driver/refs/heads/main/ATmega328P%20IO%20Driver.png\"\u003e\n\n## FREE Reverse Engineering Self-Study Course [HERE](https://github.com/mytechnotalent/Reverse-Engineering-Tutorial)\n\n\u003cbr\u003e\n\n# ATmega328P IO Driver\nAn ATmega328P IO driver written entirely in Assembler.\n\n\u003cbr\u003e\n\n# Code\n```assembler\n; ===================================================================\n; Project: ATmega328P IO Driver\n; ===================================================================\n; Author: Kevin Thomas\n; E-Mail: ket189@pitt.edu\n; Version: 1.0\n; Date: 12/27/24\n; Target Device: ATmega328P (Arduino Nano)\n; Clock Frequency: 16 MHz\n; Toolchain: AVR-AS, AVRDUDE\n; License: Apache License 2.0\n; Description: This program is a simple I/O to which when a button\n;              connected to PD2 is pressed, an external LED connected\n;              to PD4 will illuminate, otherwise it will be off.\n; ===================================================================\n\n; ===================================================================\n; SYMBOLIC DEFINITIONS\n; ===================================================================\n.equ     DDRD, 0x0A               ; Data Direction Register for PORTD\n.equ     PORTD, 0x0B              ; PORTD Data Register\n.equ     PIND, 0x09               ; Input Pins Address for PORTD\n.equ     PD2, 2                   ; Pin 2 of PORTD (D2 on Nano)\n.equ     PD4, 4                   ; Pin 4 of PORTD (D4 on Nano)   \n\n; ===================================================================\n; PROGRAM ENTRY POINT\n; ===================================================================\n.global  program                  ; global label; make avail external\n.section .text                    ; start of the .text (code) section\n\n; ===================================================================\n; PROGRAM LOOP\n; ===================================================================\n; Description: Main program loop which executes all subroutines and \n;              then repeads indefinately.\n; -------------------------------------------------------------------\n; Instructions: AVR Instruction Set Manual\n;               6.87 RCALL – Relative Call to Subroutine\n;               6.90 RJMP – Relative Jump\n; ===================================================================\nprogram:\n  RCALL  Config_Pins              ; config pins\nprogram_loop:\n  RCALL  Check_Button             ; check button state; control LED\n  RJMP   program_loop             ; infinite loop\n\n; ===================================================================\n; SUBROUTINE: Config_Pins\n; ===================================================================\n; Description: Main configuration of pins on the ATmega128P Arduino \n;              Nano.\n; -------------------------------------------------------------------\n; Instructions: AVR Instruction Set Manual\n;               6.33 CBI – Clear Bit in I/O Register\n;               6.95 SBI – Set Bit in I/O Register\n;               6.88 RET – Return from Subroutine\n; ===================================================================\nConfig_Pins:\n  CBI    DDRD, PD2                ; set PD2 as input (button pin)\n  SBI    PORTD, PD2               ; enable pull-up resistor on PD2\n  SBI    DDRD, PD4                ; set PD4 as output (LED pin)\n  RET                             ; return from subroutine\n\n; ===================================================================\n; SUBROUTINE: Check_Button\n; ===================================================================\n; Description: Checks if PD2 is pressed and if so, drive LED high,\n;              otherwise drive LED low.\n; -------------------------------------------------------------------\n; Instructions: AVR Instruction Set Manual\n;               6.97 SBIS – Skip if Bit in I/O Register is Set\n;               6.96 SBIC – Skip if Bit in I/O Register is Cleared\n;               6.88 RET – Return from Subroutine\n; ===================================================================\nCheck_Button:\n  SBIS   PIND, PD2                ; skip next inst if PD2 is high\n  RCALL  LED_On                   ; if PD2 is low; BTN pressed\n  SBIC   PIND, PD2                ; skip next inst if PD2 is low\n  RCALL  LED_Off                  ; if PD2 is high; BTN not pressed\n  RET                             ; return from subroutine\n\n; ===================================================================\n; SUBROUTINE: LED_On\n; ===================================================================\n; Description: Sets PB5 high to turn on the LED.\n; -------------------------------------------------------------------\n; Instructions: AVR Instruction Set Manual\n;               6.95 SBI – Set Bit in I/O Register\n;               6.88 RET – Return from Subroutine\n; ===================================================================\nLed_On:\n  SBI    PORTD, PD4               ; set PD4 high\n  RET                             ; return from subroutine\n\n; ===================================================================\n; SUBROUTINE: LED_Off\n; ===================================================================\n; Description: Clears PB5 to turn off the LED.\n; -------------------------------------------------------------------\n; Instructions: AVR Instruction Set Manual\n;               6.33 CBI – Clear Bit in I/O Register\n;               6.88 RET – Return from Subroutine\n; ===================================================================\nLed_Off:\n  CBI    PORTD, PD4               ; set PD4 low\n  RET                             ; return from subroutine\n```\n\n\u003cbr\u003e\n\n# License\n[Apache License 2.0](https://github.com/mytechnotalent/ATmega328P_IO_Driver/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmytechnotalent%2Fatmega328p_io_driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmytechnotalent%2Fatmega328p_io_driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmytechnotalent%2Fatmega328p_io_driver/lists"}