CHAPTER 12 LCD AND KEYBOARD INTERFACING

Similar documents
LCD AND KEYBOARD INTERFACING

1. LCD (Liquid Crystal Display)interface

UNIT 3 THE 8051-REAL WORLD INTERFACING

Engr. A. N. Aniedu Electronic and Computer Engineering Nnamdi Azikiwe University, Awka

e-pg Pathshala Subject: Computer Science Paper: Embedded System Module: Interfacing External Devices using Embedded C Module No: CS/ES/22

Parallel I/O and Keyboard Scanning

8051 Interfacing and Applications Microcontroller

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


COMP2121: Microprocessors and Interfacing. I/O Devices (II)

MS Word. Web Time Entry. Using the Online, Time Entry System

CPEG300 Embedded System Design. Lecture Interface with Peripheral Devices

ENGR 1181 MATLAB 09: For Loops 2

ECE 372 Microcontroller Design

Lecture-9 Intel 8085 Microprocessor It is a 40-pin DIP(Dual in package) chip, base on NMOS technology, on a single chip of silicon.

Microprocessors & Interfacing

BV4542. I2C or Serial 16x2 with Keypad interface

Input/Output Ports and Interfacing

Device: LDP This document Version: 1.0. Date: July Description: 80x08 1R1G LED Display Panel

Segment A Programmable Peripheral Interface (PPI)

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #16 Loops: Matrix Using Nested for Loop

ELEC 3040/3050 Lab 5. Matrix Keypad Interface Using Parallel I/O

CHAPTER ASSEMBLY LANGUAGE PROGRAMMING

Digital I/O Operations

ELEC 3040/3050 Lab 5. Matrix Keypad Interface Using Parallel I/O

DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING YEAR : III SEM : VI

Turning Ideas Into Reality ABCircuits POB 123 New Hill NC (919) C922-SO IC

Chapter 9. Input/Output (I/O) Ports and Interfacing. Updated: 3/13/12

Multifunction Controller less STN LCD Software Library and Reference Hardware

Input/Output Devices. Lecturer: Sri Parameswaran Notes by: Annie Guo

1. What is Microprocessor? Give the power supply & clock frequency of 8085?

DEPARTMENT OF ECE QUESTION BANK SUBJECT: MICROPROCESSOR AND MICROCONTROLLER UNIT-1 PART-A (2 MARKS)

EC 6504 MICROPROCESSOR AND MICROCONTROLLER

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #29 Arrays in C

8051 I/O and 8051 Interrupts

Address connections Data connections Selection connections

Question Bank Microprocessor and Microcontroller

Label Program Printing Shelf Labels

Embedded Controller Programming II. I/O Device Programming in C Part 1: Input and Interrupts

P-ROC. Pinball Remote Operations Controller. Version 2.4 August 8, Copyright 2017, Multimorphic, Inc. 1/28

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

BV4218. I2C-LCD & Keypad. Product specification. December 2008 V0.a. ByVac 2006 ByVac Page 1 of 9

In this tutorial, we will discuss the architecture, pin diagram and other key concepts of microprocessors.

UNIT V MICRO CONTROLLER PROGRAMMING & APPLICATIONS TWO MARKS. 3.Give any two differences between microprocessor and micro controller.

LCD. Configuration and Programming

On Your Own. ). Another way is to multiply the. ), and the image. Applications. Unit 3 _ _

Basics of Microprocessor

ECE 571 Advanced Microprocessor-Based Design Lecture 3

Microcontroller & Interfacing

QUESTION BANK. EE 6502 / Microprocessor and Microcontroller. Unit I Processor. PART-A (2-Marks)

Microcomputer Architecture and Programming

4x4 Matrix Membrane Keypad

Four Categories Of 8085 Instructions That >>>CLICK HERE<<<

Database Sharing of the Smartcard Lock System With Two Computers (no router)

MICROPROCESSOR AND MICROCONTROLLER BASED SYSTEMS

A look at interrupts Dispatch_Tasks ( )

Lab 8 RS232 October 22, 2015

Microcontroller and Embedded Systems:

2. List the five interrupt pins available in INTR, TRAP, RST 7.5, RST 6.5, RST 5.5.

8051 Microcontroller

UNIVERSITY OF CONNECTICUT. ECE 3411 Microprocessor Application Lab: Fall Lab Test III

Inside Your PC. Introduction to Computer Science. Polly Huang NTU EE

STM32F100RB processor GPIO notes rev 2

PQR Series. Power Quality Recorders. For SINGLE, DUAL, THREE PHASE, and ENVIRONMENTAL applications.

AGH University of Science and Technology Cracow Department of Electronics

RA8835. Dot Matrix LCD Controller Specification. Version 1.2 June 1, RAiO Technology Inc. Copyright RAiO Technology Inc.

Chapter 4. Address. data. Input / Output Programming. Simplified Z80 System Architecture. Memory. program. data. Z80 I/O Programming

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF COMPUTER SCIENCE ENGINEERING


RA8835A. Dot Matrix LCD Controller Specification. Version 1.1 September 18, RAiO Technology Inc. Copyright RAiO Technology Inc.

Embedded Systems and Software

Microprocessors LCD Parallel Port USB Port

