A.D.Patel institute of technology Sub : LCD and Keyboard interfacing with AVR. prepared by, chokshi abhi p (130010111001) Guided by, Prof. Asif Thakor.

Slides:



Advertisements
Similar presentations
Light Led Panel Esraa Nassar Mona Amer Supervisor : Dr.Ashraf Armoush.
Advertisements

Introduction to Micro-controllers Anurag Dwivedi.
PROGRAMMABLE PERIPHERAL INTERFACE -8255
Lab7: Introduction to Arduino
Programmable Interval Timer
TK2633 Introduction to Parallel Data Interfacing DR MASRI AYOB.
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.
82C55 82C55 Programmable Peripheral Interface Interfacing Part III.
MICRO-CONTROLLER: A microcontroller is the brain of the robot: These are: 1. Integrated Circuits (ICs) 2. Programmable.
Mark Neil - Microprocessor Course 1 Decoding and Using a 4x4 Keyboard.
Embedded Systems 7763B Mt Druitt College of TAFE Electrical Engineering Lesson 2 LCD Display Interfacing.
Teachers Name : Suman Sarker Telecommunication Technology Subject Name : Microcontroller & Embedded System Subject Code : 6871 Semester : 7th Department.
Build A PIC Microcontroller EET 250. End Goal Keypad PIC16F917 LCD Display Keypad RS-232 Sensor.
Introduction to Microcontrollers Shivendu Bhushan Summer Camp ‘13.
Camera Interfacing using ARM7
Serial Communication ETEC 6416.
Digital Outputs LCD Display
 Keyboards, LCDs most widely used input/output devices of the 8051  Contents to be covered:  keyboard fundamentals  key press and key detection mechanisms.
1 4-Integrating Peripherals in Embedded Systems (cont.)
Input/Output Ports and Interfacing
1 Lab 1: Introduction. 2 Configure ATMEL AVR Starter Kit 500 (STK500), a prototyping/development board for Lab1. ATmega16 ( V) is the chip used.
FIGURE 9-1 General Parallel I/O Example Peter Spasov Microcontroller Technology: The 68HC11, Fourth Edition Copyright ©2002 by Pearson Education, Inc.
Instrumentation & Control Engg. Section Electrical Engineering Department Ahmedabad , Gujarat.
LCD Interfacing.
UniMAP 1 Interfacing Peripherals. UniMAP 2 Interfacing devices on Embedded Linux In general, to interface to a device connected to an embedded Linux platform.
8279 KEYBOARD AND DISPLAY INTERFACING
Timers and Interrupts Anurag Dwivedi. Let Us Revise.
Digital Inputs Interfacing Keypad
PPI-8255.
8279 KEYBOARD AND DISPLAY INTERFACING
Parallel I/O. Introduction This section focuses on performing parallel input and output operations on the 68HC11 3 operation types – Simple, blind data.
Department of Electronic & Electrical Engineering LCD character display (parallel interface). How to interface a LCD character display to a PIC.
KEYBOARD INTERFACING Keyboards are organized in a matrix of rows and columns The CPU accesses both rows and columns through ports. ƒTherefore, with two.
Alpha/Numeric Keypad Functions using AVR Preliminary Design Review Luke R. Morgan ECE /17/2008.
Mark Neil - Microprocessor Course 1 Decoding and Using a 4x4 Keyboard.
ECE 447 Fall 2009 Lecture 12: TI MSP430 External LCD.
ECE 447: Lecture 12 Keypads ECE 447: Lecture 10. ECE 447: Matrix Keypad.
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.
LED AND KEYBOARD INTERFACING PREPARED BY :- PREPARED BY :- RAVAL AKASH ( ) RAVAL AKASH ( ) PATEL HARDIK ( ) PATEL HARDIK.
Interfacing of Input/Output devices with AVR Microcontroller Enrolment No. : Name of the student: SOMAIYA ISHA.
WATER LEVEL INDICATOR AND AUTOMATIC MOTOR SWITCHING SYSTEM
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.
BIRLA VISHVAKARMA MAHAVIDYALAYA TOPIC : Keyboard interfacing and flowchart MADE BY: Nidhi Bhangale ( ) Gargi Patel ( ) Meghna Rathod.
AGRICULTURAL MONITORING BASED ON WIRELESS SENSOR NETWORK TECHNOLOGY Adithya engineering college M.V.Sireesha Internal guide 09a91d5507 M.S.R.Shekar Associate.
“Wireless equipment control using microcontroller”
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
Display Devices 16 x 2 lcd display.
4-Integrating Peripherals in Embedded Systems (cont.)
LCD and Keyboard Interfacing
SCADA for Remote Industrial Plant
PC Mouse operated Electrical Load Control Using VB Application
UNIVERSAL COLLEGE OF ENGINEERING & TECHNOLOGY
GANDHINAGAR INSTITUTE OF TECHNOLOGY
DIGITAL CALCULATOR USING 8051
EET 2261 Unit 11 Controlling LCD and Keypad
LCD and Keyboard Interfacing
Figure Pin Positions for Various LCDs from Optrex
EET 2261 Unit 11 Controlling LCD and Keypad
LCD and Keyboard Interfacing
82C55 Programmable Peripheral Interface
LCD and Keyboard Interfacing
LCD and Keyboard Sepehr Naimi
Intro to Micro Controllers
LCD and Keyboard Interfacing
CTY SAR FCPS Shawn Lupoli, Elliot Tan
Compiled by Dr. N.Shanmugasundaram, HOD, ECE Dept, SECE.
Presentation transcript:

A.D.Patel institute of technology Sub : LCD and Keyboard interfacing with AVR. prepared by, chokshi abhi p ( ) Guided by, Prof. Asif Thakor.

contents Introduction to AVR Board. Introduction to LCD. Introduction to Keyboard. Connection diagram. Program. Conclusion.

Introduction to AVR Board. We have AVR general purpose mother board which is shown in fig 1.1 It has Microcontroller AVR ATMEGA32 which is very power full controller with 4 PORTS on board. We can use female header to connect any device with Board. This Board is USBISP compatible that means we can program our IC by using simple USBASP AVR Programmer, Just Connect ISP pin to the board and connect to PC with suitable Driver and Program.hex File using any AVR Dude Gui Programmer. This Board has dual Power supply 1)By Adapter 2) By Connecting usbasp. This Board has RS232 Port also that means we can Transfer data in full duplex mode via PC To uC or uC to PC. We will connect 2×2 Matrix keyboard to Port B and 16×2 LCD to PORT D.

Introduction to LCD. Here we have 16×2 LCD It has 2lines and 16charachters per each line LCD has 16 Pin in that Pin 1,2,3:It is VSS GND and VCC,Vcc=5V,VSS=GND=0V. Pin 4,5,6:It is RS,R/W and EN Give Rs=0 for command Register. Rs=1 for Data register. R/w=0 For writing data into register En=Falling edge to enable latch. Pin 7-14:Data Pins. Pin 15,16:LCD back light.

Introduction to Keyboard

As Shown in fig the it is 4by4 matrix keyboard as shown in fig to scan which key has been pressed first we have to give a 0000 to all raws and check any key has been pressed by columns by scanning 1 if condition false then give 20ms debouncing time period and give again 0000 to all raws and scan whether any key has been pressed. To scan all keys follow the below steps First make B0pin =0 and B1 pin=1 and scan Pin B2 and B3. If pinb2 =0 and pinb3=1 it will be print ‘0’ on screen of LCD. If pinb2=1 and pinb3=0 it will be print ‘1’ on screen of LCD. Second make B0 pin=1and B1 pin=0 and scan Pin B2 and B3. If pinb2 =0 and pinb3=1 it will be print ‘2’ on screen of LCD. If pinb2=1 and pinb3=0 it will be print ‘3’ on screen of LCD.

schematic

Inside LCD1.h File void lcd_command(unsigned char z) { PORTD=z; msdelay(1); PORTB&=~(1<<5); msdelay(1); PORTB&=~(1<<6); msdelay(1); PORTB|=(1<<7); msdelay(1); PORTB&=~(1<<7); msdelay(1); } void lcd_data(unsigned char m) { PORTD=m; msdelay(1); PORTB=1; msdelay(1); PORTB&=~(1<<6); msdelay(1); PORTD|=(1<<7); msdelay(1); PORTD&=~(1<<7); msdelay(1); }

void lcd_init(void) { DDRD=DDRB=0XFF; msdelay(1); lcd_command(0X38); msdelay(1); lcd_command(0X0E); msdelay(1); lcd_command(0X01); msdelay(1); } void lcd_string(unsigned char s[]) { unsigned char i=0,j=0X80,k; k=strlen(s); for(i=0;i<k;i++) { lcd_command(j); msdelay(1); lcd_data(s[i]); msdelay(1); j++; } return(0); }

Main Program #include #include "lcd1.h" void check(unsigned char m) int main() { lcd_init(); unsigned char raw; unsigned char t[2][2]={'0','1', '2','3'}; while(1) { PORTB&=0XFC; while((PINB&0X0C)==0X0C); msdelay(20); while((PINB&0X0C)==0X0C); raw=0; PORTB&=~(1<<0); PORTB|=(1<<1); check(raw); raw=1; PORTB&=~(1<<1); PORTB|=(1<<0); check(raw); }

Check function void check(unsigned char m) { if((PINB&0X0C)==0X08) { lcd_command(0X80); lcd_data(t[m][0]); } if((PINB&0X0C)==0X04) { lcd_command(0X80); lcd_data(t[m][1]); }

Conclusion From this we have seen that as we press key that corresponding key will displayed on LCD display as ‘0’ ‘1’ ‘2’ ‘3’ etc.

Thank you