Interfacing to an LCD Screen Using an Arduino

Similar documents
PHYS 2P32 Project: MIDI for Arduino/ 8 Note Keyboard

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

Eric Mitchell April 2, 2012 Application Note: Control of a 180 Servo Motor with Arduino UNO Development Board

Microcontroller Display Interfacing Techniques

EMERGING DISPLAY CUSTOMER ACCEPTANCE SPECIFICATIONS 16290(LED TYPES) EXAMINED BY : FILE NO. CAS ISSUE : JUL.03,2001 TOTAL PAGE : 7

Character LCDs. Created by Ladyada. Last updated on :45:29 PM EDT

EMERGING DISPLAY CUSTOMER ACCEPTANCE SPECIFICATIONS 16400(LED TYPES) EXAMINED BY : FILE NO. CAS ISSUE : JAN.19,2000 TOTAL PAGE : 7 APPROVED BY:

Home Security System for Automatic Doors

HD44780-Based LCD Modules. Introduction to the LM018L

Arduino ADK Back. For information on using the board with the Android OS, see Google's ADK documentation.

EMERGING DISPLAY CUSTOMER ACCEPTANCE SPECIFICATIONS (LED TYPES) EXAMINED BY : FILE NO. CAS ISSUE : DEC.01,1999 TOTAL PAGE : 7 APPROVED BY:

SainSmart UNO R3 Starter Kit

DEPARTMENT OF ELECTRONICS ENGINEERING

Adafruit MCP9808 Precision I2C Temperature Sensor Guide

Displays. Cathode Ray Tube. Semiconductor Elements. Basic applications. Oscilloscope TV Old monitors. 2009, Associate Professor PhD. T.

Arduino DUE + DAC MCP4922 (SPI)

User s Manual of Board Microcontroller ET-MEGA2560-ADK ET-MEGA2560-ADK

Microcontroller Code Example Explanation and Words of Wisdom For Senior Design

The self-starting solar-powered Stirling engine

Serial Communications

Automated Notify for Vehicle Using Arduino and Android Application

[F/T] [5] [KHz] [AMP] [3] [V] 4 ) To set DC offset to -2.5V press the following keys [OFS] [+/-] [2] [.] [5] [V]

Android Controlled Based Interface

LCM NHD-12032BZ-FSW-GBW. User s Guide. (Liquid Crystal Display Graphic Module) RoHS Compliant. For product support, contact

GDM1602A SPECIFICATIONS OF LCD MODULE. Features. Outline dimension

BATRON DOCUMENT NUMBER AND REVISION VL-FS-BTHQ 21605VSS-02 REV.A (BTHQ 21605VSS-FSTF-LED05W(1 DIE)) Feb/2002 BTHQ FSTF-LED WHITE 1/15

LCD MODULE DEM SYH-LY

How To Control A Car With A Thermostat

Surveillance System Using Wireless Sensor Networks

Introduction. Getting familiar with chipkit Pi

ARDUINO SEVERINO SERIAL SINGLE SIDED VERSION 3 S3v3 (REVISION 2) USER MANUAL

PolyBot Board. User's Guide V1.11 9/20/08

Microtronics technologies Mobile:

A PIC16F628 controlled FLL (Frequency Locked Loop) VFO for HF

INTRODUCTION TO SERIAL ARM

Hello and welcome to this training module for the STM32L4 Liquid Crystal Display (LCD) controller. This controller can be used in a wide range of

Arduino Due Back. Warning: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum. Overview

Design and Construction of Variable DC Source for Laboratory Using Solar Energy

LCD MODULE DEM B FGH-PW

SIP Protocol as a Communication Bus to Control Embedded Devices

Arduino Lab 1 - The Voltage Divider

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

POCKET SCOPE 2. The idea 2. Design criteria 3

Computer Controlling Your MallinCam

Modification of an AOR AR-8600 receiver to tune it with a ACECO FC-3002 frequency finder

BrightSign Expander Hardware Guide

Adafruit SHT31-D Temperature & Humidity Sensor Breakout

UPS PIco. to be used with. Raspberry Pi B+, A+, B, and A. HAT Compliant. Raspberry Pi is a trademark of the Raspberry Pi Foundation

White Paper Thin-Film-Transistor (TFT) LCD Display Control Electronics Design and Operation Revision 1.0

If an occupancy of room is zero, i.e. room is empty then light source will be switched off automatically

Lab Experiment 1: The LPC 2148 Education Board

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual HAW - Arduino 1

KTA-223 Arduino Compatible Relay Controller

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

Example Connection between USB Host and Android

FOR MESSRS. : WC1602A PAGE: 1/12 CONTENTS

Controlling a Dot Matrix LED Display with a Microcontroller

Using Arduino Microcontrollers to Sense DC Motor Speed and Position

