Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

8 Keys interfacing with single pin of 8085

Status
Not open for further replies.

Hitesh.Chawla

Newbie level 3
Joined
Jan 17, 2011
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,305
I have to interface 8 different keys to a microprocessor, but only one pin is available on the microprocessor. Is there any way that makes the microprocessor possible to detect which key has been pressed?
 

btbass

Advanced Member level 5
Joined
Jul 20, 2001
Messages
1,897
Helped
438
Reputation
880
Reaction score
287
Trophy points
1,363
Location
Oberon
Activity points
12,861
If the input pin is an A/D converter input?
A common way is to have a resistor network switched by the buttons, that apply a different voltage level for each Button.
 

andre_teprom

Super Moderator
Staff member
Joined
Nov 7, 2006
Messages
9,221
Helped
1,147
Reputation
2,313
Reaction score
1,123
Trophy points
1,403
Location
Brazil
Activity points
53,680
If the pin is not A/D but smith-trigger, it is possible perform that reading in a much more complex way, but working with RC circuit timming.
I done with only 3 keys. I´m not sure if works properly with 8.

Works this way :
Each 1 of 3 keys, is connected to a resistor ( R1,R2,R3 ) from VDD bus, and all them are conected to the same capacitor-resistor discharging circuit ( C//R ).
Values of 3 resistors are scaled from ~3x one from other.
Time account of Rise/Fall determines wich key were pressed/released.

Obviouslly, RC timing must be chosen in order to be lower than user typing rate.

+++
 

Hitesh.Chawla

Newbie level 3
Joined
Jan 17, 2011
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,305
If the input pin is an A/D converter input?
A common way is to have a resistor network switched by the buttons, that apply a different voltage level for each Button.

Thanx for replying.. :)
What I understood from your comment is this:
For each key, I apply input as either high or low voltage (bits 0/1) to an 8-bit Digital to Analog Converter. The output of DAC should be connected to the pin of 8085, which should work as A/D input.

And then 8085 will decide which key has been pressed looking at the analog voltage at this input pin.

Tell in case i am wrong in the concept.
 

andre_teprom

Super Moderator
Staff member
Joined
Nov 7, 2006
Messages
9,221
Helped
1,147
Reputation
2,313
Reaction score
1,123
Trophy points
1,403
Location
Brazil
Activity points
53,680
Sugestion from btbass is based on voltage domain.
My sugestion is is based on timing domain.

His solution requires an A/D input chanel.
Mine requires a SmithTrigger input.

So are different concepts.

+++
 

samson A.

Member level 3
Joined
May 15, 2009
Messages
58
Helped
10
Reputation
20
Reaction score
10
Trophy points
1,288
Location
Lagos, Nigeria
Activity points
1,642
I actually love the adc one. You can run as much as 100 keys with it. But a current source to the adc input will be better tha a pullup resistor. I ve seen this scheme even in commercial product. Much like one wire network of keys. Oh cool.



All under heaven
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,021
Reputation
4,158
Reaction score
2,031
Trophy points
1,393
Location
Greece
Activity points
64,377
The only problem with the ADC kind of solution is that if you press two buttons simultaneously the input will not be recognized or it will be recognized as a third button.
This will happen because there is a resistor matrix that gives specific voltages when a button is pressed, but when two buttons are pressed the output voltage will be set by two resistors in parallel.

Alex
 

andre_teprom

Super Moderator
Staff member
Joined
Nov 7, 2006
Messages
9,221
Helped
1,147
Reputation
2,313
Reaction score
1,123
Trophy points
1,403
Location
Brazil
Activity points
53,680
It´s the price for that kind of solution.
Reliability of input will be sacrificed.

Of course, isn´t indicated to implement - for example - an numeric matrix 4x3 keiboard.
But could be applied to some applications wich need few keys wich are not so crictical ( start / stop / pause ) and even that unspected input key value, could be treated by firmware. ( avoiding prohibited states )

Defining a significant scale relation between resistors ( ~2:1 ) it is possible to determine if multiple keys were pressed simultaneously.

+++
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top