Searching \ for 'AT Keyboard Problem Solved!' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=keyboard+problem
Search entire site for: 'AT Keyboard Problem Solved!'.

Truncated match.
PICList Thread
'AT Keyboard Problem Solved!'
2000\06\05@221349 by John Hansen

flavicon
face
<x-flowed>Thanks to everyone who offered suggestions about how to help me solve the
problem of hooking up an AT keyboard to a PIC.  I have found the problem
and I thought that I would report the results back here because I have not
found this information in any FAQ on the subject.

As you will recall, I had a number of different AT keyboards.  I had
written software to decode their scan codes and some of them worked and
some did not.  Some didn't even initialize properly... they just keep
flashing their LED's or leaving them on permanently.

As luck would have it, the problem lay in the connector that I was
using.  I had purchased a PC mount 5 pin DIN socket (Mouser Cat #
ME161-0503).  This socket was obviously designed for a world in which pin 2
of the DIN connector (the one in the middle of the 5 pins) was supposed to
be ground.  I say this because when the plug is fully inserted into the
socket, this socket connects pin 2 to the metal shell of the DIN
connector.  But PC keyboards don't use Pin 2 for ground; rather pin 2 is
the data line.  So, if the keyboard grounds this shell, then the data line
is effectively grounded all the time.  The Gateway keyboard (and an
e-machines keyboard) apparently leave this shell floating, which is why
they worked.  The keyboards that wouldn't even initialize apparently won't
initialize when the data line is pulled low.  The keyboard that
initialized, but often recognized data 1's as 0's apparently had an
intermittent connection.

Anyway, I reached in with a screwdriver and bent the part of the socket
that makes contact with the keyboard plug shell so that it no longer makes
contact with the shell.  When I did this all of the keyboards worked just
fine.  Upon review of the Mouser catalog, I notice that it offers
"shielded" and "unshielded" DIN sockets.  The one I bought isn't listed as
being either shielded or unshielded, but I think next time for this type of
project I'll buy the "unshielded".   I suspect it will work fine.

Thanks again to everyone who helped with this project.  I stumbled on the
solution through dumb luck... I noticed that when the connector was plugged
half-way in, it worked fine.

John Hansen

</x-flowed>

2000\06\05@222234 by Bob Ammerman

picon face
Wow! (been there, done that (or least stuff frightenly similar)

Congratulations!

----- Original Message -----
From: John Hansen <spam_OUTjohnTakeThisOuTspamHANSEN.NET>
To: <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU>
Sent: Monday, June 05, 2000 10:12 PM
Subject: AT Keyboard Problem Solved!


{Quote hidden}

of
> project I'll buy the "unshielded".   I suspect it will work fine.
>
> Thanks again to everyone who helped with this project.  I stumbled on the
> solution through dumb luck... I noticed that when the connector was
plugged
> half-way in, it worked fine.
>
> John Hansen

2000\06\05@232202 by Brian Gracia

flavicon
face
At 09:12 PM 06/05/2000 , you wrote:
>Thanks to everyone who offered suggestions about how to help me solve the
>problem of hooking up an AT keyboard to a PIC.  I have found the problem
>and I thought that I would report the results back here because I have not
>found this information in any FAQ on the subject.
>

John,

Not to knock your hard work, but I have a project I have had in mind for
some time that will require the use of an AT keyboard.  Would you be
willing to share code/circuit diagrams with us?  If not, at least I have a
new trouble shoot from you so I can avoid the same problem.

Thanks,
Brian Gracia
********************************************
Better Produce through Better Control
********************************************

2000\06\05@233338 by John Hansen

flavicon
face
At 10:22 PM 6/5/00 -0500, Brian Gracia wrote:
John,

Not to knock your hard work, but I have a project I have had in mind for
some time that will require the use of an AT keyboard.  Would you be
willing to share code/circuit diagrams with us?  If not, at least I have a
new trouble shoot from you so I can avoid the same problem.

Thanks,
Brian Gracia

My code is written in CCS C, so unless you regularly use that compiler, it may not help much.  Actually it is fairly trivial.  If you work in assembler, there are a web pages out there that will help you including some that contain code and schematics.  For example for a really good overview see:

http://www.beyondlogic.org/keyboard/keybrd.htm

If you are simply looking for something that will receive keyboard scan codes and display them, there are a number of versions of that code (and hardware) already available for public viewing. See for example:

http://ourworld.compuserve.com/homepages/steve_lawther/keybview.zip

My project is actually somewhat different.  I want to receive the scan codes and then have them kick off DTMF tones.  The product has a specific application (which replaces a DTMF keypad that had been used, with great difficulty, to enter text through multiple keypresses).  It probably has no really generic application, and for this project I really don't need to interpret all of the keyboard scan codes.  So the result of my project will not be a general purpose device since it won't even scan the entire keyboard.  However, as noted above, there is other code out there that will be of considerable use to you.

John Hansen

2000\06\05@235528 by Don McKenzie

flavicon
face
John Hansen wrote:
>
> At 10:22 PM 6/5/00 -0500, Brian Gracia wrote:
>
> > John,
> >
> If you are simply looking for something that will receive keyboard
> scan codes and display them, there are a number of versions of that
> code (and hardware) already available for public viewing. See for
> example:
>
> http://ourworld.compuserve.com/homepages/steve_lawther/keybview.zip

http://www.dontronics.com/dt102.html has source code and schematics for
this also John.

an interesting find on the connector Brian.
reminds me of the times i have chased down similar problems.

Don McKenzie    donspamKILLspamdontronics.com      http://www.dontronics.com

The World's Largest Range of Atmel/AVR  & PICmicro Hardware and Software
Free Basic Compiler and Programmer http://www.dontronics.com/runavr.html
The Little "rAVeR!" AVR & Basic Kit http://www.dontronics.com/dt006.html

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