{"id":28471872,"url":"https://github.com/bavinnk/arduino-led-sequencer-inline-assembly-version-","last_synced_at":"2025-07-01T22:30:39.717Z","repository":{"id":295128680,"uuid":"989257664","full_name":"BavinnK/Arduino-LED-Sequencer-Inline-Assembly-Version-","owner":"BavinnK","description":" An Arduino 6-LED sequencer, rewritten from C++ to run on inline AVR assembly. It's a dive into low-level microcontroller programming, proving that assembly still has its place, even for a \"simple\" blink.","archived":false,"fork":false,"pushed_at":"2025-05-23T19:05:13.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-07T11:09:10.273Z","etag":null,"topics":["arduino-uno","assembly-language-programming","cpp","diagram","inline-assembly","simulation"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BavinnK.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-05-23T18:55:37.000Z","updated_at":"2025-05-23T19:10:38.000Z","dependencies_parsed_at":"2025-05-23T19:34:19.766Z","dependency_job_id":"a1f7195d-15f3-4e48-b8cc-9797b951851b","html_url":"https://github.com/BavinnK/Arduino-LED-Sequencer-Inline-Assembly-Version-","commit_stats":null,"previous_names":["bavinnk/arduino-led-sequencer-inline-assembly-version-"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BavinnK/Arduino-LED-Sequencer-Inline-Assembly-Version-","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BavinnK%2FArduino-LED-Sequencer-Inline-Assembly-Version-","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BavinnK%2FArduino-LED-Sequencer-Inline-Assembly-Version-/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BavinnK%2FArduino-LED-Sequencer-Inline-Assembly-Version-/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BavinnK%2FArduino-LED-Sequencer-Inline-Assembly-Version-/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BavinnK","download_url":"https://codeload.github.com/BavinnK/Arduino-LED-Sequencer-Inline-Assembly-Version-/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BavinnK%2FArduino-LED-Sequencer-Inline-Assembly-Version-/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263046019,"owners_count":23405117,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-uno","assembly-language-programming","cpp","diagram","inline-assembly","simulation"],"created_at":"2025-06-07T11:09:12.706Z","updated_at":"2025-07-01T22:30:39.667Z","avatar_url":"https://github.com/BavinnK.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Arduino LED Sequencer (Inline Assembly Version)\n\nThis project demonstrates controlling a sequence of 6 LEDs on an Arduino UNO, but with a twist: the core LED control logic is implemented using **inline AVR assembly language** within the Arduino C++ environment.\n\nThis is an evolution of a previous project that accomplished the same LED sequencing task purely in C++. About a month or two ago, it was all `digitalWrite()`. Now? Now we're talking directly to the metal!\n\n## Diagram \n![Screenshot 2025-05-23 220140](https://github.com/user-attachments/assets/c61b55a0-0cf9-4128-8769-b7caee27be10)\n\n![1](https://github.com/user-attachments/assets/5a97b115-87be-4f7e-8cf7-aadfb4e5d200)\n\n## Features\n\n*   Sequentially lights up 6 LEDs.\n*   Utilizes inline AVR assembly for the primary LED control logic.\n*   Demonstrates bit-shifting (`lsl`) in assembly to select which LED to illuminate.\n*   Directly manipulates hardware I/O ports (`PORTB`) from assembly.\n*   Shows how to pass data (the `counter` variable) from C++ to assembly.\n*   Properly preserves and restores register states (`push`/`pop`) used by the assembly block.\n\n## Hardware Requirements\n\n*   Arduino UNO (or compatible)\n*   6 x LEDs (any color)\n*   6 x Current-limiting resistors (e.g., 220Ω - 330Ω, appropriate for your LEDs and 5V)\n*   Breadboard\n*   Jumper wires\n\n## Wiring\n\nAs seen in the image, the LEDs are connected to Arduino digital pins 8 through 13. These pins correspond to PORTB (PB0 to PB5) on the ATmega328P microcontroller.\n\n1.  **LED 1 (controlled by PB0/D8):** Connect Anode to Digital Pin 8 via a resistor. Cathode to GND.\n2.  **LED 2 (controlled by PB1/D9):** Connect Anode to Digital Pin 9 via a resistor. Cathode to GND.\n3.  **LED 3 (controlled by PB2/D10):** Connect Anode to Digital Pin 10 via a resistor. Cathode to GND.\n4.  **LED 4 (controlled by PB3/D11):** Connect Anode to Digital Pin 11 via a resistor. Cathode to GND.\n5.  **LED 5 (controlled by PB4/D12):** Connect Anode to Digital Pin 12 via a resistor. Cathode to GND.\n6.  **LED 6 (controlled by PB5/D13):** Connect Anode to Digital Pin 13 via a resistor. Cathode to GND.\n\n*Ensure all LED cathodes share a common ground with the Arduino.*\n\n## Software Requirements\n\n*   Arduino IDE\n*   The AVR-GCC toolchain (this is included with the Arduino IDE)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbavinnk%2Farduino-led-sequencer-inline-assembly-version-","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbavinnk%2Farduino-led-sequencer-inline-assembly-version-","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbavinnk%2Farduino-led-sequencer-inline-assembly-version-/lists"}