{"id":17454764,"url":"https://github.com/ole1986/pic18f-morsecode","last_synced_at":"2026-01-06T15:53:35.804Z","repository":{"id":90058127,"uuid":"231442710","full_name":"ole1986/pic18f-morsecode","owner":"ole1986","description":"PIC example code to translate ASCII text into morse code blinking LED using serial connection (UART)","archived":false,"fork":false,"pushed_at":"2020-01-03T07:22:58.000Z","size":526,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-02T05:44:26.301Z","etag":null,"topics":["microchip-pic","microcontroller","morse-code","pic","pic18f"],"latest_commit_sha":null,"homepage":null,"language":"Makefile","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/ole1986.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":"2020-01-02T19:04:19.000Z","updated_at":"2020-01-03T07:23:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"af3936a5-95e1-4774-a34e-8c7ce6d15b57","html_url":"https://github.com/ole1986/pic18f-morsecode","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/ole1986%2Fpic18f-morsecode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ole1986%2Fpic18f-morsecode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ole1986%2Fpic18f-morsecode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ole1986%2Fpic18f-morsecode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ole1986","download_url":"https://codeload.github.com/ole1986/pic18f-morsecode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245972671,"owners_count":20702721,"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":["microchip-pic","microcontroller","morse-code","pic","pic18f"],"created_at":"2024-10-18T01:41:43.285Z","updated_at":"2026-01-06T15:53:35.756Z","avatar_url":"https://github.com/ole1986.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PIC18F morse code serial example\n\nThis example program demostrates how to use a pic18f26K20 to send data through UART using pin 18 and 17 (RX,TX) and translate it into morse codes.\n\nOnce an ASCII text (E.g. \"SOS\\n\") is submitted over serial the controller translates the input into morse codes on pin 6 (RA4).\nIn addition to this the serial port will receive the morse codes from the controller (\".\" for short / \"-\" for long).\n\n```\nWelcome to minicom 2.7.1\n\nOPTIONS: I18n \nCompiled on Aug 13 2017, 15:25:34.\nPort /dev/serial0, 21:00:01\n\nPress CTRL-A Z for help on special keys\n\nsos\n...---... (sos) \n```\n\n## Hardware requirements\n\n* 1x PIC18F controller (E.g. PIC18F26K20) or any other compatible chip\n* 1x Raspberry Pi\n* 1x Breadboard\n* 8x male/female jumper wires (RPi -\u003e Breadboard)\n* 4x male/male jumper wires (Breadboard)\n* 2x Resistors (10 K)\n* 4x Resistors (470 R) - programming\n* 1x LED\n\n## Software requirements\n\n* [MPLAB](https://www.microchip.com/mplab/mplab-x-ide) to compile the source code\n* [pickle](https://wiki.kewl.org/dokuwiki/projects:pickle#installation) to program the controller via raspberry\n\n## Pinout (RPi)\n\n\u003ca href=\"https://github.com/ole1986/pic18f-morsecode/raw/master/images/board.jpg\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://github.com/ole1986/pic18f-morsecode/raw/master/images/board.jpg\" width=\"30%\"\u003e\n\u003c/a\u003e\n\n*A screenshot of the breadboard pinout for both serial and programmer incl. LED*\n\n**This applies only to PIC18F26K20 - Other chips may be different**\n\n[PIC18F26K20 Datasheet](http://ww1.microchip.com/downloads/en/DeviceDoc/40001303H.pdf)\n\n### Programming\n\n```\nR-PI                              PICMicro       GPIO header     .pickle\n====                              ========       ===========     =======\n\n3V3-------------------------------VDD--+         PIN 1 (P1-01)\n                                      |\nGND-------------------------------VSS  R1        PIN 19\n                                      |\nGPIO04--------R3-470R-------------VPP--+         PIN 7           VPP=4\n\nGPIO25--------R4-470R-------------PGC            PIN 22          PGC=25\n\nGPIO24--------R5-470R-------------PGD            PIN 18          PGD=24\n\nGPIO22--------R6-470R-------------PGM--R2-+      PIN 15          PGM=22\n                                         |\n                                        ///\n(R1) 10K !MCLR pull-up\n(R2) 10K where appropriate (PGM is not present on all devices).\n(R3..R6) 470R.\n```\n\nSource: [pickle project page](https://wiki.kewl.org/dokuwiki/projects:pickle)\n\n### Serial\n\nTo use the serial connection (UART) two additional jumper wires need to be connected plus one wire for the LED to blink\n\n```\nR-PI                              PICMicro       GPIO header     .pickle\n====                              ========       ===========     =======\n                                  RA4--+         PIN 6\n                                       |\n                                       R1\n                                       |\n                                       LED\n                                       |\n                                      ///\nGPIO14----------------------------RC7/RX/DT      PIN 18\nGPIO15----------------------------RC6/TX/CK      PIN 17\n\n(R1) 10K or 1K\n```\n\n## Build pickle\n\nTo build pickle on your Raspberry Pi, please follow [this installation instructions](https://wiki.kewl.org/dokuwiki/projects:pickle#installation)\n\n## Program the firmware\n\nTo program the firmware onto your controller, all previous steps are necessary and the programming pinout must be used\n\nDownload the latest morsecode firmware [from here](https://github.com/ole1986/pic18f-morsecode/raw/master/dist/XC8_18F87K22_BUILD/production/pic18f16K20.X.production.hex) with your raspberry pi.\n\nAdd a \".pickle\" file into the same folder with the following content\n\n```\nDEVICE=RPI2\nSLEEP=1\nBITRULES=0x1000\n# !MCLR/VPP        - PI/O G04\nVPP=4\n# PGM              - PI/O G22\nPGM=22\n# PGC CLOCK        - PI/O G25\nPGC=25\n# PGD DATA_I/O     - PI/O G24\nPGD=24\n# Debug level (0=NONE, 1=ERROR, 10=INFO)\nDEBUG=0\n```\n\nInstall the firmware using pickle command \"p16\" from your RPi\n\n```\np16 program pic18f16K20.X.production.hex\n```\n\n## Test the program\n\nTo test the serial chip connection, the serial pinout must be applied.\nAlso I recommend to install minicom on your RPi using the following command\n\n```\nsudo apt-get install minicom\n```\n\nOnce minicom is installed use the following command to establish the connection\n\n```\nminicom -b 9600 -o -D /dev/serial0\n```\n\nBy entering \"sos\" the controller should response with \"...---...\" and LED should blink properly\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fole1986%2Fpic18f-morsecode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fole1986%2Fpic18f-morsecode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fole1986%2Fpic18f-morsecode/lists"}