{"id":17825742,"url":"https://github.com/edgar-bonet/tiny-morse-decoder","last_synced_at":"2025-03-18T20:30:50.658Z","repository":{"id":97524138,"uuid":"122106453","full_name":"edgar-bonet/tiny-morse-decoder","owner":"edgar-bonet","description":"A Morse code to logic-level serial converter for ATtiny13A/25/45/85","archived":false,"fork":false,"pushed_at":"2020-12-10T09:15:05.000Z","size":37,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T12:07:54.880Z","etag":null,"topics":["attiny","attiny13a","attiny25","attiny45","attiny85","avr","morse-code"],"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/edgar-bonet.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":"2018-02-19T18:55:50.000Z","updated_at":"2024-03-05T10:50:56.000Z","dependencies_parsed_at":"2023-06-09T01:00:44.025Z","dependency_job_id":null,"html_url":"https://github.com/edgar-bonet/tiny-morse-decoder","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/edgar-bonet%2Ftiny-morse-decoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgar-bonet%2Ftiny-morse-decoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgar-bonet%2Ftiny-morse-decoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgar-bonet%2Ftiny-morse-decoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edgar-bonet","download_url":"https://codeload.github.com/edgar-bonet/tiny-morse-decoder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243950792,"owners_count":20373664,"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":["attiny","attiny13a","attiny25","attiny45","attiny85","avr","morse-code"],"created_at":"2024-10-27T18:27:46.179Z","updated_at":"2025-03-18T20:30:50.650Z","avatar_url":"https://github.com/edgar-bonet.png","language":"C","readme":"# tiny-morse-decoder: Morse decoder for ATtiny13A\n\nThis program translates [Morse code][], read directly from a [straight\nkey][], into a stream of ASCII characters delivered as a logic-level\n[asynchronous serial][] signal. It was inspired by the [Morse challenge\nfor ATtiny experts][challenge] by Tom Boyd, but I slightly bent the\nrules of the challenge:\n\n1. Whereas the challenge requires the somewhat overpowered ATtiny85\n   microcontroller, this program targets the much smaller [ATtiny13A][],\n   although it does also work on the attinies 25, 45 and 85.\n2. It's written in plain C and compiled with gcc, instead of going\n   through the Arduino IDE.\n\n[Morse code]: https://en.wikipedia.org/wiki/Morse_code\n[straight key]: https://en.wikipedia.org/wiki/Telegraph_key\n[asynchronous serial]: https://en.wikipedia.org/wiki/Asynchronous_serial_communication\n[challenge]: http://sheepdogguides.com/arduino/aht8d-ATtiny%20Morse%20chall.htm\n[ATtiny13A]: https://www.microchip.com/wwwproducts/en/ATtiny13A\n\n## Features\n\n* Debounces the key.\n* Understands 54 characters: 26 letters, 10 digits and 18 punctuation\n  symbols.\n* 4 selectable keying speeds, from 5 to 18 words per minute. A change in\n  selected speed requires a reset to be effective.\n* On reset, flashes an “invitation to transmit” code on an LED at the\n  selected speed. This is intended as a visual indication of the keying\n  speed the user is expected to match.\n\n## Usage\n\nConnect:\n\n* a voltage source (2.7 to 5.5 V) between Vcc and GND\n* a straight key (or push button) between PB4 and GND\n* an LED, with a suitable current-limiting resistor, or a\n  self-oscillating buzzer between PB3 and GND\n* a logic-level serial monitor to PB2.\n\nOptionally, pins PB0 and/or PB1 can be connected to ground in order to\nselect a keying speed as per the following table:\n\n|   PB1    |   PB0    | speed (wpm) |\n|:--------:|:--------:|:-----------:|\n| floating | floating |     5       |\n| floating | grounded |     8       |\n| grounded | floating |    12       |\n| grounded | grounded |    18       |\n\nIn order to facilitate changing the selected speed, it is suggested to\nadd:\n\n* a pair of DIP switches between PB0 and ground and between PB1 and GND,\n  or an equivalent 4 positions coded rotary switch\n* a push button between RESET and GND.\n\nBelow is the schematic of the suggested circuit:\n\n![](img/schematic.svg)\n\nThe circuit can be easily breadboarded. If, however, you want something\nmore durable, check this [kit sold by Tom Boyd][kit], which is based on\na professionally built PCB.\n\nThe “logic-level serial monitor” mentioned above can be anything that is\nable to process a logic-level asynchronous serial signal. It should be\nconfigured to 9600/8N1, i.e. 9600\u0026nbsp;baud, 8\u0026nbsp;data bits, no\nparity, one stop bit. Typically one would use a USB to TTL serial cable\nconnected to a computer running a serial terminal emulator, like\n[putty][] or [GNU screen][]. On a Linux terminal, one can simply type\nsomething like\n\n```text\nstty -F /dev/ttyUSB0 raw 9600 \u0026\u0026 cat /dev/ttyUSB0\n```\n\nAn Arduino running a “do nothing” sketch can be used as an alternative\nto the USB to TTL serial cable: power the ATtiny from the Arduino GND\nand 5V pins, then connect the ATtiny serial output (PB2) to the Arduino\nTX pin. When doing this, it is important that the Arduino sketch does\nnot initialize its serial port. The Arduino serial monitor can then be\nused as an alternative to the serial terminal emulator.\n\n[kit]: http://sheepdogguides.com/elec/pcb/PCB271-ATtiny%20Morse%20brd1.htm\n[putty]: https://www.chiark.greenend.org.uk/~sgtatham/putty/\n[GNU screen]: https://www.gnu.org/software/screen/\n\n## Compiling and uploading\n\nYou need GNU make, avr-gcc, avrdude and an ISP programmer. An Arduino\n[can be used as an ISP programmer][arduino-isp].\n\nTo compile, type\n\n```text\nmake MCU=\u003cmcu name\u003e\n```\n\nwhere `\u003cmcu_name\u003e` should be either `attiny13a`, `attiny25`, `attiny45`\nor `attiny85`. Simply typing\n\n```text\nmake\n```\n\ncompiles for the default target, which is the ATtiny13A.\n\nTo upload, edit the Makefile, set the `PROGRAMMER` variable to match\nyour programmer, connect the programmer to the microcontroller and to\nthe computer, then type\n\n```text\nmake MCU=\u003cmcu_name\u003e upload\n```\n\nIf uploading to an ATtiny13A, you can omit `MCU=attiny13a`.\n\nAlternatively, gcc and avrdude can be called directly as:\n\n```text\navr-gcc -mmcu=attiny13a -std=gnu11 -fshort-enums -Os \\\n    tiny-morse-decoder.c -o tiny-morse-decoder.elf\navrdude -p attiny13 -c usbasp -U tiny-morse-decoder.elf\n```\n\nBut make sure to replace `-c usbasp` by the avrdude options appropriate\nfor your programmer.\n\nAnother alternative is to open the dummy file tiny-morse-decoder.ino\nwith the Arduino IDE. For this, you will need a board support package\nmatching the microcontroller you are using, in order to be able to\nselect it in the “Board” menu. The code provided by the board support\npackage will not be used.\n\n[arduino-isp]: https://www.arduino.cc/en/Tutorial/ArduinoISP\n\n## Files\n\nThis repository contains the following files and directories:\n\n* [README.md](README.md): this document\n* [tiny-morse-decoder.c](tiny-morse-decoder.c): program source\n* [Makefile](Makefile): Makefile for GNU make\n* [internals.md](internals.md): explanation of the program internals\n* [img](img/) directory: images for the documentation\n* [tools](tools/) directory: tooling for code generation and testing\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgar-bonet%2Ftiny-morse-decoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedgar-bonet%2Ftiny-morse-decoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgar-bonet%2Ftiny-morse-decoder/lists"}