Pololu DRV8835 Dual Motor Driver Shield for Arduino

Waspmote. Quickstart Guide

LCD MODULE DEM SYH-LY

EvB 5.1 v5 User s Guide

LMB162ABC LCD Module User Manual

Using Xbee in Serial Communication

1602 LCD adopts standard 14 pins(no backlight) or 16pins(with backlight) interface, Instruction of each pin interface is as follows:

LCD I 2 C/Serial RX Backpack. Data Sheet. LCD to I2C/Serial RX Backpack I2C or Serial RX communication with Standard 16 Pin LCD modules

AXE033 SERIAL/I2C LCD

1.8" TFT Display Breakout and Shield

2.2" TFT Display. Created by Ladyada. Last updated on :15:09 PM EDT

Digital Guitar Effects Pedal

DKWF121 WF121-A B/G/N MODULE EVALUATION BOARD

Accurate Measurement of the Mains Electricity Frequency

1.5" & 2.1" Monochrome 128x64 OLED Display Module

International Journal of Scientific & Engineering Research, Volume 5, Issue 5, May-2014 ISSN

EasyPIC4 User s Manual

MICROCONTROLLER INTERFACING CIRCUITS

H-Bridge Motor Control

DDS VFO CONSTRUCTION MANUAL. DDS VFO Construction Manual Issue 1 Page 1

Computer Automation Techniques. Arthur Carroll

2.3" Monochrome 128x32 OLED Display Module

Raspberry Pi. Hans- Petter Halvorsen, M.Sc.

Specification. For. LCD Module CCM1620CSL

Building a Basic Communication Network using XBee DigiMesh. Keywords: XBee, Networking, Zigbee, Digimesh, Mesh, Python, Smart Home

Description of High Accuracy Digital Pressure Gauge Design

QUICK START GUIDE FOR DEMONSTRATION CIRCUIT BIT DIFFERENTIAL ADC WITH I2C LTC2485 DESCRIPTION

PC2004A-L (20x4) Character LCD Display

LCD Module Product Specification

Advanced Data Capture and Control Systems

DOG SERIES 3.3V. EA DOGM163W-A + EA LED55x31-W

DATASHEET. ADAM Arduino Display Adaptor Module. Arduino Compatible Shield P/N: 4Display-Shield-FT843 For the 4D Systems 4DLCD-FT843 Display

Vroom Hardware manual ver Code 114VROOHWE00. Vroom CANBUS USER INTERFACE WITH LCD GRAPHIC DISPLAY AND WITH TEMPERATURE AND HUMIDITY SENSOR

DATA LOGGER AND REMOTE MONITORING SYSTEM FOR MULTIPLE PARAMETER MEASUREMENT APPLICATIONS. G.S. Nhivekar, R.R.Mudholker

LEN s.r.l. Via S. Andrea di Rovereto 33 c.s CHIAVARI (GE) Tel Fax mailto: len@len.it url: http//

3.2 inch QVGA TFT Color LCD User s Guide Version 1 & 2

Arduino project. Arduino board. Serial transmission

ONTOGENY SMART BULLETIN BOARD

Disturbance Recoder SPCR 8C27. Product Guide

M68EVB908QL4 Development Board for Motorola MC68HC908QL4

ET-BASE AVR ATmega64/128

Transcription:

Interfacing to an LCD Screen Using an Arduino Matt Clary 4/3/2015 Abstract A liquid crystal display, or LCD, is a video display that utilizes the light modulating properties of liquid crystals to display pictures or text on a screen. Since their invention in 1964, LCD screens have grown to be used in a very wide variety of applications, including computer monitors, televisions, and instrument panels. One way to utilize an LCD is with an Arduino microcontroller. By wiring an Arduino microcontroller to the pins of an LCD display it is possible to program the microcontroller to display a desired text string or image on the screen. 1

Table of Contents Abstract 1 Introduction 3 Objective 4 Method 4 Wiring 4 Programming 6 Conclusion 8 References 9 2

Introduction To fully understand how to interface an Arduino microcontroller to an LCD screen, it is important to understand how an LCD functions. An LCD display is composed of pixels made up of liquid crystals. Liquid crystals exist in a state that s between a solid and a liquid. At any time liquid crystals can be in a variety of phases, most notably the nematic phase or the smectic phase. In the nematic phase the crystals act more like a liquid, allowing the molecules of the crystals to rearrange themselves while remaining oriented in a uniform direction. In the smectic phase, the molecules can form into layers that can move past one another relatively easily. Molecules of a certain layer can move freely within that layer, but cannot move to adjacent layers. When the liquid crystals exist in the nematic phase they tend to adapt a twisted up structure, which can be straightened out when electricity is applied to them. In an LCD, a liquid crystal pixel lies between two glass filters, one behind it and another in front at 90 degrees. When electricity is applied to the liquid crystals the twisted structures that have naturally formed are straightened out. This rotates any light passing through 90 degrees, thus allowing it to pass through the two glass filters. Figure 1: Liquid crystals in their on (Right) and off (Left) states In order to give some context on how it is possible to program an LCD screen to display certain information the Arduino microcontroller should be briefly discussed. The Arduino model that is the topic of this application note is the Arduino Uno. The Arduino Uno board consists of ATmega328 microcontroller, 14 digital input/output pins, 6 analog inputs, a 16 MHz resonator, a USB connection, a power jack, and an ICSP header. For this project the most important features of the board are the microcontroller, which allows for the building of programs in the 3

