0

Interfacing with a 122x32 GLCD

Posted by Chris on Friday, June 12, 2009 in , ,
There are loads of graphical LCDs out there - and a whole range of different sizes, prices, functionality and more. Interfacing with each one is different every time, so finding the right display is a fine balancing act between ease-of-use, number-of-pins and cost.

While I'm waiting for my 122x32 GLCD to be delivered (only 99p each from eBay!) I've been working on how to actually display stuff with them! The datasheet(s) are quite vague, but it is possible to glean the basics from them:

The actual display uses TWO driver chips and the data you send to from the microchip is presented to both of them - you need to set a pin to tell the display which driver chip (master or slave) the instruction is intended for. It seems that you do this by making pin E1 high for the master driver (i.e. the top half of the display) or driving E2 high for the slave (the bottom half of the display).

Pin numberSymbolLevelDescription
1Vdd3VSupply voltage
2Vss0VGround reference
3VlcdvariesPower for LCD display
4resetLow-to-HighReset the system
5E1HRead/write enable (master)
6E2HRead/write enable (slave)
7R/WH/LH=read, L=write
8A0H/LH=data, L=command
9DB00/1Data bit 0
10DB10/1Data bit 1
11DB20/1Data bit 2
12DB30/1Data bit 3
13DB40/1Data bit 4
14DB50/1Data bit 5
15DB60/1Data bit 6
16DB70/1Data bit 7
17BLA3VBack light anode
18BLC0VBack light cathode




The SED1520 driver chips do not support built-in characters/fonts, so to write characters on the display, it seems that you must create your own bitmap fonts and send the data across from the microchip, to display each miniature bitmap, one column at a time (since the data is transferred vertically on the data bus).

This means that a complete font set has to be designed and encoded.
I made my own font set using nothing more technical than a sheet of paper, a biro and the side of a CD case for drawing some straight lines! I made each font 8x5 pixels (a pretty standard size) but allowed a pixels space around each letter, so they are slightly smaller than most LCD fonts.

I then transferred these fonts into a custom-built VB application so that each character in the font set could be represented by 5 bytes of data. Now, when a character needs to be sent to the gLCD, the "row" (page) and "column" values can be set, and the data sent as a sequence of 5 bytes, to draw the letter as a bitmap on the display

0 Comments

Post a Comment

whos.amung.us

Copyright © 2009 .Nerd Club All rights reserved. Theme by Laptop Geek. | Bloggerized by FalconHive Supported by Blogger Templates.