How to interface 3x4 Keypad with atmega8535 then outout--> LED

Status
Not open for further replies.

jojok

Newbie level 3
Joined
Jun 4, 2011
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,304
How to interface 3x4 Keypad with atmega8535 then output--> LED

Hi all,

How to interface 3 x 4 Keypad with atmega8535.

i want to know how to program 3x4 keypad with LeD interfacing and the output as a signal.
ex:
if we press 1 : the output as '0000 0001'
if we press 2 : the output as '0000 0010'
if we press 3 : the output as '0000 0011'
...
please help me
anyone could provide schematic.

thnks before
 

Hi.

What language are you thinking of? Assembler or C ?
Once a key is pressed and the leds lit, must they remain lit
a period of time (say one second) or till the next key?

Awaiting data...

César E. Papa
 

Hi.

What language are you thinking of? Assembler or C ?
Once a key is pressed and the leds lit, must they remain lit
a period of time (say one second) or till the next key?

Awaiting data...

César E. Papa

--------------------------------------------------------
hi
I use C language sir..
just once a key is pressed nad the leds lit.

maybe next lesson i use period time for awaiting data.

thnks for you help :wink:

---------- Post added at 13:28 ---------- Previous post was at 13:22 ----------


-----------------------------------------------------
nice info.
thnk u very much
 

if we press 1 : the output as '0000 0001'
if we press 2 : the output as '0000 0010'
if we press 3 : the output as '0000 0011'
Just highlighting that requested feature ( keyboard mapping to LED output ) may be achieved with any keyboard topology ( Diodes, switches, A/D ) and any handling ( interrupt, scanning ).
Output returned from Keyboard() function, may be inserted in a map() function, wich performs translation, like that :

Code:
// lookup table
switch ( digit )
{
case 1 : PORTx = 0b00000001 ;
break ;
case 2 : PORTx = 0b00000010 ;
break ;
case 3 : PORTx = 0b00000011 ;
break ;
}
 



my keypad



configuration button

keypad number ----------- PIN keypad
1 ------------------------ 3-2
2 ------------------------ 1-2
3 ------------------------ 2-5
4 ------------------------ 3-7
5 ------------------------ 1-7
6 ------------------------ 5-7
7 ------------------------ 3-6
8 ------------------------ 1-6
9 ------------------------ 5-6
0 ------------------------ 1-4

I use PORTD--> input
and PORTC--> output
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…