Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

1x1 Matrix keypad

Status
Not open for further replies.

ansh11

Member level 4
Joined
Feb 27, 2018
Messages
71
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
659
hi,
I'm not getting idea how the single switches works in matrix keypad. I assume switch is connected with pull up resistor

how to to wire the 1x1 Matrix keypad and MCU pic16f877a ?

if the idea for single switch make sense then my next plan is to make keypad with two switches
 

If you are really short of pins, even using a matrix, there is always this -

1623091319200.png




Regards, Dana.
 
There is no sense to waste 2 pins just to read 1 switch, is this really what you want ?

yes I know but I'm trying to understand how does keypad work. I assume only one switch is in keypad. I need to understand circuit diagram for single switch

one pin is connected to RD0 and where i need to connect second pin ?

1key1.jpg
 

Hi,

1 x 1 is no matrix.
A matrix starts with 2 x 2.

Now decide if you want a matrix or not.

BTW: neither the above schematic nor the text makes no sense.

Klaus
 

Hi,

1 x 1 is no matrix.
A matrix starts with 2 x 2.

Now decide if you want a matrix or not.

BTW: neither the above schematic nor the text makes no sense.

Klaus
okay does it makes sense now ?

I need to understand how do we read four switches in matrix keypad

2key2.jpg
 

Hi,

no.
* It still is no matrix.
* And the resistors need to be connected on the other side of the switch.

Why don´t you do an internet search on your own?
* It´s explained million times how to connect a switch to a microcontroller. With schematic, code examples and videos..
* It´s explained million times how to connect a switch matrix to a microcontroller. With schematic, code examples and videos..
You get all answers in less than 10 seconds.

Klaus
 

yes I know but I'm trying to understand how does keypad work. I assume only one switch is in keypad. I need to understand circuit diagram for single switch

one pin is connected to RD0 and where i need to connect second pin ?

View attachment 169997
Some modern processors have configurable pull-up and pull-down options on GPIO pins,
this processor just has pull-up option. So you would want to connect the switch to ground
and the the other side of switch to pin. Config the pin as input and enable the internal pull
up.

Regards, Dana.
so
 

1 x 1 is no matrix.
In fact, in math terms one could call this as a scalar, but in terms of a keypad array, we could understand as an I/O arrangement e.g having an output at one pin and an input at another. Anyway, totally agreeded that do not applies in the above case.
 
e.g having an output at one pin and an input at another.

Switch button is input device always connect to the input side of microcontroller. I don't have any idea why need output pin for switch ?

exactly my first question was that, How one switch would connect to MCU ? What would be logic to read switch as you explained two pins ?
 

Hi,

still true:
* 1x1 is no matrix. Using 2 pins makes no sense..

Urgent: Please give links to internet sites that show what you are talking about.

Klaus
 

I don't have any idea why need output pin for switch ?
You don't need 2 pins, I just mentioned a very specific case on which one could waste two I/Os for that, still doing a scan as an one dimmensional array ( one line, one column ). BTW, just answering what seems your main question: The nxm matrix keypad is, or can be read by doing a scan line by line, applying mask patterns at each row of the matrix and vice-versa, e.g comparing the idle value ( all pulled-up inputs ) with the one for which you wrote a '0' at. There are many sites on the Web explaining it step by step.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top