Keyboard and Mouse - PS/2 emulation
I did my fair share of searching, but all I got was how to take in keyboard input for use with the Propeller.
I'm trying to make a hardware macro circuit using the Propeller and a PS/2 output interface to use with my computer. I've never done much interfacing with PS/2, but I figure that a micro controller would be the best way to do so. Likewise, I've never had any experience with the Propeller! Just various PICs.
I know I'm being vague here, but I don't know what else to say. I want to emulate both keyboard and mouse events through the PS/2 interface using the Propeller. Any idea on how I would go about doing so?
Thanks [noparse]:)[/noparse]
-Skyler
I'm trying to make a hardware macro circuit using the Propeller and a PS/2 output interface to use with my computer. I've never done much interfacing with PS/2, but I figure that a micro controller would be the best way to do so. Likewise, I've never had any experience with the Propeller! Just various PICs.
I know I'm being vague here, but I don't know what else to say. I want to emulate both keyboard and mouse events through the PS/2 interface using the Propeller. Any idea on how I would go about doing so?
Thanks [noparse]:)[/noparse]
-Skyler
Comments
Where did you see that thread, Mike? I've been searching up and down!
-Skyler
(a) You are developing a complex electronic circuit -> no help needed
(b) You want to connect it to the Prop -> probably no help needed, as you have general background from PICs.
(c) you want the Prop to output PS/2 signals to the PC to make it believe you are a keyboard and/or a mouse -> help needed.
If this is correct, I should recommend:
(1) Work through the Prop Manual (and the educational examples) to understand its architecture
(2) Learn SPIN to understand how much assembly language you will need
(3) Augment your knowledge of Prop assembly language
(4) Understand the Keyboard Protocol (lots iof excellent information in the web, e.g.
www.computer-engineering.org/ps2protocol/
www1.cs.columbia.edu/~sedwards/classes/2005/emsys-summer/ps2-keyboard.9up.pdf
)
(5) Work yourself through the mouse.spin and keyboard.spin drivers
(6) Write your own program
I think we can help in all 6 steps, when you have a concrete question
Once you are more familiar with spin and (more likely) asembly, you will then be able to write what will likely become a "driver" object where you simply pass it commands based on I/O pin states. Your driver object would then interpet the commands from your I/O reader application and communicate with your PC as if it were a ps/2 keyboard or mouse.
Quickly looking at the protocol, it specs a simple start/stop/ack sequence, where the host (PC) has total control over the communications, ps/2 device has to generate the CLK signal, and comm speed is between 10-16.7KHz. Your first task - and probably most daunting for your project- would be to create a communication "driver" object to automate communication from your program to the PC, after accomplishing that, inputting events to the prop will be easy, main program will likely be short and straight foward and project dev comes quickly therafter.
The most important thing to do is to learn the lingo and approach with an open mind, the prop is a pretty powerful and robust little chip. I think the opperating test specs exeed military standards for temperature.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
E3 = Thought
http://folding.stanford.edu/·- Donating some CPU/GPU downtime just might lead to a cure for cancer! My team stats.
www.computer-engineering.org/ps2keyboard/
www.computer-engineering.org/ps2protocol/
www.computer-engineering.org/ps2keyboard/scancodes2.html
Graham