{"id":19856584,"url":"https://github.com/gavinlyonsrepo/erm19264_uc1609","last_synced_at":"2025-10-10T00:34:25.208Z","repository":{"id":43878132,"uuid":"308939781","full_name":"gavinlyonsrepo/ERM19264_UC1609","owner":"gavinlyonsrepo","description":"Arduino Eco-system Library to Support the ERM19264 LCD driven by the UC1609C / UC1609 controller. ","archived":false,"fork":false,"pushed_at":"2024-07-17T13:52:29.000Z","size":2441,"stargazers_count":17,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-06T20:51:16.367Z","etag":null,"topics":["arduino","arduino-library","bluepill","display","display-library","erm","erm19264","esp32","esp8266","lcd","lcd-display","library","liquidcrystal","spi","st7525","stm32","stm32bluepill","stm32f103c8t6","uc1609","uc1609c"],"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","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-10-31T17:47:43.000Z","updated_at":"2024-07-17T13:48:52.000Z","dependencies_parsed_at":"2024-01-21T20:53:12.664Z","dependency_job_id":"c3fcd62e-5426-485b-a03e-6567e3b2cf7e","html_url":"https://github.com/gavinlyonsrepo/ERM19264_UC1609","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinlyonsrepo%2FERM19264_UC1609","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinlyonsrepo%2FERM19264_UC1609/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinlyonsrepo%2FERM19264_UC1609/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinlyonsrepo%2FERM19264_UC1609/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gavinlyonsrepo","download_url":"https://codeload.github.com/gavinlyonsrepo/ERM19264_UC1609/tar.gz/refs/heads/main","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":["arduino","arduino-library","bluepill","display","display-library","erm","erm19264","esp32","esp8266","lcd","lcd-display","library","liquidcrystal","spi","st7525","stm32","stm32bluepill","stm32f103c8t6","uc1609","uc1609c"],"created_at":"2024-11-12T14:16:02.135Z","updated_at":"2025-10-10T00:34:20.171Z","avatar_url":"https://github.com/gavinlyonsrepo.png","language":"C++","funding_links":["https://www.paypal.com/paypalme/whitelight976"],"categories":[],"sub_categories":[],"readme":"\n[![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![ ERM19264 LCD image ](https://github.com/gavinlyonsrepo/ERM19264_UC1609/blob/main/extras/image/color.jpg)\n\n# ERM19264_UC1609\n\n## Table of contents\n\n  * [Overview](#overview)\n  * [Output](#output)\n  * [Installation](#installation)\n  * [Hardware](#hardware)\n  * [Software](#software)\n\t* [API Documentation](#api-documentation)\n\t* [SPI](#spi)\n\t* [Buffer](#buffer)\n\t* [Fonts](#fonts)\n\t* [Bitmaps](#bitmaps)\n\t* [User adjustments](#user-adjustments)\n\t* [Example files](#example-files)\n  * [Tested MCU](#tested-mcu)\n\n## Overview\n\n* Name : ERM19264_UC1609\n* Title : Library for ERM19264-5 v3 LCD  (UC1609C controller) for the Arduino eco-system\n* Description : \n\n1. Arduino eco-system library.      \n2. Inverse, Scroll, rotate and contrast control. \n3. 12 ASCII fonts included.\n4. Graphics class included.\n5. Sleep mode.\n6. Multi-screen shared buffer mode.\n7. Bitmaps supported.\n8. Hardware \u0026 software SPI options\n9. Light weight basic text version [here at link](https://github.com/gavinlyonsrepo/ERM19264_UC1609_TEXT). \n10. Software may also work with ERM19264 LCD controlled by ST7525 controller but untested at current time.  \n* Author: Gavin Lyons\n* URL : [Github URL link](https://github.com/gavinlyonsrepo/ERM19264_UC1609)\n\n## Output\n\nOutput Screenshots, From left to right top to bottom.\n\n1. Full screen bitmap displayed\n2. Multi-screen shared buffer mode, In this case screen divided into two.\n3. Different size and inverted  default font \n4. ASCII font 1-127 printed out with default font size 1 \n5. Fonts 7-8\n6. Fonts 1-4\n\n![output image 1](https://github.com/gavinlyonsrepo/ERM19264_UC1609/blob/main/extras/image/output.jpg)\n\n![output image 2](https://github.com/gavinlyonsrepo/ERM19264_UC1609/blob/main/extras/image/output2.jpg)\n\n## Installation\n\nThe library is included in the official Arduino library manger and the optimum way to install it is using the library manager which can be opened by the *manage libraries* option in Arduino IDE. \n\n## Hardware\n\n9 pins , Vcc and GND, anode and cathode for the backlight LED and an SPI interface.\nThe example files are setup for an UNO for the pin connections used by for other MCU tested see extras folder GPIO_MCU_used.txt file. The backlight control is left up to user.\nIf  using Hardware SPI two of  pins will be tied to the SPI CLK and MOSI lines if using software SPI you should be able use any GPIO you want for all five pins.\nDatasheet links are in the extras folder. \n\nThere are 3 different colours in range, Parts used purchased from [ebay](https://www.ebay.ie/itm/2-inch-White-192x64-Graphic-LCD-Display-Module-UC1609-SPI-for-Arduino/293617684779?hash=item445cfa512b:g:10MAAOSwYV9e6xsi)\n \n1. ERM19264SBS-5 V3 LCD Display UC1609C controller ,  white on blue\n2. ERM19264FS-5 V3 LCD Display  UC1609C controller , black on white\n3. ERM19264DNS-5 V3 LCD Display  UC1609C controller white on black\n\nThe library was tested on 1 and 2. \n\nThis wiring Diagram from the manufacturer showing hardware setup connected to an ~8051 MCU, showing both 3.3 volt and 5 volt systems. \n\n![ ERM19264 wiring image ](https://github.com/gavinlyonsrepo/ERM19264_UC1609/blob/main/extras/image/connect.jpg)\n\n## Software\n\n### API Documentation\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/ERM19264_UC1609/index.html)\n\n### SPI\n\nHardware and software SPI. Two different class constructors. User can pick the relevant constructor, see examples files.  When running Software SPI it may be necessary on very high frequency MCU's to change the SW SPI GPIO delay(LCDHighFreqDelaySet)  It is a microsecond delay by default it is at 0. All the hardware SPI settings are defined in the header file and can be easily changed if necessary.  It should be able to share SPI bus with other SPI devices on different SPI settings.\n\n### Buffer\n\nThe library features a multi-screen shared buffer mode, In order to save data memory for devices with \nlow data memory. For example if user defines a buffer to cover the whole screen it takes 1536 bytes of data memory. Instead a user (for example) can create a buffer that covers half the screen for just 768 bytes then define two screens objects each pointing to the same buffer.\nThe user uses the 'ERM19264_UC1609_Screen' Class objects to define each screen\nand the 'ActiveBuffer' pointer to switch the buffer between each screen. Multiple screens of same size can be created so LCD screen can be divided into thirds or quarters saving even more memory. The disadvantage of this is the code is slightly more complicated and user can only write to one screen at a time. If user does not want to use multi screen mode they can simply just define ONE screen to cover entire LCD screen. See example files and API for more detail.\n\nFigure :: The class structure with three screen object's and active buffer presently pointing to number one. \n\n![ ERM19264 class image ](https://github.com/gavinlyonsrepo/ERM19264_UC1609/blob/main/extras/image/screenmode.png)\n\n### Fonts\n\nFont data table:\n\n| num | enum name | Char size XbyY | ASCII range | Size bytes | Size Scale-able |\n| ------ | ------ | ------ | ------ |  ------ | ----- |\n| 1 | $_Default | 5x8 |0-0x7F|635 |Y|\n| 2 | $_Thick   | 7x8 |0x20-0x5A, no lowercase letters |406|Y|\n| 3 | $_SevenSeg  | 4x8 |0x20-0x7A |360|Y|\n| 4 | $_Wide | 8x8 |0x20-0x5A, no lowercase letters|464|Y|\n| 5 | $_Tiny | 3x8 |0x20-0x7E |285|Y|\n| 6 | $_Homespun  | 7x8 |0x20-0x7E |658|Y|\n| 7 | $_Bignum | 16x32 |0x2D-0x3A ,0-10 - . / : |896|N|\n| 8 | $_Mednum | 16x16 |0x2D-0x3A ,0-10 - . / :|448|N|\n| 9 | $_ArialRound| 16x24 | 0x20-0x7E |4608|N|\n| 10 | $_ArialBold | 16x16 |0x20-0x7E |3072|N|\n| 11 | $_Mia| 8x16 | 0x20-0x7E |1520|N|\n| 12 | $_Dedica | 6x12 |0x20-0x7E |1152|N|\n\n1. $ = UC1609Font\n2. Fonts 1-6 are byte high(at text size 1) scale-able fonts, columns of padding added by SW.\n3. Font 7-8 are large numerical fonts and cannot be scaled(just one size).\n4. Fonts 9-12 Alphanumeric fonts and cannot be scaled(just one size)\n\nFont Methods:\n\n| Font num | Method | Size parameter | Notes |\n| ------ | ------ | ------ |  ------ |\n| 1-6 | drawChar|Y| draws single  character |\n| 1-6 | drawText |Y| draws character array |\n| 7-12 | drawChar|N| draws single  character |\n| 7-12 | drawText|N| draws character array |\n| 1-12 | print |~| Polymorphic print class which will print out many data types(arduino built in) |\n\nThese  functions return a enum( LCD_Return_Codes_e), non-zero in event of an error, see API doc.\nBy default only Font 1 is commented in and ready to go to save memory.\nSo to use a non-default Font (2-12), two steps. Comment in the respective define at top of library header file ERM19264_UC1609_graphics_font.h in the USER FONT OPTION ONE section\nCall SetFontNum method and pass it name of respective font.  eg SetFontNum(UC1609Font_Wide).\n\n### Bitmaps\n\nThere is a few different ways of displaying bitmaps, \n\n| Num | Method |    Data addressing | Note |\n| ------ | ------ | ------- |  ------ |  \n| 1 | LCDBitmap() | Vertical |  Writes directly to screen , no buffer used. | \n| 2 | LCDBuffer()  |   Vertical  |  Mostly for internal use ... mostly | \n| 3 | buffer init technique  | Vertical  |  Can be used when initialising a buffer, splash screen | \n| 4a | drawBitmap() |   Vertical | default,  setDrawBitmapAddr(true) | \n| 4b | drawBitmap() |  Horizontal | setDrawBitmapAddr(false) |\n\nThe drawBitmap function will return an enum with an error code if an error occurs see API  docs.\nSee the bitmap example file for more details on each method. Bitmaps can be turned to data [here at link]( https://javl.github.io/image2cpp/) , Bitmaps  should be defined in the program memory and buffers in the data memory.\n\n### User adjustments\n\nSome users have reported the LCD not initialising correctly with this software.\nIt was found that by adjusting the RAM address control setting from 0x02 to 0x01.\nit resolved problem.  See github issue 4 for details. I suspect the root cause is different versions of product on market. As of Version 1.7 users can adjust setting in the \"begin\" method argument list.\nThis setting changes bits 2-0 in AC register, see diagram below for details.\n\n![ ERM19264 ram image ](https://github.com/gavinlyonsrepo/ERM19264_UC1609/blob/main/extras/image/ram.png)\n\nWhen the user calls LCDbegin() to start LCD they can specify a contrast setting from 0x00 to 0xFF.\nDatasheet says 0x49 is default. (VbiasPOT). Lower contrast works better on the blue color version.\n\nIt is also possible for user to change LCD bias ,  Temperature coefficient, frame rate and power control but this must be done by changing defines in header file. Choose lower frame rate for lower power, and choose higher frame rate to improve LCD contrast and minimize flicker. See Data sheet for range of values here. Defaults where found to be fine during all testing of this library.\n\n| Parameter | default Values |  Define | Register bits |\n| ------ | ------ |  ------ | ------ |\n| LCD bias |  9 | BIAS_RATIO_SET | BR 1:0 |\n| Temp coefficient | -0.00%/ C |  TEMP_COMP_SET | TC 1:0  |\n| Frame rate | 95 fps |  FRAMERATE_SET |  LC 4:3 |\n| Power control | 1.4mA + Internal VLCD (7x charge pump) |  PC_SET | PC 2:0 |\n| V bias Bot(contrast) | 0x49 |  Set by user with LCDbegin | PM 7:0 |\n| Ram Address Control | 0x02 |  Set by user with LCDbegin  | AC 2:0 |\n\n### Example files \n\n| Examples files ino  | Description  | \n| ------ | ------ | \n| BITMAP | Shows use of bitmaps  | \n| GRAPHICS |  Tests use of graphics   | \n| MISC | Shows misc functions, rotate, invert etc | \n| MULTISCREEN| Shows use of multi screen mode + FPS, two screens |  \n| MULTISCREEN_TWO | Shows use of multi screen mode, four screens |  \n| TEXT | Shows use of text and fonts, All Fonts must be enabled to work fully  | \n| SWSPI | Shows use of software SPI | \n| HELLO | Hello world, basic use case | \n\n## Tested MCU\n\nTested on following MCUs both software and hardware SPI,\nThe example files are setup for an UNO for the pin connections used \nby for other MCU testing see extras/doc folder GPIO_MCU_used.txt file.\n\n1. Arduino  UNO \u0026 NANO v3\n2. ESP8266 \n3. ESP32 \n4. STM32 \"blue pill\"\n5. UNO Minima R4\n\n## Notes and Issues\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavinlyonsrepo%2Ferm19264_uc1609","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgavinlyonsrepo%2Ferm19264_uc1609","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavinlyonsrepo%2Ferm19264_uc1609/lists"}