Author Topic: ps/2 driver for school project  (Read 2591 times)

0 Members and 1 Guest are viewing this topic.

Offline ironman31

  • Thread Starter
  • Posts: 834
ps/2 driver for school project
« on: Thu, 31 March 2011, 15:21:52 »
I'm working on a project for my Digital Logic class and we are using a ps/2 keyboard as an input device. Anyone have any noteworthy things to look out for while I'm designing the driver? Any past experiences that could help me out?
Keyboards:
IBM Model M Space Saving Keyboard (Used), HHKB Pro 2 (White, Lettered), Realforce 87U all-45g in White, Filco Majestouch 2 TKL with Cherry MX Browns, Model F PC/ATNoppoo Choc Mini (MX Browns), Model F XT, IBM Model M 1397735 (bought NIB), (2) Siig Minitouch (GHSS) one with XM, one with complicated ALPs (modded),2 Dell AT101W, Cherry G80-11900HRMUS (modded with MX browns)



Pointing Devices:
Logitech G500, Evoluent VerticalMouse 3, Logitech G5, CST 2545W, Microsoft IntelliMouse Trackball, Logitech M570, Logitech MX revolution


Offline ironman31

  • Thread Starter
  • Posts: 834
ps/2 driver for school project
« Reply #1 on: Thu, 31 March 2011, 17:23:51 »
Quote from: ripster;322194
PS/2 is too easy (and obsolete so why bother learning it?).  

Do a USB NKRO one.


It's only part of the project. The rest of it has mario jumping around on a screen and custom music playing in the background.
Keyboards:
IBM Model M Space Saving Keyboard (Used), HHKB Pro 2 (White, Lettered), Realforce 87U all-45g in White, Filco Majestouch 2 TKL with Cherry MX Browns, Model F PC/ATNoppoo Choc Mini (MX Browns), Model F XT, IBM Model M 1397735 (bought NIB), (2) Siig Minitouch (GHSS) one with XM, one with complicated ALPs (modded),2 Dell AT101W, Cherry G80-11900HRMUS (modded with MX browns)



Pointing Devices:
Logitech G500, Evoluent VerticalMouse 3, Logitech G5, CST 2545W, Microsoft IntelliMouse Trackball, Logitech M570, Logitech MX revolution


woody

  •  Guest
ps/2 driver for school project
« Reply #2 on: Thu, 31 March 2011, 17:37:12 »
Maria?

woody

  •  Guest
ps/2 driver for school project
« Reply #3 on: Thu, 31 March 2011, 17:40:49 »
Maria looks Asian. Luigiana had shrooms.

Offline kps

  • Posts: 410
ps/2 driver for school project
« Reply #4 on: Fri, 01 April 2011, 09:24:28 »
What platform? Microcontroller, FPGA, vacuum tubes?

Offline ironman31

  • Thread Starter
  • Posts: 834
ps/2 driver for school project
« Reply #5 on: Fri, 01 April 2011, 14:47:58 »
Fpga
Keyboards:
IBM Model M Space Saving Keyboard (Used), HHKB Pro 2 (White, Lettered), Realforce 87U all-45g in White, Filco Majestouch 2 TKL with Cherry MX Browns, Model F PC/ATNoppoo Choc Mini (MX Browns), Model F XT, IBM Model M 1397735 (bought NIB), (2) Siig Minitouch (GHSS) one with XM, one with complicated ALPs (modded),2 Dell AT101W, Cherry G80-11900HRMUS (modded with MX browns)



Pointing Devices:
Logitech G500, Evoluent VerticalMouse 3, Logitech G5, CST 2545W, Microsoft IntelliMouse Trackball, Logitech M570, Logitech MX revolution


Offline DrunkenDonut

  • Posts: 94
ps/2 driver for school project
« Reply #6 on: Sat, 02 April 2011, 13:35:26 »
It's not so much a driver, as a state machine. PS/2 protocol is pretty simple but time based. At idle, control/data line is held high, the keyboard sends data by pulling it down in a specific sequence. You just have to decode the down pulses.

