ARM HOW-TO GUIDE Interfacing GLCD with LPC2148 ARM

Similar documents
ARM HOW-TO GUIDE Interfacing GLCD with LPC2148 ARM

ARM HOW-TO GUIDE Interfacing Switch with LPC2148 ARM

ARM HOW-TO GUIDE Interfacing 7SEG with LPC2148 ARM

ARM HOW-TO GUIDE Interfacing Relay with LPC2148 ARM

ARM HOW-TO GUIDE Interfacing Buzzer with LPC2148 ARM

ARM HOW-TO GUIDE Interfacing Keypad with LPC2148 ARM

ARM HOW-TO GUIDE Interfacing Stepper Motor with LPC2148

ARM HOW-TO GUIDE Interfacing GPS with LPC2148 ARM

ARM HOW-TO GUIDE Interfacing I2C-7SEG with LPC2148 ARM

Texas Instruments Microcontroller HOW-TO GUIDE Interfacing Keypad with MSP430F5529

8085 HOW-TO GUIDE Interfacing 8251 with 8085

Evaluation board for NXP LPC2103. User Guide. Preliminary Version updated 27 th Aug TechToys Company All Rights Reserved

Lab Experiment 9: LCD Display

LCD. Configuration and Programming

EMBEDDED HARDWARE DESIGN. Tutorial Interfacing LCD with Microcontroller /I

ﻢﯿﺣﺮﻟا ﻦﻤﺣﺮﻟا ﷲا ﻢﺴﺑ

LPC1788 Mio Board. The functional details of the board are as follows-

LPC1768 Industrial Reference Design Platform System Development Kit Version 1.3. May 2009

Basic Input/Output Operations

8051 Intermidiate Development Board. Product Manual. Contents. 1) Overview 2) Features 3) Using the board 4) Troubleshooting and getting help

LPC2468 Industrial Reference Design Platform System Development Kit Version 1.2. August 2008

P89V51RD2 Development Board May 2010

LPC2148 DEV BOARD. User Manual.

LABORATORY MANUAL Interfacing LCD 16x2, Keypad 4x4 and 7Segment Display to PIC18F4580

Building the FlipChip Tester

CEIBO FE-5111 Development System

LPC1788 Mio Board. User Manual. Revision 1.0 1

Lab 3 LCD Mar

Laboratory 3 Working with the LCD shield and the interrupt system

LCDs. Embedded Systems Interfacing. 20 September 2011

ecee NXP LPC 2138 ARM Development Board

CoiNel Technology Solutions LLP. LPC2148 ARTIST Instruction Manual LPC2148 ARTIST. Instruction manual. Revision 1

EM-LPC1700 Evaluation Board User Manual V1.2

CLCD1 Serial 1 wire RS232 LCD development board

Future Designs, Inc. Your Development Partner LCD DEMO KITS

DEV-1 HamStack Development Board

8051 Advance Trainer

SWITCH 10 KILOHM RESISTOR 220 OHM RESISTOR POTENTIOMETER LCD SCREEN INGREDIENTS

Interfacing GLCD(128x64) with PIC16F877A

Application Note. Interfacing to a Graphics LCD from PSoC. Summary This Application Note describes how to control a graphic LCD in a PSoC application.

Product Information. Features. Table of Contents EA DIP162 DN3LW EA DIP162 DHNLED EA DIP162 DNLED EA DIP162J DN3LW

Objectives : 1) To study the typical design of a LCD module 2) To interface the digital display unit through parallel printer port using C# program.

GIE 8051 Professional Kit. User Manual

The industrial technology is rapidly moving towards ARM based solutions. Keeping this in mind, we are providing a Embedded ARM Training Suite.

EPM900 - Overview. Features. Technical Data

DS Presented by: Date:

Lab 5: LCD and A/D: Digital Voltmeter

FiO Lite Datasheet FEATURES SAMPLE APPLICATIONS. FiO Lite

Lab 5: LCD and A/D: Digital Voltmeter

Display Real Time Clock (RTC) On LCD. Version 1.2. Aug Cytron Technologies Sdn. Bhd.

Diploma in Embedded Systems

LCD Module User Manual

