CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Making Keyboard PS2

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
hmcosta



Joined: 26 Jun 2012
Posts: 3

View user's profile Send private message

Making Keyboard PS2
PostPosted: Sun Aug 18, 2013 8:14 pm     Reply with quote

First Good Night.
I'm doing a project on PS2 keyboard when I turn on the PC or with a regular keyboard and then the same retreat on him and put my so I can send commands to a notepad, I can write letters and numbers, the problem is when I turn on my PC with my keyboard, so it does not work, after reading some articles identified that it has to be connected to a communication protocol for identification.

Commands "host"
These commands are sent by the "host" for the keyboard. The man command
common will be to "setting / resetting" Status Indicators. (I.e., LEDs On
Lock, Caps Lock and Scroll Lock). The most common and useful commands are:
ED Set Status LED's - This command can be used to connect or disconnect
LEDs Num Lock, Caps Lock and Scroll Lock. After sending ED, the keypad will
respond with an ACK (FA) and waits for another byte that determines the status. Bit 0
controls the Scroll Lock, Num Lock bit 1 and bit 2 the Caps Lock. Bits 3 through 7 are
ignore.
EE Echo - after sending a command to the host Echo, the keypad will
respond with an Echo (EE).
F0 Set Scan Code Set - After sending F0, keyboard will reply with a
ACK (FA) and wait for another byte, 01-03 which determines the "scan code" used. Sending
00 as the second byte will return the "scan code set" currently in use.
F3 Set Typematic Repeat Rate - The host will execute the command acknowledge
with FA and wait for the second byte, which determines the "Typematic Repeat Rate".
F4 Enable Host - clears the keyboard buffer of "output", allows the scanning host
and returns an acknowledge.
F5 Disable Host - performs the reset the keyboard and does not allow the Host and the scanning
returns acknowledge.
Theoretical work - Computer Architecture II p. 20
FE Resend - Upon receipt of the returned command, the keypad will
retransmit the last byte sent.
FF Reset - Resets Host.
Commands
If commands are sent from the Host to Host the keyboard, then the
keyboard commands to be sent from the keyboard to the host. Below, some of the
commands that the keyboard can send.
FA - Acknowledge
AA - Passed Power On Self Test (BAT completed)
EE - Command Echo (Host Commands)
FE Resend - Upon receipt of the returned command, the host should
retransmit the last byte sent.
00 - Error or Buffer Overflow
FF - Error or Buffer Overflow

The problem is that my protocol is not working, does anyone have a clue how to do?
Ttelmah



Joined: 11 Mar 2010
Posts: 19537

View user's profile Send private message

PostPosted: Mon Aug 19, 2013 1:38 am     Reply with quote

Have a look at:

<http://www.ccsinfo.com/forum/viewtopic.php?t=25673&highlight=ps2>

Complete keypad driver that interfaces to the PC via the PS/2 connection.

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group