Sitarambhai Naranjibhai Patel Institute of Technology and Research Centre, Umrakh, Bardoli. A Presentation On “ 16x2 LCD Interfacing with AVR atmega32.

Slides:



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

Lab7: Introduction to Arduino
What is Arduino?  Arduino is a ATMEL 168 micro-controller kit designed specially for small projects  User friendly IDE(Integrated Development Environment)
Embedded Sumo 1T4 – 1T5 UTRA.
kashanu.ac.ir Microprocessors 6-1 I/O Devices Switches, LED, LCD Lec note 6.
Input/Output (I/O) Ports and Interfacing
Input/Output Ports and Interfacing ELEC 330 Digital Systems Engineering Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning.
MICRO-CONTROLLER: A microcontroller is the brain of the robot: These are: 1. Integrated Circuits (ICs) 2. Programmable.
 | bit OR & bit AND ~ bit NOT ^ bit EXLUSIVE OR (XOR) > bit RIGHT SHIFT.
Outline  Examine some of the H/W supplied with a typical PC and consider the software required to control it.  Introduce Commkit, a software tool that.
Embedded Systems Design 1 Lecture Set B Interfacing the MCS-51 to: –7 and 16 segment displays –a Multiplexed 7-Segment Display –a Keypad –an LCD.
ASPPRATECH.
Embedded Programming and Robotics Lesson 9 Keypad and LCD Display 1.
 Main Components:  Sensors  Micro controller  Motor drivers  Chasis.
Teachers Name : Suman Sarker Telecommunication Technology Subject Name : Microcontroller & Embedded System Subject Code : 6871 Semester : 7th Department.
You must be knowing about Digital Integrated Circuits (ICs) right ? For example 7404: Hex Inverter 7408: Quad 2-input AND gate 7410: Triple 3-input NAND.
Overview What kind of LCD Interfacing the LCD Displaying Text and Numbers Common Issues.
Digital Outputs LCD Display
Embedded Systems Programming 1 ETEE 3285 Topic HW3: Coding, Compiling, Simulating.
Input/Output Ports and Interfacing
MOBILE OPERATING ROBOT ON EMBEDDED SYSTEM
1 Lab 1: Introduction. 2 Configure ATMEL AVR Starter Kit 500 (STK500), a prototyping/development board for Lab1. ATmega16 ( V) is the chip used.
Instrumentation & Control Engg. Section Electrical Engineering Department Ahmedabad , Gujarat.
Franz Duran INTRODUCTION TO A RDUINO PROGRAMMING & INTERFACING Engr. Franz Duran, MEP-ECE RapidSignal Electronics.
LCD Interfacing.
ATMEL AVR 8 bit RISC MICROCONTROLLERS a general comparison.
Timers and Interrupts Anurag Dwivedi. Let Us Revise.
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.
Alpha/Numeric Keypad Functions using AVR Preliminary Design Review Luke R. Morgan ECE /17/2008.
Arduino Mega Arduino Mega 2560 Arduino Mega 2560.
ECE 447 Fall 2009 Lecture 12: TI MSP430 External LCD.
I/O Devices Switches, LED, LCD
Password Based Door Lock System using 8051 Microcontroller
Gsm Modems Based Irrigation Water Pump Controller for Illiterates
Introduction to AVR Name : 1) Abhishek Yadav ) Prakash Giri ) Kheni Niral ) Bhadresh Langadiya Branch.
Vishwakarma government engineering college Prepare by. Hardik Jolapara( ) LCD Interfacing with ATmega16.
Presentation By :- Nikhil R. Anande ( ) Electronic & Communication Engineering. 3 nd Year / 5 th Semester FACULTY GUIDE : RAHIUL PATEL SIR MICROCONTROLLER.
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.
SUBMITTED BY EDGEFX TEAM PORTABLE CODED WIRELESS MESSAGE COMMUNICATION BETWEEN TWO PARTIES SECRETLY WITH LCD DISPLAY.
7 SEGMENT INTERFACE WITH AVR MICROCONTROLLER A. D. Patel Institute Of Technology EC :- Sem VPresent By :- Pratik Makadia ( ) 23 June
1 Lab 4: D/A Converter Lab 4: D/A Converter This is a simple resistive network for a D/A converter Port 1, Port 0 are digital inputs ==> 00 (minimum),
LCD AND LCD INTERFACING. INDEX:-  INTRODUCTION  PIN DISCRIPTION  INITIALIZATION OF LCD  LCD INTERFACING  LCD INTERFACING WITH ATMEGA 32  INTERFACING.
ARDUINO BASED UNDERGROUND CABLE FAULT DETECTION
Introduction of Embedded C and demo programs
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
Fundamentals of Computer Engineering
ARDUINO BASED AUTOMATIC TEMPERATURE BASED FAN SPEED CONTROLLER
Display Devices 16 x 2 lcd display.
LCD and Keyboard Interfacing
UNIVERSAL COLLEGE OF ENGINEERING & TECHNOLOGY
GANDHINAGAR INSTITUTE OF TECHNOLOGY
IPCOWALA INSTITUTE OF ENGINEERING & TECHNOLOGY-DHARMAJ
DIGITAL CALCULATOR USING 8051
OBJECTIVE AND FEATURES:
‘SONAR’ using Arduino & ultrasonic distance sensor
EET 2261 Unit 11 Controlling LCD and Keypad
LCD and Keyboard Interfacing
EET 2261 Unit 11 Controlling LCD and Keypad
LCD and Keyboard Interfacing
LCD and Keyboard Interfacing
LCD and Keyboard Sepehr Naimi
8051 Micro Controller.
LCD and Keyboard Interfacing
CTY SAR FCPS Shawn Lupoli, Elliot Tan
LCD (LIQUID CRISTAL DISPLAY) SCREENS
Presentation transcript:

