UNIVERSAL COLLEGE OF ENGINEERING & TECHNOLOGY

Slides:



Advertisements
Similar presentations
Introduction to Micro-controllers Anurag Dwivedi.
Advertisements

Input/Output (I/O) Ports and Interfacing
 | bit OR & bit AND ~ bit NOT ^ bit EXLUSIVE OR (XOR) > bit RIGHT SHIFT.
Railway Foundation Electronic, Electrical and Processor Engineering.
Embedded Programming and Robotics Lesson 9 Keypad and LCD Display 1.
Teachers Name : Suman Sarker Telecommunication Technology Subject Name : Microcontroller & Embedded System Subject Code : 6871 Semester : 7th Department.
16x2 LCD Module on DE2-115 數位電路實驗 TA: 吳柏辰 Author: Trumen.
KyungHee Univ. 2-0 Parallel Port LCD Interface with the HD44780 Controller.
PIC microcontrollers. PIC microcontrollers come in a wide range of packages from small chips with only 8 pins and 512 words of memory all the way up to.
Overview What kind of LCD Interfacing the LCD Displaying Text and Numbers Common Issues.
Digital Outputs LCD Display
Input/Output Ports and Interfacing
Instrumentation & Control Engg. Section Electrical Engineering Department Ahmedabad , Gujarat.
LCD Interfacing.
CS-280 Dr. Mark L. Hornick 1 Programming for the LCD Display.
UniMAP 1 Interfacing Peripherals. UniMAP 2 Interfacing devices on Embedded Linux In general, to interface to a device connected to an embedded Linux platform.
Chapter 10 Glass Bliss Using the Parallel Master Port to communicate with Alphanumeric LCD displays.
Programming Microcontrollers in C Lecture L7.1. C Data Types TypeSizeRange char1 byte-128 – 127 unsigned char1 byte0 – 255 Int2 bytes – unsigned.
Department of Electronic & Electrical Engineering LCD character display (parallel interface). How to interface a LCD character display to a PIC.
Department of Electronic & Electrical Engineering Lecture 2 ● Introduction to IO ● Using a subroutine ● Driving a 7seg display.
ECE 447 Fall 2009 Lecture 12: TI MSP430 External LCD.
I/O Devices Switches, LED, LCD
Vishwakarma government engineering college Prepare by. Hardik Jolapara( ) LCD Interfacing with ATmega16.
LED AND KEYBOARD INTERFACING PREPARED BY :- PREPARED BY :- RAVAL AKASH ( ) RAVAL AKASH ( ) PATEL HARDIK ( ) PATEL HARDIK.
A.D.Patel institute of technology Sub : LCD and Keyboard interfacing with AVR. prepared by, chokshi abhi p ( ) Guided by, Prof. Asif Thakor.
Introduction to Projects using Microcontroller Md. Khalilur Rhaman Credit: Interface Lab.
Interfacing of Input/Output devices with AVR Microcontroller Enrolment No. : Name of the student: SOMAIYA ISHA.
Sitarambhai Naranjibhai Patel Institute of Technology and Research Centre, Umrakh, Bardoli. A Presentation On “ 16x2 LCD Interfacing with AVR atmega32.
LCD AND LCD INTERFACING. INDEX:-  INTRODUCTION  PIN DISCRIPTION  INITIALIZATION OF LCD  LCD INTERFACING  LCD INTERFACING WITH ATMEGA 32  INTERFACING.
CEng3361 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2011 Recitation 06.
Project Title PASSWORD BASED CIRCUIT BREAKER CONTROL TO ENSURE ELECTRIC LINE MAN’S SAFETY Under the Guidance of Submitted by.
ARDUINO BASED UNDERGROUND CABLE FAULT DETECTION
Scrolling LCD using Arduino.
Peripherals – Keypad The Keypad provides a simple means of numerical data or control input. The keys can be attributed whatever data or control values.
LCD Interfacing using Atmega 32
SUBMITTED BY EDGEFX TEAM
SUBMITTED BY EDGEFX TEAM
ABSTRACT The outline of the project is Cycle stealing, as a method to remove whole cycle to control AC power the concept of achieving the cycle stealing.
ARDUINO BASED AUTOMATIC TEMPERATURE BASED FAN SPEED CONTROLLER
Display Devices 16 x 2 lcd display.
4-Integrating Peripherals in Embedded Systems (cont.)
CS4101 Introduction to Embedded Systems Lab 10: Tasks and Scheduling
ULTRASONIC DISTANCE METER USING 8051
LCD and Keyboard Interfacing
SUBMITTED BY EDGEFX TEAM
GANDHINAGAR INSTITUTE OF TECHNOLOGY
IPCOWALA INSTITUTE OF ENGINEERING & TECHNOLOGY-DHARMAJ
Liquid Crystal Display Arduino
DIGITAL CALCULATOR USING 8051
Interfacing of LCD with µP
OBJECTIVE AND FEATURES:
SMART CARD ENABLED EMPLOYEE IDENTIFICATION FOR SECURITY PURPOSE
Chapter 9 Alphanumeric Displays
ARDUINO DC MOTR SPEED CTL
SUBMITTED BY EDGEFX TEAM
EET 2261 Unit 11 Controlling LCD and Keypad
LCD and Keyboard Interfacing
EET 2261 Unit 11 Controlling LCD and Keypad
LCD and Keyboard Interfacing
AVR Programming in C Chapter 7
LCD and Keyboard Interfacing
LCD and Keyboard Sepehr Naimi
HD44780 LCD programming From the Hardware Side
HD44780 LCD programming From the Hardware Side
8051 Micro Controller.
LCD and Keyboard Interfacing
CTY SAR FCPS Shawn Lupoli, Elliot Tan
LCD (LIQUID CRISTAL DISPLAY) SCREENS
INTERRUPTS.
Presentation transcript:

UNIVERSAL COLLEGE OF ENGINEERING & TECHNOLOGY

Microcontroller & Interfacing E.C Engg. Parmar Ramendra (140463111001) Guided by :- Prof. Parth Patel (E.C Department)

LCD (Liquid Crystal Display ) Interfacing with ATmega32

What is LCD ? LCD stands for Liquid Crystal Display, it is an electronic device which is used for data display. LCDs are preferable over seven segments and LEDs as they can easily represent data in form of alphabets, characters, numbers or animations. LCDs are very easy to program and make your work quite attractive and simple. Numerous types of LCDs are available in market such as 16X2, 16X4, 20X2, 20X4, graphical LCDs (128X64) etc. The LCD which we are using is 16X2 alphanumeric LCD, it display 32 characters in two rows means in one row we have 16 characters.

Pin Description of LCD Pins Symbol Functions 1 Vss Supply pin (+5V DC) 2 Vdd Ground pin 3 VEE Contrast pin 4 RS Register selection pin (Either Data or Command) RS=0 Command register RS=1 Data register 5 RW Selects Read or Write operation RW=0 Write operation RW=1 Read operation 6 E Enable pin

Pin Description of LCD Pins Symbol Functions 7 DB0 Data bus bit 0 8 9 DB2 Data bus bit 2 10 DB3 Data bus bit 3 11 DB4 Data bus bit 4 12 DB5 Data bus bit 5 13 DB6 Data bus bit 6 14 DB7 Data bus bit 7 (Also used as Busy pin)

How to Program LCD ? Basically there are two registers, command and data. When we are giving command to LCD, we select command register and when we are sending data to LCD for display, we select data register. Command is an instruction given to LCD in order to perform required function according to the given command. In order to display textual information, data is send to LCD.

Sending Commands & Data on LCD For sending commands on LCD we have to write command on data pins. For this, selects: RS = 0 selects command register RW = 1 selects write operation E = make enable pin from high to low Sending Data :- For sending data on LCD we have to write data on data pins. For this, selects: RS = 1 selects data register RW = 0 selects write operation

LCD Interfacing circuit with ATmega32

Code for interfacing LCD We use Atmel studio 6 for development of code and the code is written in C language. #include<avr/io.h> #include<util/delay.h> #define LCD_data PORTA #define ctrl PORTB #define en PB2 #define rw PB1 #define rs PB0

Continue…. void LCD_cmd(unsigned char cmd); void init_LCD (void); void LCD_write(unsigned char data); void LCD_write_string(); unsigned int press; int main (void) { DDRA=0XFF; DDRB=0X07; init_LCD(); LCD_write_string("Ramendra Parmar");

Continue…. LCD_cmd(0xc0); return 0; } void init_LCD(void) { LCD_cmd(0x38); _delay_ms(1);

Continue…. _delay_ms(1); LCD_cmd(0x38); LCD_cmd(0x06); LCD_cmd(0x0c); LCD_cmd(0x01);

Continue…. LCD_cmd(0x02); _delay_ms(1); return ; } void LCD_cmd(unsigned char cmd) { PORTA=cmd; ctrl=(0<<rs)|(0<<rw)|(1<<en); ctrl=(0<<rs)|(0<<rw)|(0<<en); _delay_ms(150);

Continue…. return; } void LCD_write(unsigned char data) { PORTA=data; ctrl=(1<<rs)|(0<<rw)|(1<<en); _delay_ms(1); ctrl=(1<<rs)|(0<<rw)|(0<<en); _delay_ms(150);

Continue…. void LCD_write_string(unsigned char *str) { int i=0; while(str[i]!='\0') LCD_write(str[i]); i++; } return;

Basic commands used in LCD display Hex Command Functions 0x01 Clear screen 0x02 return home 0x04 Cursor decrement 0x05 Display shifts to right 0x06 Cursor increment 0x07 Display shifts to left 0x08 Cursor and display OFF 0x10 Cursor position Shifts to left 0x14 Cursor position shifts to right

Basic commands used in LCD display Hex Command Functions 0x80 Move cursor to the beginning of first line 0x0C Display ON, cursor OFF 0XC0 Move cursor to the beginning of second line 0x0A Display OFF, cursor ON 0x0E Display ON, cursor blinking 0x30 For display in one line in 8-bit mode 0x20 For display in one line in 4-bit mode 0x18 Shift complete data to left side 0x1C Shift complete data to right side

Thank You….