AVR Peripheral Board. Campus Component Pvt. Ltd.

Bolt 18F2550 System Hardware Manual

acret Ameya Centre for Robotics & Embedded Technology Syllabus for Diploma in Embedded Systems (Total Eight Modules-4 Months -320 Hrs.

CONTENTS. dspicpro4 KEY FEATURES 4 CONNECTING THE SYSTEM 5 INTRODUCTION 6

MegaAVR-DEVelopment Board Progressive Resources LLC 4105 Vincennes Road Indianapolis, IN (317) (317) FAX

8051 Basic Development Board. Product Manual. Contents. 1) Overview 2) Features 3) Using the board 4) Troubleshooting and getting help

Phi-panel backpack assembly and keypad options Dr. John Liu 12/16/2012

2 in 1. BigAVR User s Manual AVR. MikroElektronika. Software and Hardware solutions for Embedded World

AZ DISPLAYS, INC. SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY DATE: July 1, Page 1 of 13

RFID: Read and Display V2010. Version 1.1. Sept Cytron Technologies Sdn. Bhd.

NFC NUTSHELL KIT. MCU Modules USER MANUAL REVISION GMMC GmbH Keywords Abstract. Document information

Flash Magic Application Note 4 What to do if ISP Does Not Work Embedded Systems Academy 2003, All Rights Reserved

Getting Started with STK200 Dragon

Document status: Preliminary

POTENTIOMETER. Revision Class. Instructor / Professor LICENSE

AN1745. Interfacing the HC705C8A to an LCD Module By Mark Glenewinkel Consumer Systems Group Austin, Texas. Introduction

OLED Engineering Kits User Manual

Adafruit Metro Mini. Created by lady ada. Last updated on :12:28 PM UTC

Evaluation board for NXP LPC2103 USE GNU ARM UNDER KEIL IDE

DEMO9S08LG32 Up to 5V MCU with integrated LCD display driver

DATA SHEET. PCF2113x LCD controller/driver INTEGRATED CIRCUITS Apr 04

ECE 254/MTE241 Lab1 Tutorial Keil IDE and RL-RTX Last updated: 2012/09/25

ELCT501 Digital System Design Winter Tutorial #11 FPGA Complete Design Flow with LCD Example

MULTISENSOR SYSTEM USING LPC2148 MICROCONTROLLER

Interfacing Graphics LCD (GLCD)

TL0313. LCD driver IC. Apr VER 0.0. lsi. ( 5.5V Specification ) 65COM / 132SEG DRIVER & CONTROLLER FOR STN LCD. TOMATO LSI Inc.

KIT 134. INTRODUCTION TO LCD S

DOT MATRIX CHARACTER LCD MODULE USER S MANUAL

AXE131 OLED/LCD DRIVER KIT

melabs Serial LCD Firmware Version 1.0 2/7/07

ET-JR ARM7 LPC2214 Development Board

Lecture (03) PIC16F84 (2)

Embedded Systems and Software. LCD Displays

8051 General Purpose Board

AUTOMATIC RESTAURANT ORDER SYSTEM USING ZIGBEE

PIC 28 Pin Board Documentation. Update Version 5.0

Exclusive 2.5 GHz Frequency Counter

8051 Microcontroller Interrupts

Chapter 4. Enhancing ARM7 architecture by embedding RTOS

JE-AN ELECTRONICS CO.,LTD. Spec. No: WG240128A

melabs Serial LCD Firmware Version 1.1 3/5/07

AC/DC Adapter. Figure 1. Hardware Setup

Demo 17 - Receiving data from Host through Serial Port. Introduction:

SSD1803. Product Preview. 100 x 34 STN LCD Segment / Common Mono Driver with Controller

INTERFACING 16 2 LCD WITH 8051

Parallel Display Specifications Revision 1.0

LCD Module User Manual

Introduction 1. Liquid crystal display (16 characters by 2 rows) Contrast dial: turn the dial to adjust the contrast of the display (see page 5)

Transcription:

ARM HOW-TO GUIDE Interfacing GLCD with LPC2148 ARM