Unit DMA CONTROLLER 8257

8051 Microcontrollers

Important Questions for Viva CPU

1. Internal Architecture of 8085 Microprocessor

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI UNIT- IV

ELEG3923 Microprocessor Ch.4 I/O Ports

NT7532 V X132 RAM-Map LCD Controller/Driver. Preliminary

INT 21H and INT 10H Programming and Macros

Dec Hex Bin ORG ; ZERO. Introduction To Computing

COMP2121 Introductory Experiment

CC411: Introduction To Microprocessors

INTERFACING 16 2 LCD WITH 8051

EE 5340/7340 Motorola 68HC11 Microcontroler Lecture 1. Carlos E. Davila, Electrical Engineering Dept. Southern Methodist University

Getting Started Guide

INTRO TO I/O INTERFACE

Switch Input and Debouncing (Including key matrix techniques)

EE 3170 Microcontroller Applications

User-configurable Resolution. 9 to 12 bits (0.5 C to C)

80C186 AND 80C188 EMBEDDED MICROPROCESSORS SPECIFICATION UPDATE

CHAPTER TIMER PROGRAMMING

LCD 64x32 Logic Boards User Manual

8086 Interrupts and Interrupt Responses:

The ICU-Duino Arduino Shield!

AN10184 Connecting a keyboard to the Philips LPC9xx microcontroller

8051 Instruction Opcodes In Hexadecimal Order

Dawood Public School Course Outline Computer Studies Class VI

The Gray Code. Script

Microcontrollers. Fig. 1 gives a comparison of a microprocessor system and a microcontroller system.

Transcription:

CHAPTER 12 LCD AND KEYBOARD INTERFACING

LCD Operation LCD is finding widespread use replacing LEDs The declining prices of LCD The ability to display numbers, characters, and graphics Incorporation of a refreshing controller into the LCD Relieving the CPU of the task of refreshing the LCD Ease of programming for characters and graphics

LCD Data Sheet One can put data at any location in the LCD The following shows address locations and how they are accessed AAAAAAA=000_0000 to 010_0111 for line1 AAAAAAA=100_0000 to 110_0111 for line2 The upper address range can go as high as 0100111 for the 40-character-wide LCD Corresponds to locations 0 to 39

Keyboard Interfacing Keyboards are organized in a matrix of rows and columns The CPU accesses both rows and columns through ports With two 8-bit ports, an 8 x 8 matrix of keys can be connected to a microprocessor When a key is pressed, a row and a column make a contact Otherwise, there is no connection between rows and columns In IBM PC keyboards, a microcontroller takes care of hardware and software interfacing

Keyboard Interfacing (cont.) A 4x4 matrix connected to two ports The rows are connected to an output port The columns are connected to an input port If no key has been pressed, reading the input port will yield 1s for all columns Since they are all connected to high (Vcc) If all the rows are grounded and a key is pressed, one of the columns will have 0 Since the key pressed provides the path to ground It is the function of the microcontroller to scan the keyboard continuously to detect and identify the key pressed

Grounding Rows and Reading Columns To detect a pressed key The microcontroller grounds all rows by providing 0 to the output latch Then it reads the columns If the data read from columns is D3 D0 = 1111, no key has been pressed The process continues till key press is detected If one of the column bits has a zero, this means that a key press has occurred For example, if D3 D0 = 1101, this means that a key in the D1 column has been pressed

Grounding Rows and Reading Columns (cont.) After detecting a key press, the microcontroller will go through the process of identifying the key Starting with the top row, the microcontroller grounds it by providing a low to row D0 only It reads the columns, if the data read is all 1s, no key in that row is activated The process is moved to the next row It grounds the next row, reads the columns, and checks for any zero

Grounding Rows and Reading Columns (cont.) This process continues until the row is identified After identification of the row in which the key has been pressed Find out which column the pressed key belongs to

Grounding Rows and Reading Columns (cont.) Detection and identification of key activation goes through the following: To make sure that the preceding key has been released, 0s are output to all rows at once, and the columns are read and checked repeatedly until all the columns are high When all columns are found to be high, the program waits for a short amount of time before it goes to the next stage of waiting for a key to be pressed

Grounding Rows and Reading Columns (cont.) To see if any key is pressed, the columns are scanned over and over in an infinite loop until one of them has a 0 on it Remember that the output latches connected to rows still have their initial zeros (provided in stage 1), making them grounded After the key press detection, it waits 20 ms for the bounce and then scans the columns again It ensures that the first key press detection was not an erroneous one due a spike noise If after the 20-ms delay the key is still pressed, it goes back into the loop to detect a real key press

Grounding Rows and Reading Columns (cont.) To detect which row key press belongs to, it grounds one row at a time, reading the columns each time If it finds that all columns are high, this means that the key press cannot belong to that row It grounds the next row and continues until it finds the row the key press belongs to Upon finding the row that the key press belongs to, it sets up the starting address for the look-up table holding the scan codes (or ASCII) for that row

Grounding Rows and Reading Columns (cont.) To identify the key press, it rotates the column bits, one bit at a time, into the carry flag and checks to see if it is low Upon finding the zero, it pulls out the ASCII code for that key from the look-up table Otherwise, it increments the pointer to point to the next element of the look-up table