Interfacing Atmel AVR with Graphics Liquid Crystal Displays (GLCDs)

Summary of Interfacing Atmel AVR with Graphics Liquid Crystal Displays (GLCDs)


This article describes a C-library for AVR microcontrollers to control SED1520-based graphics LCDs. It utilizes an SRAM framebuffer since the hardware only supports write operations. The library offers drawing functions for shapes, text, and bitmaps. Developed by Michal J. Karas and Fabian Thiele, it was tested with an ATmega32 and Emerging Displays EW12A03GLY module. Note that the source code is currently unavailable due to a halted commercial license experiment.

Parts used in the AVR SED1520 Library Project:

  • ATmega32 microcontroller
  • Emerging Displays EW12A03GLY Module
  • Sed1520 Graphics LCD Controller
  • AVR GCC Compiler
  • AVR Libc Library
  • SRAM (for Framebuffer)

AVR SED1520 Library

This is a C-library for avr-gcc/avr-libc to access SED1520-based graphics-LCDs. The modules used to develop the library only support “write to LCD”, read-modify- write on the display RAM is not possible. So this Library uses a “framebuffer” which holds the display-content in the AVR’s SRAM. For a 122*32 pixel display around 500 Bytes of SRAM are occupied by the buffer. The library does of cause support modules which can be read in “write-only-mode” (tie the R/W-Pin to GND).
Interfacing Atmel AVR with Graphics Liquid Crystal Displays (GLCDs)

The library supports:

  • Dots (set/clear/toogle)
  • Lines (set/clear/toogle)
  • Circles (set/clear/toogle)
  • Rects/Boxes (set/clear/toogle)
  • Fonts in different sizes (included)
  • Draw Bitmaps (“Icons”)

Credits:

  • Michal J. Karas (8052.com/users/mkaras): Overall concept from his C51-libraries for other graphic-controllers, glyph/font-handling based on his code.
  • Fabian “ape” Thiele: the line/circle-routines are from his KS0108-Library

Demo/Test-Setup

The library has been tested with an ATmega32 (8MHZ int. R/C) and an Emerging Displays EW12A03GLY Module (2 SED1520, 122*32 pixels, google for datasheet).

Software

The source-code has been part of my “Will there ever be a request for a commercial license if the source-code is provided”-experiment. This experiment is now halted. The source-code is currently not available. Everybody who has downloaded the source is still bound to the non-commercial license. The only exception are users who have received my permission for a commercial use.

For more detail: Interfacing Atmel AVR with Graphics Liquid Crystal Displays (GLCDs)

Quick Solutions to Questions related to AVR SED1520 Library:

  • How does the library handle display memory?
    The library uses a framebuffer in the AVR's SRAM because read-modify-write on the display RAM is not possible.
  • What drawing primitives are supported?
    The library supports dots, lines, circles, rectangles, fonts, and bitmaps.
  • Can the library be used for commercial purposes?
    Commercial use is only permitted if you have received specific permission from the author.
  • Is the source code currently available for download?
    No, the source code is currently not available as the licensing experiment has been halted.
  • How much SRAM is required for a 122x32 pixel display?
    Around 500 Bytes of SRAM are occupied by the buffer for a 122x32 pixel display.
  • Which microcontroller was used to test the library?
    The library was tested with an ATmega32 running at 8MHZ internal R/C clock.
  • Does the library support reading data from the display?
    No, the modules used only support writing to the LCD, so reading is not possible.
  • Who provided the line and circle routines?
    Fabian ape Thiele provided the line and circle routines from his KS0108-Library.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top