You can do with with a state machine as logic w/ clock, or you can use a softcore processor and decode via software state machine. I recommend software on a microcontroller / softcore processor, since a pure hardware-only logic state machine would be crazy for the amount of different things coming from a keyboard.
*Hang on to your wallet!*
BTC E5X5R5BTC-5339R-0 (\'90), MS Natural Keyboard Pro (\'99), Sun Type 5c, 2x 1391401, DASK3ULT (\'08), ABS M1, Dell AT101W, M4-1
FKBN87M/EB (\'09), FKBN87ML/EB (\'09), FKBN87Z/EB (\'09), FKBN87MC/NPEC (\'09), G80-3000LQCDE-2 (\'11)

Offline JohnElliott

  • Posts: 109
ps/2 driver for school project
« Reply #7 on: Sat, 02 April 2011, 14:49:40 »
This could be considered cheating, but if you want to see how IBM supported the PS/2 keyboard protocol the disassembly at  http://halicery.com/8042/8042_1503033_TXT.htm may be of interest. From 03AE to 03D2, for example, is the bit that reads in a scancode.

Offline ironman31

  • Thread Starter
  • Posts: 834
ps/2 driver for school project
« Reply #8 on: Sat, 02 April 2011, 16:33:16 »
Quote from: DrunkenDonut;323389
since a pure hardware-only logic state machine would be crazy for the amount of different things coming from a keyboard.


this is what we have to do. We are coding it in VHDL. Turns out another kid in my group is taking over on this part. Now I just have to figure out Direct Digital Synthesis and make a song up.
Keyboards:
IBM Model M Space Saving Keyboard (Used), HHKB Pro 2 (White, Lettered), Realforce 87U all-45g in White, Filco Majestouch 2 TKL with Cherry MX Browns, Model F PC/ATNoppoo Choc Mini (MX Browns), Model F XT, IBM Model M 1397735 (bought NIB), (2) Siig Minitouch (GHSS) one with XM, one with complicated ALPs (modded),2 Dell AT101W, Cherry G80-11900HRMUS (modded with MX browns)



Pointing Devices:
Logitech G500, Evoluent VerticalMouse 3, Logitech G5, CST 2545W, Microsoft IntelliMouse Trackball, Logitech M570, Logitech MX revolution


Offline cornsoup

  • Posts: 13
ps/2 driver for school project
« Reply #9 on: Sun, 03 April 2011, 05:21:32 »
Huh...I have a FPGA project due too...  :S (judging from your location I guess we aren't in the same school...)
However, our teacher gave us some sample PS/2 code to work with.
ALPS : Dell AT101 (Pink), Ortek MCK201FX (White)
Cherry : G80-8113 (Clear)
Buckling : IBM M Terminal 1389162, Affirmative 1227T

Offline ironman31

  • Thread Starter
  • Posts: 834
ps/2 driver for school project
« Reply #10 on: Sun, 03 April 2011, 09:24:34 »
Quote from: cornsoup;323654
Huh...I have a FPGA project due too...  :S (judging from your location I guess we aren't in the same school...)
However, our teacher gave us some sample PS/2 code to work with.


I think ours might do the same later on. He did for every other device and told us to figure out the ps/2 ourselves, but I have a feeling most of the kids in the class won't be able to. He's been a pretty bad teacher the whole semester. :/
Keyboards:
IBM Model M Space Saving Keyboard (Used), HHKB Pro 2 (White, Lettered), Realforce 87U all-45g in White, Filco Majestouch 2 TKL with Cherry MX Browns, Model F PC/ATNoppoo Choc Mini (MX Browns), Model F XT, IBM Model M 1397735 (bought NIB), (2) Siig Minitouch (GHSS) one with XM, one with complicated ALPs (modded),2 Dell AT101W, Cherry G80-11900HRMUS (modded with MX browns)



Pointing Devices:
Logitech G500, Evoluent VerticalMouse 3, Logitech G5, CST 2545W, Microsoft IntelliMouse Trackball, Logitech M570, Logitech MX revolution


Offline ironman31

  • Thread Starter
  • Posts: 834
ps/2 driver for school project
« Reply #11 on: Thu, 21 April 2011, 15:55:48 »
[video=youtube;DPcHaFWhJJ8]http://www.youtube.com/watch?v=DPcHaFWhJJ8[/video]

This is the final project I was working on. I did all the audio to it, and the other group members did the video portion. This was all done using VHDL in Quartus II. (Might have to turn up the volume to hear the music)
Keyboards:
IBM Model M Space Saving Keyboard (Used), HHKB Pro 2 (White, Lettered), Realforce 87U all-45g in White, Filco Majestouch 2 TKL with Cherry MX Browns, Model F PC/ATNoppoo Choc Mini (MX Browns), Model F XT, IBM Model M 1397735 (bought NIB), (2) Siig Minitouch (GHSS) one with XM, one with complicated ALPs (modded),2 Dell AT101W, Cherry G80-11900HRMUS (modded with MX browns)



Pointing Devices:
Logitech G500, Evoluent VerticalMouse 3, Logitech G5, CST 2545W, Microsoft IntelliMouse Trackball, Logitech M570, Logitech MX revolution