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.

4x4 keypad microcontroller

Status
Not open for further replies.

noobokti

Newbie level 1
Joined
Dec 1, 2014
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
8
Hy there.

I'm new in this microcontroller programming and i have some problems.I need to scan an 4x4 matrix switches.I have 16 dip switches that i need to inferface with my microcontroller rl78-d1a.I got 8 I/O ports.I don't now how to connect my dip-switches to the I/O ports.Can you guys please help me?

Thx in advance.
 

Uh, the rl78-d1a isn't a microblaze (Xilinx) or a Nios-II (Altera), ARM cortex, etc. a.k.a. embedded processor in an FPGA is it? So why is this posted in the FPGA forum area. I actually don't think too many of the posters from the microprocessor section come looking at the programmable logic forum. You'll probably get more responses from the other area of the forum.
 

Hy there.

I'm new in this microcontroller programming and i have some problems.I need to scan an 4x4 matrix switches.I have 16 dip switches that i need to inferface with my microcontroller rl78-d1a.I got 8 I/O ports.I don't now how to connect my dip-switches to the I/O ports.Can you guys please help me?

Thx in advance.

Hi,

Basically there are 2 ways to do this, interrupt mode and Polling mode. For polling mode You need 4 Scan in Line and 4 Scan out lines and a look up table for each button pressed. Pullup the inputs and keep going through the sequence all 16 combinations on Scan out, when button is pressed you will get a 4 logic levels for each input sequence and for each button pressed there will be only one unique output sequence coming on Scan in lines reading the scan in lines and comparing that with scan out sequence you get the button pressed location.
For dip switches one end of 4 dip switches you connect it to a common scan in line and to 4 different scan out lines for each of those switches, make such four sets and then you get a matrix connection.

Regards,

Chaitanya
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top