This is an old revision of the document!


Overview

This is a large LCD shield that gives 8 lines of 24 characters. Now available in the Shop

The display is intelligent (serially programmable) with its own CPU and memory. In a basic configuration, it can be driven by a single Arduino digital pin. This leaves your Arduino serial port free for other purposes.

See a short video of the LCD in action (running the Sketch listed below) .

LCD Details

Features full cursor control and multiple fonts. Programmable horizontal scrolling text too (up to 250 characters/line on the display). Custom characters can be designed & displayed. An online character definer/editor. There is a small red LED on the bottom RHS corner of the LCD PCB - this can be controlled via commands from the Arduino.

LCD has a contrast adjustment slider. Unlike many other LCDs, this one has good readability in bright sunlight.

Since the LCD covers a larger area than your Arduino, the standard Arduino port pins on the shield PCB can be exposed on right-angled connectors. Some ports are a bit tricky to reach (due to the pillars that support the shield PCB to the LCD) but nothing too tricky to workaround.

The LCD unit is powered directly by the Arduino board, no additional power supply is required.

Shield kit details

Unit is supplied as a kit for self assembly (soldering required). All necessary parts are shipped with the kit.

You must supply and program your own Arduino board. We used an Arduino Uno board.

The kit is made up of the following parts …

Parts List

  • One LCD shield PCB

  • One 8×24 LCD
  • Two sets of mounting standoffs with screws
  • One 16 pin IC socket
  • One MAX232 IC
  • One resistor
  • Five capacitors
  • Three pairs of pins and jumpers for same
  • LCD connector pins
  • Arduino port pins

Assembly instructions

  • Solder the resistor (R1) to the PCB
  • Solder capacitors (C1,C2,C3,C4,C6) to the reverse side of the PCB (note polarity)
  • Solder capacitor (C5) to the top side of the PCB (note polarity)
  • Solder the IC socket to the PCB (align notch with PCB legend)
  • Solder the three jumper pins (RX, Keys, Rst) to the PCB
  • Fit a jumper across the RX pins. Leave the other two un-jumpered.
  • Solder the port pins to the reverse side of the PCB. These fit to the inner set of holes.
  • Insert the MAX232 IC into the IC socket (ensure it’s the correct way around)
  • Open the LCD connector - just pull it up about 4mm. Do NOT remove the top part of the connector
  • Attach PCB to the LCD using standoffs - don't tighten these fully just now.
  • Insert pins thru the PCB and into LCD connector. Make sure that pins run into the correct socket position on the LCD connector. You only need fit pins 1,3,6,12,14,15,16,17. Note that pins 15&16 are intentionally shorted together on the PCB. Be sure to push the pins properly into the connector … you should feel the pin being gripped by the contact in the connector.
  • Solder pins in place. Be careful, the pins are pretty close to each other. Check for any shorting as you go.
  • Close the LCD connector - best to use a small screwdriver to do this
  • Finish tightening the screws into the standoffs

The finished PCB should look like this.

Top view
Bottom view
Whilst this 'shield' is designed to ease use of this LCD with an Arduino, the PCB can be used to help hookup the LCD to most any microcontroller that you might have.

Software

Driving your LCD from an Arduino Sketch

The LCD unit is an intelligent subsystem that has its own processor and memory. It runs a program that accepts command strings from the Arduino. These commands are sent at 9600baud to the LCD. A single Arduino port pin (Digital port 4) is used to drive the LCD.

To display standard text, you simply send the required ASCII characters. To invoke special behaviour, you can use the commands in the support software (see below).

The special commands allow cursor control, font selection, control of the LED, scrolling text and programmable custom characters.

The unit supports up to 20 ‘pages’ of fonts. All fonts are programmable and you can mix fonts on the display. The default four pre-programmed fonts can be re-programmed if required. More often you will want to choose a new font page for your custom characters. The online font designer is the best way to make new characters. Note that all fonts are held in RAM, so customised characters will be lost when the unit is powered down. This isn’t a problem, just include the initialisation of any of your custom characters into the start of your sketch.

You can configure how lines on the LCD should wrap and how the entire display should scroll. Line wrap causes the cursor to automatically be repositioned at the beginning of the next line when it is advanced beyond the end of a line. When line wrap is off, additional characters are not drawn until the cursor is manually positioned back into the screen's area. Scroll mode causes the entire display to scroll vertically when the cursor is advanced downward beyond the last row of the display. When scroll mode is off, the behavior is determined by the wrap mode. If wrap is on and scroll is off, downward cursor movement beyond the last row causes the cursor to reposition at the top of the screen. If both modes are off, no additional characters are drawn until the cursor is manually repositioned into the screen's area.

There are four modes supported:

Mode 1 is wrap off, scroll off Mode 2 is wrap on, scroll off Mode 3 is wrap off, scroll on Mode 4 is wrap on, scroll on