JAVA programming language, and the digital input/output pins, which allows for the transfer of information between the board and the LCD display. Figure 2: An Arduino Uno Board Objective The object of this application note is to demonstrate how an Arduino microcontroller can be used to interface with an LCD screen. Method Interfacing an Arduino microcontroller with an LCD display consists of two parts, wiring and programming. Wiring A typical LCD display consists of 16 pins that control various features of the screen. A table that shows the pins and describes each function can be seen in Table 1 below. The Arduino microcontroller can output voltages of either 5 V or 3.3 V, so the LCD can be powered by wiring VSS and VDD to the ground and 5 V pins on the microcontroller. It is possible to adjust the contrast of the screen by wiring a variable resistor to V0 located at pin 3 on the screen. The RS, R/W, and E pins are wired to pins 12, ground, and 11 respectively on the Arduino. The LCD 4

screen can operate in both 8-but mode and 4-bit. For this application note only 4-bit mode will be discussed, as it requires fewer pins and is generally easier to use. Table 1: Pinout of a typical LCD screen To interface with the LCD in 4-bit mode the Arduino only needs to be connected to pins DB4-DB7, which will connected to digital output pins 5-2 respectively. Pins 15 and 16 on the LCD screen are used to power a backlight in the screen. This makes text displayed in the screen easier to read in poorly lit environments and is optional. In order to power the backlight pin 15 should be connected to ground while pin 16 should be connected to the 5 V output of the Arduino. To power the Arduino a 9 V battery can be connected to the VIn and ground pins on the Arduino. If such power source is available the Arduino can be powered by using its USB connection with a computer. Figure 3 below shows what the final wiring scheme should look like after all connections are made. 5

Figure 3: Wiring schematic for LCD-Arduino interfacing Programming Once all of the wiring us complete the Arduino can write text to the LCD via programs that are loaded onto the microcontroller. Programs utilizing the JAVA programming language can be uploaded to the microcontroller via free open source software made by Arduino. A library made by Arduino called LiquidCrystal can downloaded and used in any programs written to interface with the LCD display. The LiquidCrystal library contains a variety of built in functions that allow an Arduino to control an LCD. These functions allow the user to do things like print text strings to the screen, initialize the screen cursor to a certain pixel, scroll the screen left or right, clear the display, as well as a variety of other things. Below in Figure 4 is an example of some code to write a text string to an LCD screen. 6

Figure 4: Code to write to an LCD As you can see, the first part of the code includes the LiquidCrystal library that includes the LCD interface functions. It then defines pins 12, 11, 5, 4, 3, and 2 of the Arduino as the pins that are interfacing with the LCD screen. Remember, pins 2-5 control the display data signal pins, while pins 12 and 11 control RS and Enable pins respectively. The program then defines the size of the LCD connected (In this case a 16x2 display) with the lcd.begin function. With the lcd.print function, the text string Hello World is then printed to the screen. As you can see, the cursor that determines where the text begins can be set with the lcd.setcursor function. The Arduino has a built in function that can count the number of milliseconds since the program began to run. With the final lcd.print function, the Arduino is displaying every second that passes on the screen. An image of what the LCD screen looks like when this program is run can be seen below in Figure 5. 7

Figure 5: An LCD screen displaying text from example code Conclusion One of the main reasons that LCD displays have become so common in recent years is due to the ease at which they can be interfaced with. Although an Arduino microcontroller was used to demonstrate this ability in this application note, a variety of other microcontrollers can be used to achieve the same result. On a similar note, much more can be accomplished with an Arduino microcontroller and an LCD display than what was demonstrated in this application note. By adding further hardware to the circuit described here things like real time clocks and thermometers can be added, allowing the LCD to display the current time and temperature. The simplicity of their design and ease of interface allow for LCD screens to be used in a variety of projects on both a large and small scale. 8

References http://en.wikipedia.org/wiki/liquid-crystal_display http://en.wikipedia.org/wiki/list_of_arduino_boards_and_compatible_systems http://www.hacktronics.com/tutorials/arduino-character-lcd-tutorial.html http://www.explainthatstuff.com/lcdtv.html http://arduino.cc/en/tutorial/liquidcrystal 9