Contents at a Glance ARM7 LPC2148 Evaluation Board... 3 GLCD (Graphical Liquid Crystal Display)... 3 Interfacing GLCD... 4 Description of GLCD... 5 Interfacing GLCD with LPC2148... 14 Pin Assignment with LPC2148... 14 Circuit Diagram to Interface GLCD with LPC2148... 15 Source Code... 15 C Program to display a text in GLCD using LPC2148... 16 Testing the Graphical LCD Module with LPC2148... 18 General Information... 19

ARM7 LPC2148 Evaluation Board The ARM7 LPC2148 Evaluation board is specifically designed to help students to master the required skills in the area of embedded systems. The kit is designed in such way that all the possible features of the microcontroller will be easily used by the students. The kit supports in system programming (ISP) which is done through serial port. NXP s ARM7 (LPC2148), ARM Evaluation Kit is proposed to smooth the progress of developing and debugging of various designs encompassing of High speed 32-bit Microcontrollers. GLCD (Graphical Liquid Crystal Display) The Graphics LCD as the name suggests is a type of LCD which can display graphics. The graphical representation of any data presents good understanding than just characters. More user friendly applications can be designed by using the graphical LCDs.

Interfacing GLCD Fig. 1 shows how to interface the GLCD to microcontroller. The 128X64 Graphical LCD interfaces to adjust contrast through trim pot. The GLCD needed to create 8-bit interface; 8 data bits (D0 D7), three control lines, address bit (RS), read/write bit (R/W) and control signal (E), Page Select (CS). Fig. 1 Interfacing GLCD to Microcontroller

Description of GLCD The GLCD is divided into two parts which are controlled by two different controllers. Each of these parts is divided into rows and columns. To interface this GLCD with microcontroller, two registers (Input and Output register) are provided in the LCD. These registers are selected by the combination of RS and RW signals. These combinations are given in the following Table1. R/W RS Function L H L H L H Send Instruction Data Write (From Input Register to DDRAM) Status Check (Busy Read) Data Read (From DDRAM to Output Register) Input Register: Table1 Input Register is used while giving instructions and writing data to LCD. It holds the data/instruction temporarily before writing to DDRAM (Data Display RAM).

When the LCD is in active mode (CS1 and CS2 high), the Input register can be selected by sending bits on RS and RW pins as shown in the following table. The data of input register is latched in at the falling edge (from high to low) of EN (Enable) signal and written into DDRAM automatically through internal operation. Output Register: Output Register is used to read data from DDRAM and to check status data (busy check). When the LCD is in active mode (CS1 and CS2 high), the Output register can be selected by sending bits on RS and RW pins as shown in the following table. When R/W and RS are high, data is latched into output register and when R/W=H, RS=L, status data (busy check) can be read out. The basic operation with graphical LCD requires following steps: 1. LCD Initialization 2. Page Selection

3. Column Selection 4. Data Display All these steps have been explained in the following sections with corresponding instruction sets. 1. LCD Initialization Before displaying anything on graphics LCD, it must be initialized, i.e., display must be put on and column/page selection be made. This is achieved by giving proper instructions to the LCD. To make Display On\Off the following set of instructions must be followed in order: a) Put these values in Data Register DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 1 1 1 1 1 D Data appears when D=1 and disappears when D=0. When the display is off, there is no effect on the data which is stored in DDRAM.

b) CS1=1, CS2=1(to activate display of both halves of LCD) c) RS=0, R/W=0 (to select the instruction mode) d) EN=1 e) Delay f) EN=0 (to latch data into the input register) Display on/off function can also be used to blink data continuously on the LCD by switching the display with some delay. 2. Page selection Before writing any data, the page of LCD must be selected. Page can be selected through following steps: a) Put these values in Data Register DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 1 0 1 1 1 X3 X2 X1

Since there are a total of 8 pages (0 7), a particular page is selected by setting three bits (X1-X3). b) CS1=1, CS2=1(to activate display of both halves of LCD) c) RS=0, R/W=0 (to select the instruction mode) d) EN=1 e) Delay f) EN=0 (to latch data into the input register) For example, if X3=0, X2=1 and X1=0, and then the second page is selected. Reading or writing operation is done on this page until next page is set. Depending on the column selection, the page is selected from either left or right half of the graphics LCD. 3. Column selection There are 128 [64 (=2 6 ) columns per half] in graphics LCD and they are automatically incremented. This means that after selecting a column, it increases on its own by one, after each write cycle.

