Giter Club home page Giter Club logo

erm19264_uc1609's Introduction

 ERM19264

Table of contents

Overview

  • Name : ERM19264_UC1609
  • Title : Library for ERM19264-5 v3 LCD (UC1609C controller) for the Arduino eco-system
  • Description :
  1. Arduino library.
  2. Inverse, rotate and contrast control.
  3. ASCII text strings and character text display.
  4. Graphics library included based on the Adafruit GFX library.
  5. Sleep mode.
  6. 3 different modes: Multi-buffer , single buffer , light weight text only
  7. custom bitmaps supported.
  • Author: Gavin Lyons

  • Arduino IDE: 1.8.10

  • Tested on following MCUs both software and hardware SPI, The example files are setup for an UNO for the pin connections used by for other MCU testing see extras folder GPIO_MCU_used.txt file.

  1. Arduino UNO & NANO v3
  2. ESP8266
  3. ESP32
  4. STM32 "blue pill"

Output

Output Screenshots, From left to right top to bottom.

  1. Full screen bitmap displayed
  2. Multi buffer mode screen divided into two buffers
  3. Different size and type of fonts
  4. Available font printed out (this can be expanded by mod see features)

op

Installation

The 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.

See link below for instruction for this and for the other methods too.

Installing Additional Arduino Libraries guide

Hardware

9 pins , Vcc and GND, anode and cathode for the backlight LED and an SPI interface. The 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. If 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. Datasheets are in the extras folder.

There are 3 different colours in range, Parts used purchased from ebay

  1. ERM19264SBS-5 V3 LCD Display UC1609C controller , white on blue
  2. ERM19264FS-5 V3 LCD Display UC1609C controller , black on white
  3. ERM19264DNS-5 V3 LCD Display UC1609C controller white on black

The library was tested on 1 and 2. The UC1609 controller chip is a 3.3V device but the ERM LCD module has a "662k" 3.3V regulator at back. So the ERM LCD module will run at 5V as well if this is present. It was always run it at 3.3V during testing. The Backlight should always be connected to 3.3V according to datasheets.

This wiring Diagram from the manufacturer showing hardware setup connected to an ~8051 MCU. Showing both 5 and 3.3 volt systems.

 ERM19264

Features

SPI

Hardware and software SPI. Two different class constructors. User can pick the relevant constructor, see examples files. Hardware SPI is recommended, far faster and more reliable but Software SPI allows for more flexible GPIO selection and easier to port to other MCU' s. When running Software SPI it may be necessary on very high frequency MCU's to change the UC1609_HIGHFREQ_DELAY define, It is a microsecond delay by default it is at 0.

buffers

3 buffer modes

  1. MULTI_BUFFER (default)
  2. SINGLE_BUFFER
  3. NO_BUFFER , Text only no buffer , relatively light weight. A "hello world" Sketch uses 2320 bytes (7%) of and 42 bytes (2%) of dynamic memory. Turns LCD into simple character LCD(216 characters)

To switch between modes, user must make a change to the USER BUFFER OPTION SECTION at top of ERM19264_UC1609.h file. Pick one option and one option only. The example files at top, say which option to pick. If wrong option is picked, example files will not work or even compile. Bitmaps can still be written directly to screen in NO_BUFFER mode but no graphics possible.

fonts

The font(custom_font in the custom_graphics_font.h file) is truncated by a define ( UC_FONT_MOD_TWO) after first 127 characters (see output pic) to save memory space(640 bytes), if you wish to use rest of font, simply comment this define out. The font is a standard 5 by 7 ASCII font with two columns of padding added. So 7 by 8 in effect. In standard text size and "no buffer" mode, this means: 192/7 * 64/8 = 27 * 8 = 216 characters.

User adjustments

When the user calls LCDbegin() to start LCD they can specify a contrast setting from 0x00 to 0xFF. Datasheet says 0x49 is default. (VbiasPOT)

It 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.

Parameter default Values Define Register
LCD bias 9 BIAS_RATIO_SET BR 1:0
Temp coefficient -0.00%/ C TEMP_COMP_SET TC 1:0
Frame rate 95 fps FRAMERATE_SET LC 4:3
Power control 1.4mA + internal V LCD PC_SET PC 2:0
V bias Bot(contrast) 0x49h default Set by user with LCDbegin PM 7:0

Functions

Functions: Detailed information on the functions can be found in comments in the ERM19264_UC1609.cpp file and a list of them in keywords.txt. The graphic functions can be found in the custom_graphic.h file.

Files

Src Files Desc
ERM19264_UC1609.h library header file
ERM19264_UC1609.cpp library source file
custom_graphics.h Custom graphics header file
custom_graphics.cpp Custom graphics source file
custom_graphics_font.h Custom graphics font file
Examples files ino Desc
BITMAP Shows use of bitmaps
GRAPHICS Shows use of graphics
MISC Shows misc functions, rotate invert etc
MULTIBUFFER Shows use of multi buffer mode
NOBUFFER Shows use of no buffer text only mode
TEXT Shows use of text IN buffer mode
SINGLEBUFFER Shows use of single buffer mode
SWSPI Shows use of software SPI

Issues

Issues with version 1.0.0.

  1. Version 1.0.0 was tested on the ERM19264FS (black on white) LCD after release it was tested on ERM19264SBS (white on blue) LCD and it was found that although hardware SPI was fine there was a issue with the software SPI.The LCD was not initialising, after debug it was found that it was being caused by a delay in the reset routine which is defined in the ERM_UC1609.h header file. UC1609_RESET_DELAY2 , The datasheet says this should be 5mS but the LCD(white on blue) would only initialise when this was reduced. This will be corrected in next version. So in summary

If you are using ERM19264SBS (white on blue) LCD with software SPI, Set UC1609_RESET_DELAY2 to 0 in the ERM_UC1609.h header file.

  1. Example file MISC , VbiasPot define missing from LCDbegin(), if missing defaults to 0x49 , datasheet default, so not a big deal.
  2. Typo in Keywords.txt file for setTextWrap line, will just effect the IDE highlight effect.

Ports

  • ERM19264_UC1609_T (T for text). Light weight Text only version for arduino ecosystem here at link

  • PIC Xc8 ports Link

erm19264_uc1609's People

Contributors

gavinlyonsrepo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.