{"id":19856562,"url":"https://github.com/gavinlyonsrepo/nokia5110_text","last_synced_at":"2025-05-02T01:31:36.588Z","repository":{"id":98596979,"uuid":"180477989","full_name":"gavinlyonsrepo/NOKIA5110_TEXT","owner":"gavinlyonsrepo","description":"ASCII text  Library for the Nokia 5110 LCD ( PCD8544 controller) for the Arduino microcontroller eco-system. Nine ASCII text fonts of various sizes .  Designed to be light weight, low memory footprint. Tested on Arduino , STM32 and ESP-X","archived":false,"fork":false,"pushed_at":"2023-06-16T18:48:19.000Z","size":1062,"stargazers_count":29,"open_issues_count":0,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-06T20:51:15.922Z","etag":null,"topics":["5110","arduino","arduino-library","ascii-character-text","ascii-fonts","ascii-text-fonts","attiny85","display","esp32","esp8266","lcd","lcd-library","library","minimal","nokia","nokia-5110","nokia-display","nokia5110","pcd8544","stm32f103c8t6"],"latest_commit_sha":null,"homepage":"https://gavinlyonsrepo.github.io/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gavinlyonsrepo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2019-04-10T01:34:08.000Z","updated_at":"2025-03-08T18:59:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"ea53cfe8-e45e-46b7-b137-309aff2f97c8","html_url":"https://github.com/gavinlyonsrepo/NOKIA5110_TEXT","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinlyonsrepo%2FNOKIA5110_TEXT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinlyonsrepo%2FNOKIA5110_TEXT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinlyonsrepo%2FNOKIA5110_TEXT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinlyonsrepo%2FNOKIA5110_TEXT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gavinlyonsrepo","download_url":"https://codeload.github.com/gavinlyonsrepo/NOKIA5110_TEXT/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251969432,"owners_count":21673203,"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":["5110","arduino","arduino-library","ascii-character-text","ascii-fonts","ascii-text-fonts","attiny85","display","esp32","esp8266","lcd","lcd-library","library","minimal","nokia","nokia-5110","nokia-display","nokia5110","pcd8544","stm32f103c8t6"],"created_at":"2024-11-12T14:15:51.628Z","updated_at":"2025-05-02T01:31:36.089Z","avatar_url":"https://github.com/gavinlyonsrepo.png","language":"C++","funding_links":["https://www.paypal.com/paypalme/whitelight976"],"categories":[],"sub_categories":[],"readme":"[![Website](https://img.shields.io/badge/Website-Link-blue.svg)](https://gavinlyonsrepo.github.io/)  [![Rss](https://img.shields.io/badge/Subscribe-RSS-yellow.svg)](https://gavinlyonsrepo.github.io//feed.xml)  [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/paypalme/whitelight976)\n\n![ pcb ](https://github.com/gavinlyonsrepo/NOKIA5110_TEXT/blob/master/extras/image/NOKIA.jpg)\n\n\n# NOKIA5110_TEXT\n\n## Table of contents\n\n  * [Overview](#overview)\n  * [Tested](#tested)\n  * [Output](#output)\n  * [Installation](#installation)\n  * [Hardware](#hardware)\n\t* [SPI](#spi)\n  * [Software](#software)\n\t* [API](#api)\n\t* [Fonts](#fonts)\n\t* [Bitmaps](#bitmaps)\n\t* [Print](#print)\n\n  \n## Overview\n\n* Name : NOKIA5110_TEXT\n* Title : Library for Nokia 5110 LCD (PCD8544 controller) for the Arduino eco-system\n* Description : \n\n1. Arduino eco system library, C++.      \n2. Inverse, bias and contrast control. \n3. ASCII strings and character text display.\n4. Nine different ASCII text fonts. \n5. Sleep mode.\n6. Designed to be light weight, low memory footprint. see memory section.\n7. Custom characters and bitmap supported\n8. No graphics buffer to reduce memory footprint but \nbasic graphics patterns can be created using custom characters, pixels, block patterns , lines.\n9. Hardware or software SPI interface.\n10. Print method for numerical data.\n\n* Author: Gavin Lyons\n\n\n## Tested \n\n* Tested on following MCUs (The file testedMCU_pinouts.txt in extras folder, shows pins used in testing)\n \n1. Arduino  UNO \u0026 NANO v3\n2. ESP8266  \n3. ESP32 \n4. STM32 STM32F103C8T6  \"blue pill\" \n5. ATtiny85\n6. Arduino UNO R4 minima\n\n## Output\n\n\nOutput Screenshots, From left to right top to bottom.\n\n1. Custom characters + fill patterns \n2. Font 7 \"Large\"\n3. Half screen bitmap\n4. Font 9 \"Mega\"  \n5. First 6  fonts (byte high), num 1-6, one font in each row block\n6. Font 8 \"Huge\" \n\n![ font pic 1 ](https://github.com/gavinlyonsrepo/NOKIA5110_TEXT/blob/master/extras/image/NOKIA_FONT1.jpg)\n\n![ font pic 2 ](https://github.com/gavinlyonsrepo/NOKIA5110_TEXT/blob/master/extras/image/NOKIA_FONT2.jpg)\n\n![ font pic 3 ](https://github.com/gavinlyonsrepo/NOKIA5110_TEXT/blob/master/extras/image/NOKIA_FONT_ALL.jpg)\n\n## Installation\n\n\nThe library is included in the official Arduino library manger and the optimum way to install it \nis using the library manager.\n\n## Hardware\n\nThe Nokia 5110 is a basic LCD screen for lots of applications. \nIt was originally intended to be used as a mobile phone screen. \nIt uses the PCD8544 controller, which is the same used in the Nokia 3310 LCD. \nThe PCD8544 is a low power CMOS LCD controller/driver.\n\nThe screen is 84 X 48 pixels. The X-Axis has 84 columns.\nThe Y_Axis(rows) the 48 pixels are divided into 6 row blocks. \nEach block containing one byte of pixels. 6 * 8 = 48. \n\n| Block number   | Pixel number Y axis|\n| ------ | ------ |\n| Block 0 | 0-7 |\n| Block 1 | 8-15 |\n| Block 2 | 16-23|\n| Block 3 | 24-31 |\n| Block 4 | 32-39 |\n| Block 5 | 40-47 |\n\nGPIO function on Arduino, 5 Nokia 5110 LCD lines SPI bus.\nThe example files use Pin D2-RST \u003c.....\u003e D6-CLK for UNO. \n\n| MCU   | Nokia 5110 LCD |\n| ------ | ------ |\n| Digital GPIO | LCD_CLK Pin 5 clock in |\n| Digital GPIO | LCD_DIN Pin 4 data in |\n| Digital GPIO | LCD_DC Pin 3 data/command|\n| Digital GPIO | LCD_CE Pin 2 chip enable |\n| Digital GPIO | LCD_RST Pin 1 reset|\n\n### SPI\n\nThe PCD8544 interfaces to microcontrollers through a serial bus interface(SPI).\nThe library originally and by default  used software SPI. \nAs of Version 2.2 it can support hardware SPI as well.\nHardware SPI is much faster but two of the pins are fixed, is more difficult to port to new MCU's and includes the arduino SPI library. \nThe file testedMCU_pinouts.txt show in extra folder shows pins used in testing of various MCU's.\n\nTo switch from the default software SPI to Hardware SPI, two steps are required:\n\n1. In file NOKIA5110_TEXT.h , in SPI HARDWARE SECTION, comment in: define SPIHW_ON.\n2. Use the constructor with 3 Parameters not 5. There is hardware SPI example file called NOKIA5110_HIW_HWSPI for UNO which shows this.\n\nPinout of a Nokia 5110 LCD.\n\n![ pinout ](https://github.com/gavinlyonsrepo/NOKIA5110_TEXT/blob/master/extras/image/NOKIA_PINOUT.jpg)\n\nThe LCD Vcc runs at 3.3V so you'll need to use level shifting/dropping  to use with safely with  5V microcontroller.\n\n## Software\n\n### API \n\nThe API (application programming interface) documentation is at link hosted on github pages and generated by Doxygen. \n\n[API  URL](https://gavinlyonsrepo.github.io/misc/software_docs/NOKIA5110_TEXT/index.html)\n\n### Fonts\n\nThere are 9 fonts.\nBy default only Font 1 is commented in and ready to go.\nSo to use a non-default Font (2-9), two steps.\n\n1. Comment in the respective define at top of library header file NOKIA5110_TEXT_FONT_DATA.h in the FONT DEFINE SECTION.\n2. Call LCDFont function and pass it enum label of respective font.\n\nOnly include what fonts you want in order to keep program size as small as possible.\nSome fonts do not have lowercase letters and others are numbers only.\nFor fonts 1-6 each character is a byte of pixels in height(Y). One pixel of empty space on each side is added by code (padding). So a 5x8 (XxY) pixel character is in reality 7x8. \nEach of the six rowblock is one byte height. \n\nTotal characters = (Screen Width/Character width  + padding) X (Screen height/Character height).\n\nFont table:\n\n| num | name | Character size  | Total characters | Note | size in bytes |\n| ------ | ------ | ------ | ------ |  ------ | ----- |\n| 1 | Default | 5x8 |  72 |   ------ | 465 |\n| 2 | Thick   | 7x8 | 54 |  no lowercase letters  | 406 |\n| 3 | Homespun | 7x8 | 54 | ------ | 658 |\n| 4 | Seven segment | 4x8 | 84 | ------ | 364 |\n| 5 | Wide | 8x8 |  48 | no lowercase letters | 464 | \n| 6 | Tiny | 3x8 | 96  | ------ | 285 |\n| 7 | Large | 12x16 |  21 |  no lowercase letters | 1392 |\n| 8 | Huge | 16x24 |  10  | Numbers + : . only, use / for space | 832 |\n| 9 | Mega | 16x32 |  5  | Numbers + : . only, use / for space | 832 |\n\n### Bitmaps\n\nLibray can display bitmaps, Data in bitmaps must be vertically addressed and can be placed in PROGMEM, see examples files. \n\n### Print\n\nThere is a print method which utilises the arduino print.h \nto print data types other than character strings\nsee example file NOKIA5110_TESTS. \nThe user can pass flash-memory based strings to print() by wrapping them with F() macro. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavinlyonsrepo%2Fnokia5110_text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgavinlyonsrepo%2Fnokia5110_text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavinlyonsrepo%2Fnokia5110_text/lists"}