Calling all Comp E or EE's of AT

PurdueRy

Lifer
Nov 12, 2004
13,837
4
0
Hi,

My group is current trying to find a way to interface a standard PS/2 keyboard with a microcontroller via the Serial communications interface. If anyone has done this before and could shed some light on their method it would be much appreciated.

Thank you.
 

Cattlegod

Diamond Member
May 22, 2001
8,687
1
0
It shouldn't be too hard, make sure you give power to the keyboard and then have the controller monitor the inputs and decode the data when it receives it.

Just browsing a bit I found this site that should be helpful

http://www.technick.net/public/code/cp_dpage.php?aiocp_dp=pinconser_mouse_ps2

edit - Just make sure you set your signal sample rate high enough to detect each bit that is sent.

here is another good link in the same site
http://www.technick.net/public/code/cp_dpage.php?aiocp_dp=pinconkey_pc_6
 

PurdueRy

Lifer
Nov 12, 2004
13,837
4
0
Originally posted by: Cattlegod
It shouldn't be too hard, make sure you give power to the keyboard and then have the controller monitor the inputs and decode the data when it receives it.

Just browsing a bit I found this site that should be helpful

http://www.technick.net/public/code/cp_dpage.php?aiocp_dp=pinconser_mouse_ps2

edit - Just make sure you set your signal sample rate high enough to detect each bit that is sent.

one odd behavior we got...when we supplied power to the keyboard...all the "lock" buttons blink on then off as normal. Then after that...on the dell keyboard...only the num lock button turns on and off(the light) the rest don't effect the light anymore. When we hooked up an older keyboard none of the lights turned on or off except at power up.

Any idea why this would be?
 

Cattlegod

Diamond Member
May 22, 2001
8,687
1
0
Originally posted by: PurdueRy
Originally posted by: Cattlegod
It shouldn't be too hard, make sure you give power to the keyboard and then have the controller monitor the inputs and decode the data when it receives it.

Just browsing a bit I found this site that should be helpful

http://www.technick.net/public/code/cp_dpage.php?aiocp_dp=pinconser_mouse_ps2

edit - Just make sure you set your signal sample rate high enough to detect each bit that is sent.

one odd behavior we got...when we supplied power to the keyboard...all the "lock" buttons blink on then off as normal. Then after that...on the dell keyboard...only the num lock button turns on and off(the light) the rest don't effect the light anymore. When we hooked up an older keyboard none of the lights turned on or off except at power up.

Any idea why this would be?

you might want to read the specs on what a computer sends to a keyboard when it is connected. Some keyboards might be looking for a handshake "hello, I am a PC" signal to let the keyboard know that it is connected. Not sure though, just a guess.

edit: you might have to have the controller send a handshake signal when you connect a keyboard if the above case is true.
 

PurdueRy

Lifer
Nov 12, 2004
13,837
4
0
Originally posted by: Cattlegod
Originally posted by: PurdueRy
Originally posted by: Cattlegod
It shouldn't be too hard, make sure you give power to the keyboard and then have the controller monitor the inputs and decode the data when it receives it.

Just browsing a bit I found this site that should be helpful

http://www.technick.net/public/code/cp_dpage.php?aiocp_dp=pinconser_mouse_ps2

edit - Just make sure you set your signal sample rate high enough to detect each bit that is sent.

one odd behavior we got...when we supplied power to the keyboard...all the "lock" buttons blink on then off as normal. Then after that...on the dell keyboard...only the num lock button turns on and off(the light) the rest don't effect the light anymore. When we hooked up an older keyboard none of the lights turned on or off except at power up.

Any idea why this would be?

you might want to read the specs on what a computer sends to a keyboard when it is connected. Some keyboards might be looking for a handshake "hello, I am a PC" signal to let the keyboard know that it is connected. Not sure though, just a guess.

edit: you might have to have the controller send a handshake signal when you connect a keyboard if the above case is true.

I was thinking that might be the case...thank you
 

Cattlegod

Diamond Member
May 22, 2001
8,687
1
0
Originally posted by: PurdueRy
Originally posted by: Cattlegod
Originally posted by: PurdueRy
Originally posted by: Cattlegod
It shouldn't be too hard, make sure you give power to the keyboard and then have the controller monitor the inputs and decode the data when it receives it.

Just browsing a bit I found this site that should be helpful

http://www.technick.net/public/code/cp_dpage.php?aiocp_dp=pinconser_mouse_ps2

edit - Just make sure you set your signal sample rate high enough to detect each bit that is sent.

one odd behavior we got...when we supplied power to the keyboard...all the "lock" buttons blink on then off as normal. Then after that...on the dell keyboard...only the num lock button turns on and off(the light) the rest don't effect the light anymore. When we hooked up an older keyboard none of the lights turned on or off except at power up.

Any idea why this would be?

you might want to read the specs on what a computer sends to a keyboard when it is connected. Some keyboards might be looking for a handshake "hello, I am a PC" signal to let the keyboard know that it is connected. Not sure though, just a guess.

edit: you might have to have the controller send a handshake signal when you connect a keyboard if the above case is true.

I was thinking that might be the case...thank you

http://www.hth.com/filelibrary/TXTFILES/keyboard.txt

try reading through that too, looks to have some good info.
 

MajinWade

Senior member
Jun 22, 2001
334
0
0
Funny, my friend is doing something similar recently and was explaining the order to me. This is hearsay, but I believe the order is something like 10 serial bits, 1 indicates start followed by 8 bits followed by 0 to terminate. For every symbol.
 

slpaulson

Diamond Member
Jun 5, 2000
4,407
11
81
It's going to be kind of a pain to use a ps2 device through a serial port because ps2 uses a bidirectional bus.

I'm not really sure if this would work, but you might want to use something like this to convert the ps2 mouse into a rs232 serial device.
 

PurdueRy

Lifer
Nov 12, 2004
13,837
4
0
Originally posted by: cRazYdood
It's going to be kind of a pain to use a ps2 device through a serial port because ps2 uses a bidirectional bus.

I'm not really sure if this would work, but you might want to use something like this to convert the ps2 mouse into a rs232 serial device.

The serial communications interface is also bidirectional and I don't know if I really need to send directions to the keyboard. This is really a one way intent. It looks like I just need to handshake on the keyboards clock and then wait to receive. I shouldn't need to write.
 

ScottMac

Moderator<br>Networking<br>Elite member
Mar 19, 2001
5,471
2
0
If your specification allows, just dro in a MAX232 chip and feed the MCU via terminal or terminal emulation (i.e., Hyperterminal).

The MAX232 converts the TTL RS232 signals to EIA 232 signal levels ... all with a +5 source.

Otherwise, give up the "PS/2" part and just get a naked keyboard and set up your own matrix mux/demux (there are all sorts of chips available to do that without sacrificing more than a few I/O lines).

Which MCU are you working with?

Good Luck

Scott
 

PurdueRy

Lifer
Nov 12, 2004
13,837
4
0
Originally posted by: ScottMac
If your specification allows, just dro in a MAX232 chip and feed the MCU via terminal or terminal emulation (i.e., Hyperterminal).

The MAX232 converts the TTL RS232 signals to EIA 232 signal levels ... all with a +5 source.

Otherwise, give up the "PS/2" part and just get a naked keyboard and set up your own matrix mux/demux (there are all sorts of chips available to do that without sacrificing more than a few I/O lines).

Which MCU are you working with?

Good Luck

Scott

Freescale HC9S12C

I don't think it should be that hard the built in SCI capability should work just fine, I just gotta get the rest figured out...
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |