andre2000
Newbie level 3
ps2 keyboard parity bit
Hi guys, noob here.
I'm trying to make a module to capture keyboard characters from a keyboard connected to the PS/2 port on my Altera board.
I need to know exactly how the signals come in from the keyboard when a key is pressed. The internet is great, and I searched and searched and found a lot of info. But much of it is incomplete, inconsistent, or not clear.
So what comes out of the serial data pin when a key is pressed? Some sites say that just the scan code comes out (framed in 11 bits). Others say that the scan code comes out and is followed by a break code when the key is released (code $F0), also framed.
Another site says that when you press a key the following comes out "$E0 $F0 x x", how unclear is that!?! Is the "x x" the data? If so it doesnt make sense!
Then another site says that if you hold down the key, it sends out the scan code repeatedly "10 times per second" until a release (break) code is seen. That can't be true because we can all hit the key for exactly 1 second and this doesnt happen!
All the sites say that the keyboard clock rate can be from 10kHz to 30kHz, if thats true, then if you hit a key for 1 second, it actually has sent out 333 of the same scan code in that time (assuming 30kHz). How is that possible? Do I have to make my module over come this or is there something else going on?
Hi guys, noob here.
I'm trying to make a module to capture keyboard characters from a keyboard connected to the PS/2 port on my Altera board.
I need to know exactly how the signals come in from the keyboard when a key is pressed. The internet is great, and I searched and searched and found a lot of info. But much of it is incomplete, inconsistent, or not clear.
So what comes out of the serial data pin when a key is pressed? Some sites say that just the scan code comes out (framed in 11 bits). Others say that the scan code comes out and is followed by a break code when the key is released (code $F0), also framed.
Another site says that when you press a key the following comes out "$E0 $F0 x x", how unclear is that!?! Is the "x x" the data? If so it doesnt make sense!
Then another site says that if you hold down the key, it sends out the scan code repeatedly "10 times per second" until a release (break) code is seen. That can't be true because we can all hit the key for exactly 1 second and this doesnt happen!
All the sites say that the keyboard clock rate can be from 10kHz to 30kHz, if thats true, then if you hit a key for 1 second, it actually has sent out 333 of the same scan code in that time (assuming 30kHz). How is that possible? Do I have to make my module over come this or is there something else going on?