So it is easier to write data column by column. A column can be chosen through following instructions: a) Put these values in Data Register DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 1 Y5 Y4 Y3 Y2 Y1 Y0 The corresponding controller (CS1 or CS2) is selected depending on the Column number as shown below.

b) RS=0, R/W=0 (to select the instruction mode) c) EN=1 d) Delay e) EN=0 (to latch data into the input register) For example, if Page address is 0 and Column address is 0, then 0 th column of page 0 is selected, i.e., the first pixel will be selected which is highlighted in the following diagram.

4. Display data After page and column selection, data can be sent to LCD for display. The programming steps for display data are as given below: a) Put the data values in Data Register. With every write cycle, data is written in one column and the column then gets auto-incremented. A high data bit (DBx = 1) corresponds to activated (dark) pixel and low data bit (DBx = 0) corresponds to deactivated (light) pixel. Here MSB corresponds to 8 th row in column and LSB to 1 st row of column. b) If column<63 then (CS1=1 & CS2=0) else (CS1=0 & CS2=1) c) RS=1 and R/W=0 (to select write mode of LCD) d) EN=1 e) Delay f) EN=0 (to latch data into the input register)

If data port is given value 0x99 or 10011001 then column takes the values as shown below. The following points can be included in above programming steps for efficient programming: 1. While sending data to be written with array, one can specify the array limit as well. This limit signifies the number of columns one wants to write at once. If the limit is 8, eight columns will be written at once and if it is 7, seven columns will be written in one go. 2. The condition if (column >127) can be used to return the control back to the main function if the limit exceeds the number of columns present in the LCD. 3. The function for setting column should be called again if array limit condition doesn t fit in left page and has to be extended to right page too. 4. Though column address increases itself by one but one variable should be taken to check the conditions (ii) & (iii) explained above.

LCD DATA LINES CONTROL L LINES Interfacing GLCD with LPC2148 We now want to display a text in LPC2148 Evaluation Board by using GLCD module. In LPC2148 Evaluation Board contains the LCD and GLCD connections in a single header. The ARM7 LPC2148 Evaluation board has numbers of GLCD connections, connected with I/O Port lines (P1.18 P1.22 && P0.16 P0.23) to make GLCD display. Pin Assignment with LPC2148 GLCD/LCD LPC2148 LCD 128x64 GLCD Selection CS1 P1.18 CS2 P1.19 RS P1.20 R/W P1.21 JP7 1 1 2 3 2 3 - LCD Select - GLCD E P1.22 RST P1.23 DB0 P0.16 DB1 P0.17 DB2 P0.18 DB3 P0.19 DB4 P0.20 DB5 P0.21 DB6 P0.22 DB7 P0.23

P0.15 P0.14 P0.13 P0.12 P0.11 P0.10 P0.9 P0.8 P0.7 P0.6 P0.5 P0.4 P0.3 P0.2 P0.1 P0.0 61 62 45 41 39 38 37 35 34 33 31 30 29 27 26 22 21 19 XTAL2 XTAL1 P0.15 P0.14 P0.13 P0.12 P0.11 P0.10 P0.9 P0.8 P0.7 P0.6 P0.5 P0.4 P0.3 P0.2 P0.1 P0.0 D- D+ VREF VDD1 VDD2 VDD3 VDDA P0.31 P0.30 P0.29 P0.28 P0.25 P1.16 P1.17 P1.24 P1.25 P1.26 P1.27 P1.28 P1.29 P1.30 P1.31 2 11 10 63 51 43 23 7 17 15 14 13 9 16 12 32 28 24 64 60 56 52 20 D- D+ P0.31 P0.30 P0.29 P0.28 P0.25 P1.16 P1.17 P1.23 P1.24 P1.25 P1.26 P1.27 P1.28 P1.29 P1.30 Circuit Diagram to Interface GLCD with LPC2148 +3.3V LCD/GLCD +5V VBAT RST RTXC1 RTXC2 6 18 25 42 50 59 49 57 3 5 U5 VSS1 VSS2 VSS3 VSS4 VSS5 VSSA VBAT RESET RTXC1 RTXC2 P1.18 P1.19 P1.20 P1.21 P1.22 LPC2148 P0.16 P0.17 P0.18 P0.19 P0.20 P0.21 P0.22 P0.23 P1.23 8 4 48 44 40 46 47 53 54 55 1 2 58 36 1 2 3 J11 +5V 1 2 3 R31 10K 1 3 RS R/W EN D0 D1 D2 D3 D4 D5 D6 D7 RST R36 CS1 CS2 10E +5V 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 J13 24 23 22 21 GLCD 12MHz C14 X5 C15 22pf 22pf Source Code The Interfacing GLCD with LPC2148 program is very simple and straight forward, which display a text in 128 X 64 GLCD modules. Some delay is occurring when a single command / data is executed.

