The Cyber-Spy.Com Usenet Archive Feeds Directly
From The Open And Publicly Available Newsgroup
This Group And Thousands Of Others Are Available
On Most IS NNTP News Servers On Port 119.
Cyber-Spy.Com Is NOT Responsible For Any Topic,
Opinions Or Content Posted To This Or Any Other
Newsgroup. This Web Archive Of The Newsgroup And
Posts Are For Informational Purposes Only.
Subject: interface microcontroller with ps/2 keyboard
Date: Mon, 23 Dec 2002 17:19:04 -0800
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
I am doing something that I thought would be simple but I am getting wierd
The ps2 cable of a mouse or keyboard has 6 wires. The ones I am using
are power, ground, clock, and data. I hook ground directly to ground and
power directly to the vcc supply for my microcontroller. I hook DATA to one
pin and CLOCK to another pin.
When I power this circuit up it works some of the time, i.e. my program runs
and I am able to get input from the keyboard via my interrupt routine. But
most of the time the microcontroller just sits there not exectuting my code
at all. I put code to blink an led as the first line of the code and it
blinks only some times so I dont think any code is ever even executing when
the LED does not blink. Most of the time when I power it up there is no
BUT, in my hacking around I discovered that if connect the CLOCK line
straight to ground then the microcontroller works EVERY time and the LED
Of course, to get the keyboard to work I need the CLOCK signal.
I know very little about electronics though, so maybe I am missing something
obvious where I should use a capacitor or resistor or combination of them on
the CLOCK line to keep it from disrupting the microcontroller? The
microcontroller is an st92163. I have programmed PIC microcontrollers and
the ST is similar to those, and probably similar to most other
microcontrollers for that matter.
Thank you! ~ Mark
Go Back To The Cyber-Spy.Com
Usenet Web Archive Index Of
The sci.electronics.design Newsgroup