LCD ASCII character displays

Back to start page

Hello LCD

Electrokit 41000946


GTC 1601 looks like a single line display with 16 characters,
but actually consists of two rows of 8 characters placed after each other.
Convenient if you want to print tables, but difficult in the case of long sentences.
(See the example program).

Read about how to make experiments with LCD:

How to use LCD's, Julyan Ilett  Part1    Part2

 font_table.pdf    lcd_instr.pdf


LCD-display contact standard

 Pin nr.  Name  Function   Pin nr.  Name  Function 
 1 VSS Gnd, jord  8 D1 (data bit 1)
 2 VDD +5V, supply   9 D2 (data bit 2)
 3 VEE Contrast  10 D3 (data bit 3)
 4 RS Char/!Command  11 D4 data bit 4
 5 RD/!WR Read/!Write  12 D5 data bit 5
 6 E Enable, clock  13 D6 data bit 6
 7 D0 (data bit 0)  14 D7 data bit 7

Feeding infants ...

Feeding infants is easier when you give flavor bits (nibble). Since two flawor bits becomes a mouthful (byte), the child can still be free from hunger in the end.

 

When it comes to small AVR processors there are few pins, and you dont want to connect an LCD display with many lines. All LCD displays has a feature that allows characters and commands to be loaded as 2 x 4-bit numbers (nibble) in succession, instead of using an 8-bit number (byte). In this case, it is sufficient to connect the four data lines and two control lines (if one refrains from being able to read the LCD registers, with RD/!WR).
The command to set 8 or 4 data lines to be used must be given first. This command has obviously been chosen so that 4 bits are sufficient to distinguish it from the other commands!


Breadboard one line 8+8

 

Fritzing
 LCD8-8.fzz

Program example with 8+8 characters on same line.
The equipment is from start programmed with  LCD8-8_C.c  which writes "Hello world" on the display. (as "Hello wo" + "rld!    " )

 

User-defined characters?

You can load the pixel definitions of up to 8 user-defined characters. The characters are then "ASCII-codes" 0 ... 7. (Note that C uses 0 as the end of line character so it could be wise to not use this position). For us in Sweden it is natural to use six of the self-defined characters for å ä ö Å Ä Ö, that leaves two characters for your own symbols.

A sample program (for 8+8) with user-defined characters are   udcLCD8-8_C.c.

After studying the example program  udcLCD8-8_C.c  You can probably figure out how to compose your own characters ...

( See Mark Owen's page on user defined characters )


Breadboard 2x16

LCD-displays comes in many different designs. There are displays with different number of lines and different many characters per row. The rows then have different start addresses in the LCD chip buffer memory. There are two different contact types and also different location of the contacts. If the display has backlight, this is connected to the supply voltage + 5V (pin 15) and ground, gnd (pin16) with a current-limiting resistor in series (220 Ohm).

Program for display with two 16 charcter lines.
"Hello World!   "
"Hello Kitty!   "


Back to start page

 


William Sandqvist    william@kth.se