C Program to display a text in GLCD using LPC2148 *************************************************************************************** Title : Program to GLCD display *************************************************************************************** #include <lpc214x.h> #include "Glcd.h" #include "bmp_maska.h" #include "Utility.h" unsigned char ii; char *sometext; int main (void) { PINSEL0 = 0; PINSEL1 = 0; PINSEL2 &= 0x0000000C; PINSEL2 = 0x00000030; DelayProc(0.2 * CCLOCK); IODIR0 = 0; Glcd_Init(&IOPIN1, // Control lines Port &IOPIN0, // Data Lines Port 18, // CS1# 19, // CS2# 20, // RS 21, // R/W# 23, // RST 22, // EN 16); // D0 data line position

} } while (1) { Glcd_Fill(0x00); Glcd_Image( maska_bmp ); DelayProc(2.0 * CCLOCK); Glcd_Fill(0x00); Glcd_Line(120,1, 5,60, 1); Glcd_Line(12,42, 5,60, 1); DelayProc(1.0 * CCLOCK); Glcd_Rectangle(12,20, 93,57, 1); DelayProc(1.0 * CCLOCK); Glcd_Line(120,12, 12,60, 1); DelayProc(1.0 * CCLOCK); for (ii = 1; ii <= 10; ii++) Glcd_Circle(63,32, 3*ii, 1); DelayProc(1.0 * CCLOCK); Glcd_Box(12,20, 70,57, 2); DelayProc(1.0 * CCLOCK); sometext = "BIG:ONE"; DelayProc(1.0 * CCLOCK); To compile the above C code you need the KEIL software. They must be properly set up and a project with correct settings must be created in order to compile the code. To compile the above code, the C file must be added to the project.

In Keil, you want to develop or debug the project without any hardware setup. You must compile the code for generating HEX file. In debugging Mode, you want to check the port output without microcontroller Evaluation Board. The Flash Magic software is used to download the hex file into your microcontroller through UART0. Testing the Graphical LCD Module with LPC2148 Give +3.3V power supply to LPC2148 Evaluation Board; the Graphical LCD is connected with microcontroller LPC2148 Board. When the program is downloading into LPC2148 in Evaluation Board, the screen should show the picture output. If you not reading any output from Graphical LCD, then you just check the jumper connections & adjust the trim pot level. Otherwise you just check it with debugging mode in Keil. If you want to see more details about debugging just see the videos in below link. How to Create & Debug a Project in Keil.

General Information For proper working use the components of exact values as shown in Circuit file. Wherever possible use new components. Solder everything in a clean way. A major problem arises due to improper soldering, solder jumps and loose joints. Use the exact value crystal shown in schematic. More instructions are available in following articles, User Manual of LPC2148 Evaluation Board. Interfacing LCD with LPC2148. Tutorial of how to create & Debug a project in Keil.

Did you enjoy the read? Pantech solutions creates information packed technical documents like this one every month. And our website is a rich and trusted resource used by a vibrant online community of more than 1, 00,000 members from organization of all shapes and sizes.

What do we sell? Our products range from Various Microcontroller development boards, DSP Boards, FPGA/CPLD boards, Communication Kits, Power electronics, Basic electronics, Robotics, Sensors, Electronic components and much more. Our goal is to make finding the parts and information you need easier and affordable so you can create awesome projects and training from Basic to Cutting edge technology.