Note that the special commands are triggered by the backslash ‘\’ character. If you require to print a ‘\’, you must send it twice ‘\\’.

The following sketch shows several of the features of this display. In order to save the Arduino serial port for other purposes, we use the 'SoftwareSerial' library.

#include <SoftwareSerial.h>
//Compiled with Arduino Version 1.0.5
//We are using Arduino Uno pins 3 (Receive) and 4 (Transmit)
//This demo actually just uses pin 4 - there is no reception of data
SoftwareSerial mySerial(3, 4);
 
void setup()  
{
  // Serial.begin(57600);
  // Serial.println("Giant LCD Test");
 
  // Set the data rate for the SoftwareSerial port
  // The LCD display expects 9600 baud
  mySerial.begin(9600);
  // Give the LCD time to complete its reset cycle
  delay (3000);
}
 
void loop()                  
{
  //Clear LCD display, set font to 0 and position cursor at top LHS of display
  //note that we need two '\' chars as Arduino takes a single '\' as the escape character
  mySerial.print("\\@ 0"); 
 
  delay (2000);
 
  mySerial.print("Line 1 - Hello world");
  //
  delay(5000);
 
  //Set cursor position to 2nd char of 3rd row
  mySerial.print("\\B\"#");
  mySerial.print("Cursor positioning");
  delay(5000);
  //Set cursor position to 2nd char of 3rd row
  mySerial.print("\\B\"#");
 
  //select font #1 - this prints in BOLD
  mySerial.print("\\C!");
  mySerial.print("Front panel LED On");
 
  //select font 0 - and back to non-bold
  mySerial.print("\\C ");
  // and turn LED on
  mySerial.print("\\J01");
  delay(5000);
 
  //Set cursor position to 2nd char of 3rd row
  mySerial.print("\\B\"#");
  mySerial.print("\\J00");
  mySerial.print("Front panel LED Off");
  delay(5000);
 
  //demo scrolling text
  mySerial.print("\\B #");
  mySerial.print("Now,let's show scrolling");
  //set scrolling speed to 6
   mySerial.print("\\K060");
  //enable buffer fill for scrolling on line 5
   mySerial.print("\\K3$1");
   mySerial.print("Half a bee, philosophically, must ipso facto half not be. But half the bee has got to be, vis-a-vis its entity - d'you see? ");
   mySerial.print("\\K3$0");
  //enable scrolling on line 5
   mySerial.print("\\K2$1");
  //The scrolling is 'automatic' on the unit , so we just delay whilst folks watch this
   delay(30000);
   mySerial.print("\\B #");
   mySerial.print("Now, let's scroll faster");
  //set scrolling speed to 4
   mySerial.print("\\K030");
   delay(30000);
 
   //demo the various fonts
   //start by clearing the screen
   //each font has a lower and upper 'page'
   mySerial.print("\\@ 0");
   //show preview of font 0 page 1
   mySerial.print("\\@ 1");
   delay(5000);
   //show preview of font 0 page 2
   mySerial.print("\\@ 2");
   delay(5000);
   //show preview of font 1 page 1
   mySerial.print("\\@!1");
   delay(5000);
   //show preview of font 1 page 2
   mySerial.print("\\@!2");
   delay(5000);
   //show preview of font 2 page 1
   mySerial.print("\\@\"1");
   delay(5000);
   //show preview of font 2 page 2
   mySerial.print("\\@\"2");
   delay(5000);
   //show preview of font 3 page 1
   mySerial.print("\\@#1");
   delay(5000);
   //show preview of font 3 page 2
   mySerial.print("\\@#2");
   delay(5000);
 
   //line wrap on & scroll on
   mySerial.print("\\A3"); 
 
   //clear screen & set font 0
   mySerial.print("\\@ 0"); 
 
  // print incrementing numbers  
  for (int i=0; i <= 255; i++){
      mySerial.println(i);
      delay(140);
   }
 
 
 x:
  //clear screen & select font 0 
  mySerial.print("\\@ 0");
 
  int dly = 80;
 
  for (int k=32; k <=55; k++) {
  dly = 80; 
 
  for (int j=39; j >=32; j--) {
    dly = dly - 10;
 
    for (int i=0; i <= 7; i++) {
      //position cursor
      mySerial.print("\\B");
      //character position
      mySerial.write(byte(k));
      //row position
      mySerial.write(byte(j));
 
      mySerial.write(byte(152 + i));
      delay(dly);
   }
  mySerial.print("\\B");
  mySerial.write(byte(k));
  mySerial.write(byte(j)); 
  //full block char is font 0, char 136
  mySerial.write(byte(136));
  delay(dly);
  }
  }
 
   // mySerial.end();  
}
  • atmel/giant_lcd_shield.1371925011.txt.gz
  • Last modified: 2013/06/22 18:16
  • by minerva9