Searching \ for 'Manipulating a keyboard' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/index.htm?key=manipulating+keyboard
Search entire site for: 'Manipulating a keyboard'.

Truncated match.
PICList Thread
'Manipulating a keyboard'
1998\01\26@190621 by Morgan Olsson

picon face
Since I in different occasions had this question about how to simulate a
keypress on an existing keyboard, I decided to post the answer to all.


Original Question from spam_OUTandreTakeThisOuTspamcompufire.com: "using pic to control a vcr"
>Hi to all engineers in this list.
-snip-
{Quote hidden}

Cheapest (i belive) is to use a transistor resistor and a diode for each
button.

What a coincidence: I actually today built a remote controlled PC keyboard
(15 buttons) with this technology:

The keyboard controller scans the keyboard by asserting one row at a time
ti GND, others to Vdd. The horizontal lines it pulls high.

For each button to be emulated I connected a NPN transistor«s emitter to
the key«s scan row, and the collector via a diode to horizontal line.
(diode kathode to collector) I drive the transistor with logic level from
IR decoder via a 100 kohm R.

>what is the idea of using a diode in each switch?

If, when this transistor«s emitter scan line is high, and another key
sharing the same feedback line as the transistor«s collector is pressed, it
will sink the collector voltage.

If you are then holding the base high the transistor will lead current from
emitter (now positive) to collector.  As the keys here have some high
resistnace (rubber-type) the transistor will win and the keystroke not
detected.

Anyway, in my application it would not matter, since only one transistor or
switch is activated at the same time, but I want to make it reliable,
since I will sell it. (For controlling engine test equipment when sitting
in car.)

Also beware that when your input to the transistor is high, the NPN
transistor will most of the time have a negative Vbe. Almost any transistor
can take -5V, but I don«t know about -Vcb, (which we will have if we don't
use diode)

/Morgan
Morgan Olsson, MORGANS REGLERTEKNIK, Sweden, ph: +46 (0)414 70741; fax 70331
-

1998\01\28@065537 by Tom Handley

picon face
  Morgan, another option is to use a 74C922 keyboard encoder. While it's
more expensive, it only requires two capacitors for debounce and scan
frequency. It's trivial to interface to a PIC with 6 lines which includes
a keypress strobe and an output-enable for bus applications. I've used it
in many projects.

  - Tom

At 12:58 AM 1/27/98 +0100, you wrote:
{Quote hidden}

1998\01\28@075252 by Morgan Olsson

picon face
At 03:53 1998-01-28 -0800, you wrote:
>   Morgan, another option is to use a 74C922 keyboard encoder. While it's
>more expensive, it only requires two capacitors for debounce and scan
>frequency. It's trivial to interface to a PIC with 6 lines which includes
>a keypress strobe and an output-enable for bus applications. I've used it
>in many projects.
>
>   - Tom
Well, right, but this was about the opposite issue:
signalling from logic to keyboard!
Seem crazy, right?

We want to add to a already existing keyboard (PC in my case) the ability
for another circuit (IR reciever) to "press" some keys.

(This was quick one-piece production)

Also useful for a hobbyist to connect a PIC to a remote control transmitter
to control his VCR«s etc?

For mass production it shuuld of course be nicer to hang a PIC to add the
keystrokes on the connection between keyboard and PC.
/Morgan O.
Morgan Olsson, MORGANS REGLERTEKNIK, Sweden, ph: +46 (0)414 70741; fax 70331
-

1998\01\28@102344 by Martin R. Green

flavicon
face
First, the original question simulating key presses on an existing
keyboard (on a VCR), and whether to use opto's or CMOS analog
switches.  A keyboard encoder chip would not solve the original
problem.

Also, on the topic of the 74C922, this chip has always had limited
availability in a lot of local markets, and as you note, it is a bit
expensive.  Since a small PIC device can duplicate the functionality
of a '922, at a lower cost, if you want to use a separate keyboard
encoder with a PIC, it makes more sense these days to use another PIC.

CIAO - Martin.

On Wed, 28 Jan 1998 03:53:54 -0800, Tom Handley
<@spam@thandleyKILLspamspamTELEPORT.COM> wrote:

{Quote hidden}

Martin R. Green
TakeThisOuTelimarEraseMEspamspam_OUTNOSPAMbigfoot.com

To reply, remove the NOSPAM from the return address.
Stamp out SPAM everywhere!!!

1998\01\29@090011 by Tom Handley

picon face
At 03:10 PM 1/28/98 GMT, Martin wrote:
>First, the original question simulating key presses on an existing
>keyboard (on a VCR), and whether to use opto's or CMOS analog
>switches.  A keyboard encoder chip would not solve the original
>problem.

  Martin (and Morgan), sorry about that. I missed the original thread.
I've noticed several good solutions to the original problem.

>Also, on the topic of the 74C922, this chip has always had limited
>availability in a lot of local markets, and as you note, it is a bit
>expensive.  Since a small PIC device can duplicate the functionality
>of a '922, at a lower cost, if you want to use a separate keyboard
>encoder with a PIC, it makes more sense these days to use another PIC.

  Good point about using a PIC as a dedicated controller. I have'nt
looked into this for a couple of years and I still have some 922's in
stock. I did'nt have a problem with availability but I checked Digi-Key
and noticed that they have gone up in price... You could use a 16x84
and an R/C oscillator to do the same at about half the price...

  - Tom

1998\01\29@122314 by Martin R. Green

flavicon
face
For more info on using a PIC in place of a '922 or '923 see
http://www.emags.com/epr/electron/issue1/feat0302.htm, where a sample
circuit using a 16C55 is presented, which is even cheaper than the
16x84 you suggested.

CIAO - Martin.

On Thu, 29 Jan 1998 05:42:51 -0800, Tom Handley
<RemoveMEthandleyspamTakeThisOuTTELEPORT.COM> wrote:

{Quote hidden}

Martin R. Green
elimarEraseMEspam.....NOSPAMbigfoot.com

To reply, remove the NOSPAM from the return address.
Stamp out SPAM everywhere!!!

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...