Sitarambhai Naranjibhai Patel Institute of Technology and Research Centre, Umrakh, Bardoli. A Presentation On “ 16x2 LCD Interfacing with AVR atmega32 microcontroller ” Under subject of Microcontroller & Interfacing,B.E. : Sem – 5 (Electronics and Communication Branch)

Prof. Vipul Mistry Guided By : Prof. Vipul Mistry Prof. Krunal Yadav Head of Department: Prof. Vinesh Kapadia Submitted by: Group: 5 Sr. No.Name Of Student Enrollment No. 1Bhagtani Namrata Pathan Farhin Savaliya Juhi Shroff Megha

Introduction This presentation includes what LCD is and how to interface LCD with AVR microcontroller Atmega32 using 8-bit mode. What is the basic difference between 8-bit mode and 4-bit mode? How to write code for LCD interfacing in C language and what are the basic commands used for LCD programming. It also includes how to program LCD and sends command/ data to LCD.

Hardware requirements: Atmega32 ic 16x2 lcd display Breadboard 8Mhz crystal oscillator Power supply Software requirements: AVR studio 4 Proteus 7

WHAT IS LCD? LCD stands for Liquid Crystal Display, 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 16X2 LCD can interface with AVR microcontroller by using two modes, 4-bit mode or 8-bit mode. Here we will use 8-bit mode for interfacing. In 8-bit mode we send command to LCD by using eight data lines (D0-D7) while in 4-bit mode we use four data lines (D5-D7) for sending command and data. These data lines can be connected to any port of Atmega32.

PIN NO.PIN NAMEDESCRIPTION 1V CC Supply pin (+5V DC) 2V DD Ground pin 3V EE Contrast pin 4RS Register selection pin (either data or command)RS=0: Command Register, RS=1: Data Register

PIN NO.PIN NAMEDESCRIPTION 5RW Selects Read or Write operationRW=0: for write RW=1: for read 6EEnable pin 7D0Data pin 0 8D1Data pin 1 9D2Data pin 2 10D3Data pin 3 11D4Data pin 4 12D5Data pin 5 13D6Data pin 6 14D7Data pin 7

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 ON LCD For sending commands on LCD we have to write command on data pins. For this, selects: RS = 0 >> selects command register RW = 0 >> selects write operation E>> make enable pin from high to low

SENDING DATA ON LCD 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 E >> make enable pin from high to low

CODE FOR INTERFACING LCD #include command_write (unsigned char); data_write (unsigned char); ready(); main(); delay(); { unsigned char command[]={0x38,0x01,0x0e,0x06,0x80}; unsigned char data[]={'V','B','I','T'}; unsigned char i; DDRA=0xFF; // configure port A as output port DDRB=0x07; // configure port B as output port

for(i=0;i<=4;i++) // for loop execution 4 times { command_write(command[i]); //command write from unsigned char command _delay_ms(2); // 2ms delay } for(i=0;i<=7;i++) //for loop execution 7 times { data_write(data[i]); // data write from unsigned char data } }

//subroutine command_write (unsigned char m) { _delay_ms(5); //5ms delay PORTA=m; // port A is equal to unsigned char m PORTB=PORTB & 0xFE; //logical END between port B and 0xFE PORTB=PORTB & 0xFD;//logical END between port B and 0xFE PORTB=PORTB |0x04; //logical OR between port B and 0x04 _delay_ms(2); //2ms delay PORTB=PORTB & 0xFB; //logical AND between port B and 0xFD }

data_write(unsigned char n) { _delay_ms(5); //5ms delay PORTA=n; // port A is equal to unsigned char n PORTB=PORTB | 0x01; //logical OR between port B and 0x01 PORTB=PORTB & 0xFD; //logical AND between port B and 0xFD PORTB=PORTB | 0x04; //logical OR between port B and 0x04 _delay_ms(2); //2ms delay PORTB=PORTB & 0xFB; //logical AND between port B and 0xFD }

Void ready() { DDRB=DDRA & 0xFF; //logical END between DDRA and 0xFF PORTB=PORTB & 0xFE //logical END between port B and 0xFE PORTB=PORTB | 0x02; //logical OR between port B and 0x02 PORTB=PORTB & 0xFB; //logical END between DDRA and 0xFB _delay_ms(2); //2ms delay PORTB=PORTB | 0x04; //logical OR between port B and 0x04 while( PORTB&0x08); // while loop execution and logical AND between port B and 0x08 DDRA=DDRA|0x01; //logical END between DDRA and 0x01 }

SIMULATION ON PROTEUS Compile the above code and dump the HEX file in AVR microcontroller. Make necessary settings and check the display on LCD.

SCHEMATIC We design our circuit on proteus. Circuit diagram is given below :

BASIC COMMANDS USED IN LCD DISPLAY COMMANDSDESCRIPTION 0x01Clear screen 0x02return home 0x04Cursor decrement 0x05Display shifts to right 0x07Display shifts to left 0x08Cursor and display OFF 0x10 Cursor position Shifts to left 0x14 Cursor position shifts to right

COMMANDSDESCRIPTION 0x80 Move cursor to the beginning of first line 0x0CDisplay ON, cursor OFF 0XC0 Move cursor to the beginning of second line 0x0ADisplay OFF, cursor ON 0x0EDisplay ON, cursor blinking 0x30For display in one line in 8-bit mode 0x20For display in one line in 4-bit mode 0x0FDisplay data on cursor blinking 0x18Shift complete data to left side 0x38Using two lines, 8-bit mode 0x28Using two lines, 4-bit mode

Thank you