06 interfacing keypad 4x4.2016

12
1 06-Interfacing 4x4 keypad. By : Mohamed Fawzy Programming AVR Microcontrollers © Mohamed F.A.B 2015

Upload: mohamed-fawzy

Post on 14-Feb-2017

129 views

Category:

Engineering


3 download

TRANSCRIPT

Page 1: 06 Interfacing Keypad 4x4.2016

1

06-Interfacing 4x4 keypad.

By : Mohamed Fawzy

Programming AVR Microcontrollers

© Mohamed F.A.B 2015

Page 2: 06 Interfacing Keypad 4x4.2016

Lecture Notes:

2

o Set Your Phone To Vibration Mode.

o Ask any time.

o During labs, Feel Free To Check Any Materials or

Internet.

o Slides are self content.

o Feel Free To Share This Materials With Your Friends.

o Work Hard For Achieving Most Of This Course.

© Mohamed F.A.B 2015

Page 3: 06 Interfacing Keypad 4x4.2016

3

Don't Forget !!!!

© Mohamed F.A.B 2015

Any Expert Was Once A Beginner

Page 4: 06 Interfacing Keypad 4x4.2016

4

Lesson(12).

© Mohamed F.A.B 2015

Lesson (11):

Interfacing Keypad 4*4 .

Page 5: 06 Interfacing Keypad 4x4.2016

5

Lesson (11) Topics.

© Mohamed F.A.B 2015

► Why Matrix Keypad.

► Matrix Keypad Theory.

► Scanning Key pressed.

Page 6: 06 Interfacing Keypad 4x4.2016

6

Why Matrix Keypad?

© Mohamed F.A.B 2015

o To reduce the microcontroller I/O pin usage, keyboards

are organized in a matrix of rows and columns.

o The CPU accesses both rows and columns through ports.

o When a key is pressed, a row and a column make a

contact; otherwise, there is no connection between

rows and columns.

o A 4 × 4 matrix connected to two ports. The rows are

connected to an output port and the columns are

connected to an input port.

Page 7: 06 Interfacing Keypad 4x4.2016

7

Keypad Theory.

© Mohamed F.A.B 2015

.

Page 8: 06 Interfacing Keypad 4x4.2016

8

Scanning Key pressed.

© Mohamed F.A.B 2015

Configurations for keypad:

Initialization for keypad PORT:

Page 9: 06 Interfacing Keypad 4x4.2016

9

Scanning Key pressed. Cont’

© Mohamed F.A.B 2015

Scanning one row:

Page 10: 06 Interfacing Keypad 4x4.2016

10

Scanning Key pressed. Cont’

© Mohamed F.A.B 2015

Page 11: 06 Interfacing Keypad 4x4.2016

11

Questions:

© Mohamed F.A.B 2015

Page 12: 06 Interfacing Keypad 4x4.2016

Thank You All

12

[email protected]

01006032792

[email protected]

© Mohamed F.A.B 2015