{"id":13685131,"url":"https://github.com/zadi15/picoLCD","last_synced_at":"2025-05-01T01:31:06.622Z","repository":{"id":160188348,"uuid":"332714285","full_name":"zadi15/picoLCD","owner":"zadi15","description":"Example code for interfacing with a LCD with a Raspberry Pi Pico","archived":false,"fork":false,"pushed_at":"2021-03-16T20:36:42.000Z","size":17257,"stargazers_count":34,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-12T06:34:24.224Z","etag":null,"topics":["c","lcd","lcd-display","lcd-library","lcd1602","lcd16x2","lcd2004","lcd20x4","pico","raspberry-pi","raspberry-pi-pico"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zadi15.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2021-01-25T10:46:37.000Z","updated_at":"2024-06-23T12:53:26.000Z","dependencies_parsed_at":"2024-01-17T06:22:08.779Z","dependency_job_id":"a2ad4b83-0681-4dfe-b9e0-28536f4c68b2","html_url":"https://github.com/zadi15/picoLCD","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/zadi15%2FpicoLCD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zadi15%2FpicoLCD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zadi15%2FpicoLCD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zadi15%2FpicoLCD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zadi15","download_url":"https://codeload.github.com/zadi15/picoLCD/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251808418,"owners_count":21647287,"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":["c","lcd","lcd-display","lcd-library","lcd1602","lcd16x2","lcd2004","lcd20x4","pico","raspberry-pi","raspberry-pi-pico"],"created_at":"2024-08-02T14:00:44.400Z","updated_at":"2025-05-01T01:31:05.204Z","avatar_url":"https://github.com/zadi15.png","language":"C","funding_links":[],"categories":["资源","Resources"],"sub_categories":["项目","Projects"],"readme":"# picoLCD\n\n## About picoLCD\npicoLCD is a collection of functions to make interfacing with HD44780 (and other pin \u0026 instruction compatible chips such as the Sitronix ST7066) based LCD screens easier on the Raspberry Pi Pico. Rather than reading through data sheets to figure out the correct set of instructions to send to the screen, picoLCD attempts to make it a simpler process, while still being extremely versatile. It's as simple as copying the `.c \u0026 .h` files to your project, add some `#include`s, set some pins and off you go!\n\nThis is still very much a work in progress.\nThis is known to work on the following LCD sizes in 8-bit mode:\n\n![16x2 status](https://img.shields.io/badge/16x2-Tested-brightgreen) (HD44780)\n\n![20x4 status](https://img.shields.io/badge/20x4-Tested-brightgreen) (HD44780)\n\n![40x2 status](https://img.shields.io/badge/40x2-Tested-brightgreen) (ST7066)\n\n![16x4 status](https://img.shields.io/badge/16x4-Untested-red)\n\n![8x2 status](https://img.shields.io/badge/8x2-Untested-red)\n\n4-bit operation is also on the way once more progress is done on the current version.\n\nBasic Instructions are below, with more detailed function documentation in 'picoLCD/FUNCTIONS.md'\n\nDemo .uf2 files can be found at `picoLCD/demos`.\n\nCurrent Version = 0.5.0\n\nChangelog can be found at `picoLCD/CHANGELOG.md`.\n\n### Wiring the pico\n\nThe Pico should be wired to the LCD as follows for 8-bit operation, with the Pico being plugged\ninto USB:\n\n![diagram depicting the wiring of the LCD to the PICO](https://raw.githubusercontent.com/zadi15/picoLCD/main/imgs/picoLCD.png)\n\nPlease note the LCD backlight should be powered by an external 5v power source, as the Pico may not be able to power both the LCD and\nbacklight.\n\n## Basic Usage:\n\n**Please Note: This describes the minimum steps needed to get an LCD functioning. An example `main.c` can be found at `picoLCD/8-bit/example`. Use of the more advanced features are detailed below.**\n\nTo get started all you need to do is move all `.c \u0026 .h` files (found at either `picoLCD/8-bit` for 8-bit operation) to your project folder, and do the following:\n\nAt the top of your main file add the following `#include`s:\n\n\u003cpre\u003e\n#include \"pico/binary_info.h\"\n#include \"LCDops.h\"\n#include \"generalOps.h\"\n\u003c/pre\u003e\n\nAdditionally, you need to declare which GPIOs the LCD is connected to and the LCD size (Make sure these are not in `main()`). The example below is for a 16x2 LCD connected as in the above diagram.\n\n{D0,D1,D2,D3,D4,D5,D6,D7, E , RS , RW , LCD Line Length (eg. 16 characters across), Number of Lines on LCD}\n\n`int LCDpins[14] = {0,1,2,3,4,5,6,7,15,16,17,16,2};`\n\nFinally these pins that we just defined (excluding the LCD line length and line count values) need to be initialized, set as output and pulled low. Here is an example:\n\n\u003cpre\u003e\nfor(int gpio = 0; gpio \u003c 11; gpio++){\n    gpio_init(LCDpins[gpio]);\n    gpio_set_dir(LCDpins[gpio], true);\n    gpio_put(LCDpins[gpio], false);\n}\n\u003c/pre\u003e\n\nAnd inside your `CMakeLists.txt`, add `LCDops.c` and `generalOps.c` to your `add_executable()` e.g.\n\n\u003cpre\u003e\nadd_executable(project\n    main.c\n    LCDops.c\n    generalOps.c\n)\n\u003c/pre\u003e\n\nYou're now able to use picoLCD's functions as explained in `picoLCD/FUNCTIONS.md`!\n\n### Advanced Features\n\n**Included Custom Characters**\n\nIf you want to use the set of pre-designed custom characters this library provides, detailed in `FUNCTIONS.md`, you must also:\n\nMove the `.c` and `.h` files found at `picoLCD/8-bit/presetChars/` to your project folder\n\nAdd `#include presetChars.h` to your main.c and `presetChars.c` to your `add_executable()` in CMakeLists.txt.\n\n\n**Custom Message Presets**\n\nIf you want to use the set of pre-designed custom message functions this library provides, detailed in `FUNCTIONS.md`, you must also:\n\nMove the `.c` and `.h` files found at `picoLCD/8-bit/presetMessages/` to your project folder\n\nAdd `#include presetMessages.h` to your main.c and `presetMessages.c` to your `add_executable()` in CMakeLists.txt.\n\n\n## To Do\n\n--\u003e Clean up FUNCTIONS.md\n\n--\u003e Continue adding LCD functions\n\n--\u003e Expand custom characters\n\n--\u003e Secret additions :D\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzadi15%2FpicoLCD","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzadi15%2FpicoLCD","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzadi15%2FpicoLCD/lists"}