Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/26/01 23:12
Read: times


 
#12812 - RE: 8051 and a small keyboard - how?
Hi! You can solve your problem in diffrent ways. Typical solution is using some of pins working like a rows and some of pins working like a columns of your keyboard.
To make 4 keys keyboard you have to use 2 rows & 2 columns. It takes you 4 pins of port. If you need a keyboard for 9 keys, you will use 6 pins (f.e. 3 rows & 3 columns). It is clear, I think.
For 4 keys keyboard I suggest to connect switch direct between the pin and ground. You should to use pull-up resistors!!!
If your switches are connected directly to the ground, reading the state is very simply: when switch is open, you read "H" from pin and when switch is close you read "L".
If you are using rows&columns you have to send LHH to the columns' output port and read the rows' input port (in our 3x3 example), then HLH and read, then HHL and read. If any of your switches is shorted you can read "L" from the row.
And now very important note: you have to read each row several times to ensure that user is really pressing the key!!! If you don't do this you can read a distortion like a key pressing. The note is the same for all kind of keyboards.
If you want any further informations you can contact me via email or icq. You can find them at this web site.

List of 16 messages in thread
TopicAuthorDate
8051 and a small keyboard - how?            01/01/70 00:00      
RE: 8051 and a small keyboard - how?            01/01/70 00:00      
RE: 8051 and a small keyboard - how?            01/01/70 00:00      
RE: 8051 and a small keyboard - how?            01/01/70 00:00      
RE: 8051 and a small keyboard and LCD !            01/01/70 00:00      
RE: 8051 and a small keyboard and LCD !            01/01/70 00:00      
RE: 8051 and a small keyboard and LCD !            01/01/70 00:00      
RE: 8051 and a small keyboard and LCD !            01/01/70 00:00      
RE: 8051 and a small keyboard and LCD !            01/01/70 00:00      
RE: 8051 and a small keyboard - how?            01/01/70 00:00      
RE: 8051 and a small keyboard            01/01/70 00:00      
RE: 8051 and a small keyboard and LCD !            01/01/70 00:00      
RE: 8051 and a small keyboard and LCD !            01/01/70 00:00      
RE: 8051 and a small keyboard and LCD !            01/01/70 00:00      
RE: 8051 and a small keyboard and LCD !            01/01/70 00:00      
RE: 8051 and a small keyboard and LCD !            01/01/70 00:00      

Back to Subject List