LCD breakout user manual

Author: Manoj.j Reviewer: Ram Revision: 1.3 Tenet Technetronics 1/8/2011

Introduction to LCD breakout

Hardware Overview
LCD breakout features Components overview Schematic

Software Overview
Flow Chart Pseudo code Code

Demo Application References and further reading


This breakout board is designed to simplify the physical connection in interfacing an LCD with an Arduino. The breakout board is compatible for both 16x2 character LCD and graphical LCD. All power and control pins necessary to connect it to the Arduino/Comet board are broken out using long wire-wrap headers which extend through the shield. The breakout can be reset through reset button on top of the breakout. Separate variable potentiometer is provided for both 16x2 character LCD and graphical LCD to control the backlight contrast.

Hardware Overview

Figure1: The LCD breakout


LCD breakout features
   The breakout supports both Graphical LCD and 16x2 Text LCD. The LCD breakout shield can be mounted on Arduino/Comet board. The backlight contrast can be adjusted through potentiometer.

Components overview


Brief specificatio n Resistance: 10 kilo ohm

Product link



http://tenettech.com/ product.php?id_pro duct=1498


Reset button

Normal push http://tenettech.com/ button product.php?id_pro duct=1499 http://tenettech.com/ product.php?id_pro duct=517


Extended LCD 16x2 LCD berg connectors

http://en.wikipedia.org/wiki/Liquid_crystal_dis play

Graphical LCD 128x64 LCD http://www.tenettec http://www.dfrobot.com/wiki/index.php?title= h.com/product.php?i 128x64_Graphic_LCD_%28SKU:FIT0021%29 d_product=1523

Table1: components overview



Figure 2: 16x2 text LCD and graphical LCD breakout schematic


Software overview
Flowchart 16x2LCD Graphical LCD



Initialization of LCD functional pins

Initialization of LCD functional pins

Set the (cursor, clear screen) status

Initialization of bitmap position/system font

Print statements to display

Add shapes to images


Initialization of LCD functional pins

Set the (cursor, clear screen) status

Print statements to display End


Pseudo code 16x2LCD
   Include header files for LCD Global declaration: LCD pins initialization. Function name : Setup Return type : Void Description : Initialization Body : Print statement that is to be displayed on LCD. Function name : Loop Return type : Void Description : Infinite Body : Set the cursor and rate at which it is to be displayed.

Graphical LCD
  Include header files for LCD Function name : Setup Return type : Void Description : Initialization Body : LCD pins initialization. Set up the Bitmap position Set the system font Function name : Loop Return type : Void Description : Infinite Body : Include the shapes which you need to add to images Include number of iterations in one second.


(i) 16x2 LCD // include the library code: #include <LiquidCrystal.h> // initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2); void setup() { // set up the LCD's number of columns and rows: lcd.begin(16, 2); // Print a message to the LCD. lcd.print("hello, world!"); } void loop() { // set the cursor to column 0, line 1 // (note: line 1 is the second row, since counting begins with 0): lcd.setCursor(0, 1); // print the number of seconds since reset: lcd.print(millis()/1000); }

(ii) Graphical LCD #include <ks0108.h> // library header #include <Arial14.h> // font definition for 14 point Arial font. #include "SystemFont5x7.h" // system font #include "ArduinoIcon.h" // bitmap unsigned long startMillis; unsigned int iter = 0;


void setup() { GLCD.Init(NON_INVERTED); // initialise the library GLCD.ClearScreen(); GLCD.DrawBitmap(ArduinoIcon, 32,0, BLACK); //draw the bitmap at the given x,y position delay(3000); GLCD.ClearScreen(); GLCD.SelectFont(System5x7); // select fixed width system font } void loop() { // run over and over again startMillis = millis(); while( millis() - startMillis < 1000) { // loop for one second GLCD.DrawRect(0, 0, 64, 61, BLACK); // rectangle in left side of screen GLCD.DrawRoundRect(68, 0, 58, 61, 5, BLACK); // rounded rectangle around text area for(int i=0; i < 62; i += 4) GLCD.DrawLine(1,1,63,i, BLACK); // draw lines from upper left down right side of rectangle GLCD.DrawCircle(32,31,30,BLACK); // draw circle centered in the left side of screen GLCD.FillRect(92,40,16,16, WHITE); // clear previous spinner position GLCD.CursorTo(5,5); // locate curser for printing text GLCD.PrintNumber(++iter); // print current iteration at the current cursor position } // display number of iterations in one second GLCD.ClearScreen(); // clear the screen GLCD.CursorTo(13,2); // positon cursor GLCD.Puts("FPS= "); // print a text string GLCD.PrintNumber(iter); // print a number }


Demo Application
LCD breakout shield

Figure3: The breakout

LCD shield is mounted on Comet through extended headers from the breakout

Figure4: The breakout with Comet

16x2 text LCD is connected to breakout

Figure5: The breakout with LCD

The result image shows characters are printed on LCD

Figure6: character displayed on LCD

Graphical LCD is interfaced to Comet using the breakout shield

Figure7: The breakout with graphical LCD

The result showing coded images in graphical LCD

Figure8: images displayed on graphical LCD


References and Further Reading
    www.arduino.cc www.tenettech.com/comet http://www.youtube.com/user/tenetworld?blend=2&ob=5#p/u/3/NJHPJblpkRU http://tenettech.com/category.php?id_category=283


Sign up to vote on this title
UsefulNot useful