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.

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?
 

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.
 

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.

+++
 

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.
 

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.

+++
 

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
 

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
 

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.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top