Matrix Key Pad Configuration Lecturer: Reza Arjmandi Autumn 2015 Lecture 6: Introduction Matrix KeyPad Configuration.

Slides:



Advertisements
Similar presentations
Starting Out with C++, 3 rd Edition 1 Chapter 10 – Characters, Strings, and the string Class.
Advertisements

Smashing the Stack for Fun and Profit
What is shape function ? shape function is a function that will give the displacements inside an element if its displacement at all the node locations.
Week 4 – Functions Introduction. Functions: Purpose Breaking a large problem into a series of smaller problems is a common problem- solving technique.
Templated Functions. Overloading vs Templating  Overloaded functions allow multiple functions with the same name.
ARDUINO FRAMEWORK.
C HAPTER 2 PIC 16F887 M ICROCONTROLLER Eng. Hazem W. Marar.
Mark Neil - Microprocessor Course 1 Decoding and Using a 4x4 Keyboard.
Example 11 Analog-to-Digital Converter Lecture L5.1.
7-1 Keypad Scanning interface Used for interfacing push-button(momentary) switches Used for large number(>8) push-buttons Relies on matrix arrangement.
Embedded Programming and Robotics Lesson 9 Keypad and LCD Display 1.
Robotics Research Laboratory Louisiana State University.
AVR Microcontrollers Firsrt Session.
CS-280 Dr. Mark L. Hornick 1 ASCII table. 2 Displaying Numbers as Text Problem: display numerical values as text Consider the numerical value 0x5A held.
UNIT 8 Keypad Interface Contact Closure Counter Exceptions (Interrupts and Reset)
While Loop Structure while (condition) { …. // This line will process when while condition is true }
 Programmed for educational purposes  Efficiency sacrificed for clarity/explanation.
Practical Electronics & Programming
Problem Solving and Program Design in C (5th Edition) by Jeri R. Hanly and Elliot B. Koffman CP 202 Chapter 3 Slides By Dr. Daniyal Alghazzawi.
Robotics Research Laboratory Louisiana State University.
1 ICS103 Programming in C Lecture 7: Introduction to Functions.
ECE 371 – Unit 9 Interrupts (continued). Example Set up Two Interrupt Request Inputs: –Port H[0] Set Interrupt Flag on “0” to “1” transition (rising edge)
Advanced Digital Circuits ECET 146 Week 9 Professor Iskandar Hack ET 221G,
1 ECE 372 – Microcontroller Design Parallel IO Ports - Inputs.
3/23/2015 Richard Kuo Assistant Professor
CMPE-013/L: “C” Programming Gabriel Hugh Elkaim – Spring 2013 CMPE-013/L Unions and Bitfields Gabriel Hugh Elkaim Spring 2013.
Digital Inputs Interfacing Keypad
Example 11 Analog-to-Digital Converter Lecture L5.1.
ECE 103 Engineering Programming Chapter 53 Generic Algorithms Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material.
CS1010E Programming Methodology Tutorial 9 Pointers in Arrays & Structures C14,A15,D11,C08,C11,A02.
YCbCr 4:2:2 with Embedded Syncs In / RGB Graphics Out Using an SDTV Generic Setup CSC Setup for HD YCbCr to RGB REG 0x04 = 0x81 // csc_ric1 0x05 = 0xD5.
Input Interface – Microprocessor
// A // --- // F| G |B // --- // E| |C // ---.Dp // D // My LED Functions Scott Nichols.
EE 316 Computer Engineering Junior Lab Project 2 Digital Yahtzee.
Chapter -7 Basic function of Input/output system basics and file processing Stream classes : I/O Streams. A stream is a source or destination for collection.
Stepper Motor Configuration
Programming Microcontrollers in C Lecture L7.1. C Data Types TypeSizeRange char1 byte-128 – 127 unsigned char1 byte0 – 255 Int2 bytes – unsigned.
Introduction to Programming Lecture 40. Class Class is a user defined data type.
Alphanumeric LCD Configuration
General Purpose Input/Output
PORT(I/O) Configuration
Seven Segment Configuration Lecturer: Reza Arjmandi Autumn 2015 Lecture 5: Introduction 7Segment Configuration.
Electronics for HPS Proposal September 20, 2010 S. Boyarinov 1 HPS DAQ Overview Sergey Boyarinov JLAB June 17, 2014.
KEYBOARD INTERFACING Keyboards are organized in a matrix of rows and columns The CPU accesses both rows and columns through ports. ƒTherefore, with two.
UNIT 7 - INTRODUCTION TO I/O INTERFACING. TWO MAJOR TYPES OF I/O INTERFACING ISOLATED I/O - DEDICATED I/O INSTRUCTIONS ARE USED TO ACCESS I/O DEVICES.
2 DHT11 Sensor VCC 3V 연결 GND GND 연결 Data GPIO 4 연결 Resistance10K.
Matrix Multiplication The Introduction. Look at the matrix sizes.
= the matrix for T relative to the standard basis is a basis for R 2. B is the matrix for T relative to To find B, complete:
ECE 447: Lecture 12 Keypads ECE 447: Lecture 10. ECE 447: Matrix Keypad.
Project Assignment Snake Game/Car Acceleration Meter Min 10 Pages 10 min Presentation Max 5 group members Submitting Date: lab 2:Dec 27, 2014 Lab 3: Dec.
FEM Power: 1. The TestBench version of the FEM requires A for proper operation. 2. The FEM can be powered from a 6U VME crate or from a lab.
Lesson xx Why use functions Program that needs a function Function header Function body Program rewritten using a function.
NAM S.B MDLAB. Electronic Engineering, Kangwon National University 1.
Introduction to Programming Lecture 12. Today’s Lecture Includes Strings ( character arrays ) Strings ( character arrays ) Algorithms using arrays Algorithms.
A.D.Patel institute of technology Sub : LCD and Keyboard interfacing with AVR. prepared by, chokshi abhi p ( ) Guided by, Prof. Asif Thakor.
Arduino Programming Part 6: LCD Panel Output ME 121 Portland State University.
Sitarambhai Naranjibhai Patel Institute of Technology and Research Centre, Umrakh, Bardoli. A Presentation On “ 16x2 LCD Interfacing with AVR atmega32.
Master Boot Record (MBR)
Embedded Systems Programming Examples and Comparison
CS4101 Introduction to Embedded Systems Lab 10: Tasks and Scheduling
Lecture 22.
Keypad Source: under under
Example 16 Circular Queue
Example 13 The Serial Peripheral Interface (SPI)
Lecturer: Reza Arjmandi Autumn 2015
Lecturer: Reza Arjmandi Autumn 2015
Example 7 Liquid Crystal Display
Fuse Bits And Clock Sources
EE 319K Introduction to Embedded Systems
Keypad Source: under under
Presentation transcript:

Matrix Key Pad Configuration Lecturer: Reza Arjmandi Autumn 2015 Lecture 6: Introduction Matrix KeyPad Configuration

Matrix KeyPad

Matrix KeyPad: 4*4 4*3 3*3 …

Matrix KeyPad-Scan Methode Click Output Input xBB Code: Input Output For number 10

Matrix KeyPad-Table Code For 4*4 پورت متصل شده به صفحه کلید شماره کلید فشرده شده bit7bit6bit5bit4bit3bit2bit1bit0 کد تولید شده ستون ها سطرها C4C3C2C1R4R3R2R xEE xDE xBE x7E xED xDD xBD x7D xEB xDB xBB x7B xE xD xB x Matrix KeyPad 4*4 Not Clicked Code: 0xFF

Matrix KeyPad-Scan Function For 4*4 Example: #include //include Header file unsigned char __flash code[16]= {0xEE,0xDE,0xBE,0x7E,0xED,0xDD,0xBD,0x7D,0xEB,0xDB,0xBB,0x7B,0xE7,0xD7,0xB7,0x77}; unsigned char scan(void); //function prototype void main(void) { char ch=scan(); for(unsigned char i=0;i<16;i++) { if(ch==code[i]) { lcd_puts(i); //display lcd } unsigned char scan(void) { unsigned char key; DDRC=0x0F; PORTC=0xF0; key=(PINC&0xF0); DDRC=0xF0; PORTC=0x0F; key|=(PINC&0x0F); return key; }

Matrix KeyPad-Table Code For 3*3 پورت متصل شده به کامپیوتر شماره کلید فشرده شده bit5bit4bit3bit2bit1bit0 کد تولید شده ستون هاسطر ها C3C2C1R3R2R x x2E x1E x x2D x1D x x2B x1B Matrix KeyPad 3*3

Matrix KeyPad-Scan Function For 3*3 Example: #include //include Header file unsigned char __flash code[9]= {0x36,0x2E,0x1E,0x35,0x2D,0x1D,0x33,0x2B,0x1B}; unsigned char scan(void); //function prototype void main(void) { … } unsigned char scan(void) { unsigned char key; DDRC=0x07; //bin:111 PORTC=0x38;//bin: key=(PINC&0x38); DDRC=0x38; //bin: PORTC=0x07;//bin:111 key|=(PINC&0x07); return key; }

Matrix KeyPad-Table Code For 4*3 پورت متصل شده به کامپیوتر شماره کلید فشرده شده bit6bit5bit4bit3bit2bit1bit0 کد تولید شده ستون هاسطر ها C3C2C1R4R3R2R xE x5E x3E x6D x5D x3D x6B x5B x3B x x x Matrix KeyPad 4*3

Matrix KeyPad-Scan Function For 4*3 Example: #include //include Header file unsigned char __flash code[12]={0x6E,0x5E, 0x3E,0x6D,0x5D,0x3D,0x6B,0x5B,0x3B,0x67,0x57,0x37}; unsigned char scan(void); //function prototype void main(void) { … } unsigned char scan(void) { unsigned char key; DDRC=0x0F; //bin:1111 PORTC=0x70;//bin: key=(PINC&0x70); DDRC=0x70; //bin: PORTC=0x0F;//bin:1111 key|=(PINC&0x0F); return key; }

#include unsigned char scan(void); unsigned char __flash code[]={0XEE,0XDE,0XBE,0X7E,0XED, 0XDD,0XBD,0X7D,0XEB,0XDB,0XBB,0X7B,0XE7,0XD7,0XB7,0X77}; unsigned char SEG[]={0xC0,0xF9,0xA4,0xB0,0x99,0x92, 0x83,0xF8,0x80,0x90,0xA0,0x83,0xc6,0xA1,0x84,0x0E}; void main() { unsigned char data,i; DDRD=0XFF; while(1) { data=scan(); for(i=0;i<=15;i++) { if(data==code[i]) { PORTD=SEG[i]; break; } __delay_cycles(1000); } unsigned char scan(void) { … } Matrix KeyPad-Example VCC

Matrix KeyPad-Better Performance Scan اسکن مداوم وقفه

Matrix KeyPad Configuration IC VCC DATA OUT A DATA OUT B DATA OUT C DATA OUT D NC OUTPUT ENABLE DATA AVAILABLE COLUMN X1 COLUMN X2 ROW Y1 ROW Y2 ROW Y3 ROW Y4 NC OSCILLATOR KEBOUNCE MASK COLUMN X4 COLUMN X3 GND MM74C922

Contact us