LPC2148 – Keypad Interfacing

Hi all…. Today we will see Keypad interfacing with LPC2148. Before that i would suggest you to go through this link to know about the Keypad characteristics.  Let’s start…

Suggest To Read

Components Required

  • 4×4 Keypad or 3×4 Keypad (Here we will discuss both codes)
  • LPC2148 Microcontroller

Keypad interfacing with LPC2148

4×4 Matrix Keypad Interfacing

Circuit Diagram

Keypad

  • R1 – P1.16
  • R2 – P1.17
  • R3 – P1.18
  • R4 – P1.19
  • C1 – P1.20
  • C2 – P1.21
  • C3 – P1.22
  • C4 – P1.23

Serial

  • RX – P0.0
  • TX – P0.1

Code 

This code might be looking like complicate. Please go through this code slowly.

Output

Whatever we are typing in the keypad, it will send to serial terminal.

3×4 Matrix Keypad Interfacing

Circuit Diagram

Keypad

  • R1 – P1.16
  • R2 – P1.17
  • R3 – P1.18
  • R4 – P1.19
  • C1 – P1.20
  • C2 – P1.21
  • C3 – P1.22

Serial

  • RX – P0.0
  • TX – P0.1

Code

Whatever we are typing in the keypad, it will send to serial terminal.

Output

3 1 vote
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
piyu
piyu
October 4, 2017 1:22 AM

I want the code for interfacing of ir sensor with lpc2148 for line follower robot project

1
0
Would love your thoughts, please comment.x
()
x
%d bloggers like this: