{"id":21320383,"url":"https://github.com/turkeymcmac/gpsm","last_synced_at":"2026-05-22T14:16:06.078Z","repository":{"id":114506584,"uuid":"249839668","full_name":"TurkeyMcMac/gpsm","owner":"TurkeyMcMac","description":"General purpose signal multiplexer","archived":false,"fork":false,"pushed_at":"2020-06-27T12:34:42.000Z","size":29,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T11:32:09.138Z","etag":null,"topics":["arduino","avr","breadboard"],"latest_commit_sha":null,"homepage":null,"language":"Assembly","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/TurkeyMcMac.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}},"created_at":"2020-03-24T23:21:01.000Z","updated_at":"2020-06-27T12:34:44.000Z","dependencies_parsed_at":"2023-06-19T00:41:47.184Z","dependency_job_id":null,"html_url":"https://github.com/TurkeyMcMac/gpsm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TurkeyMcMac%2Fgpsm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TurkeyMcMac%2Fgpsm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TurkeyMcMac%2Fgpsm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TurkeyMcMac%2Fgpsm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TurkeyMcMac","download_url":"https://codeload.github.com/TurkeyMcMac/gpsm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243801601,"owners_count":20350105,"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","avr","breadboard"],"created_at":"2024-11-21T19:47:31.318Z","updated_at":"2026-05-22T14:16:06.073Z","avatar_url":"https://github.com/TurkeyMcMac.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GPSM (General Purpose Signal Multiplexer)\n\nThis is a program to be run on an AVR ATmega328p such as an Arduino in order to\nmultiplex port output over a UART connection. It should be pretty easily to port\nto other AVR devices.\n\n## Installation\n\nYou will need avrdude to upload the program to the AVR. Install it like so:\n\n```\n# Linux:\nsudo apt install avrdude\n\n# Mac:\nbrew install avrdude\n```\n\nAfter that, just run this:\n\n```\nmake upload port=\u003cdevice\u003e\n```\n\nwhere `\u003cdevice\u003e` is the name of the serial connection to the USB. The default is\n`/dev/ttyUSB0`. On a Mac, the device will be named starting with\n`/dev/cu.usbserial-`.\n\n## Operation\n\nPlug your AVR into your computer's USB port after doing what you will with the\npins, e.g. attaching LEDS on a breadboard. Then send data down the USB using the\nprotocol described below.\n\n### Protocol\n\nIn the protocol, each message in one byte. The most significant bit can be zero\nor one. Zero indicates the port should turn off. One indicates it should turn\non. The lower five bits specify which port to switch (so there can be at most 32\nports.) The implementation decides which number corresponds to which port. My\nimplementation numbers the ports the same as their labels on my Sparkfun board.\nTo change the numbering, see **Adapting**.\n\n### Shell interface\n\nFollowing is a method to communicate with the AVR using the Unix shell.\n\n```\nset_pin() { printf \\\\$(printf %o $(($1+$2*128))); }\nmkfifo usb\ntail -f usb \u003e /dev/ttyUSB0 \u0026 # For Linux; use /dev/cu.usbserial-... on Mac\nset_pin \u003eusb 3 1  # Turns on pin 3\nset_pin \u003eusb 3 0  # Turns off pin 3\n```\n\n## Compilation\n\nYou do not need to compile if all you are doing is uploading the program. If you\nneed to make changes, you'll have to install some stuff:\n\n```\n# Linux:\nsudo apt install gcc-avr binutils-avr avr-libc avrdude\n\n# Mac:\nbrew tap osx-cross/avr\nbrew install avr-libc\n```\n\n## Adapting\n\nThe table mapping numbers to actual pins is at the bottom of `gpsm.S`. The\nnumber is indicated by an entry's place in the table. The information specified\nis the port register (D, B, etc.) and which bit of the register to use. More\ninformation is available in `gpsm.S`.\n\n## Why write this in assembly?\n\nYes, writing it in C would improve understandability. I just wanted to try\nwriting something in assembly. This is my first substantial assembly program.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturkeymcmac%2Fgpsm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fturkeymcmac%2Fgpsm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturkeymcmac%2Fgpsm/lists"}