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.

scan two keys at the same time.

Status
Not open for further replies.

tango_ang

Newbie level 5
Joined
Jul 5, 2004
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
81
hi everyone,i'm new joining this forum center.
currently i'm developing a 4x3 keypad scanning using C.
i've successfully detect every single key in the keypad but now i face a problem. is it possible if i think to scan the keys pressed in the same column but diferrence rows ( two keys pressed in the same time ) ?
i set columns as input and set rows as output.
i'm using renesas M30262.
i need somebody help me plz... thanks. :cry:
 

tango_ang said:
two keys pressed in the same time ?

Hi,

When scan, and find key pressed, store that, then continue scaning... If there's another key pressed store it, and so on...
After you scan all, process those codes :)

Cheers !
 

thanks but actually i've try this b4 n i can detect two keys pressed in the same row only. when i come to detect the keys pressed at different rows,let say both keys located at column 1,row 1 and row2.
at the time the first key is pressed, the voltage i detect at the input pin of column 1 is about 1.2v( Vcc is 3V, so stil can b considered as logic low) but once the key at row2 pressed, the voltage detected at col1 become 2.4( which considered as logic high).
tht's y it suddenly detect by the chips as no key been pressed in col1. i really dono wat is happening.
can anyone help me? thanks
 

tango_ang,

can you post how you connected the keyboard to your cpu?

I assume your rows are set high by your cpu so when you press two keys in different rows but in the same column you get a short circuit between the two rows. If all your rows are programmed as outputs one pin will have H level and the other pin will have low level and these two pins are connected together via the two pressed keys :-(

When I do a keyboard I connect pullup resistors to row and column and only program one row as output at any given time (the others stay inputs).

hope this helps
 

tango_ang said:
i set columns as input and set rows as output.

Hi,

Did u use diode for separation ? I guess not :) I think u shift a 0 on rows...

Cheers !
 

nex is right, you need a diode in series with each switch if you want to detect multiple keypresses. Put the bar end of the diode towards your row 'output's, and have pull-up resistors on all the column 'input's. Pull only one row low at any time (all other rows driven high) and read all the columns, then move onto the next row line low.
 

thank all!
i think these info will help me!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top