GLCD Library
A C Library for Embedded Applications
 All Data Structures Files Functions Variables Enumerations Enumerator Macros Groups Pages
GLCD Library Documentation

Introduction

Welcome to GLCD, an open source graphic LCD library written by Andy Gock.

Author's web site: http://agock.com/

GitHub repository: https://github.com/andygock/glcd

This library has been written cleanly, to allow easy modification for use with different microcontroller devices and controller chipsets. Logic relating to devices and controllers are palced in seperate files and specific implementations can be chosen by the use of special defined symbols.

It is suitable for monochrome (black and white) LCDs with page by page data and command write style data transfer protocol. It is not suitable for color graphic LCDs.

Supported LCD Chipsets

Current supported LCD controllers / chipsets:

  • PCD8544 based LCDs, e.g Nokia 3110 and 5110 LCDs
  • ST7565R serial interface (used in Newhaven Display NHD-C12864WC-FSW-FBW-3V3-M)
  • NT75451 parallel interface (used on NGX BlueBoards)

Supported Microcontrollers

Current supported devices / microcontrollers:

  • Atmel AVR 8-bit
  • NXP LPC111x ARM Cortex
  • NXP LPC11Uxx ARM Cortex
  • ST STM32F0XX Arm Cortex

Compiler Setup

The following symbols need to be set for the compiler used:

Pick microcontroller type (pick one only):

    GLCD_DEVICE_LPX111X
    GLCD_DEVICE_LPX11UXX
    GLCD_DEVICE_AVR8
    GLCD_DEVICE_STM32F0XX

Pick LCD controller type (pick one only):

    GLCD_CONTROLLER_PCD8544
    GLCD_CONTROLLER_ST7565R
    GLCD_CONTROLLER_NT75451

If using a parallel interface LCD (e.g NT75451 on NGX BlueBoard):

    GLCD_USE_PARALLEL

When using SPI controllers:

    GLCD_USE_SPI

Note the SPI symbol isn't checked by the compiler, and it is fine if it is not used. It is for forward compatibility only.

These symbols above need to be set in the configuration options of your IDE, usually in the "defined symbols" section, or they can be defined in a makefile as -D options.

e.g -DGLCD_DEVICE_LPC111X

Also, we need to set the width and height of the LCD in glcd.h

Custom Fonts

Custom fonts can be generated using the free MikroElektronika GLCD Font Creator tool. The standard 5x7 tiny text font is included together with also a few extra custom fonts to get you started.

http://www.mikroe.com/eng/products/view/683/glcd-font-creator/

There is a tutorial on my web site on how to use this software.

I also have been in the progress of working on a dedicated piece of software for generating fonts and bitmaps called glcd-utils. This is not very active at the moment, and is written in Qt Creator. This is set up specifically for glcd and works a lot better. However it is not documented and not really fit for public distribution at the moment.

https://github.com/andygock/glcd-utils