Simulate keyboard with Propeller
salokcin
Posts: 6
Hi there, just wondering if any of you fine folks can help me understand how I might build something similar to "Ultimarc's I-Pac" using the Propeller. I basically need to be able to plug my Prop in via USB and have it act as a keyboard. I want to be able to use Spin to send commands, like "Ctrl+G" etc.
Any pointers in the right direction would be MUCH appreciated!
Any pointers in the right direction would be MUCH appreciated!
Comments
EDIT: It may even be easier if you can find an old infrared keyboard reciever (you may not even need the keyboard, but it'd make it easier) then replace the IR reciever with a lead from the micro controller. If you get the keyboard as well, then figguring out what pulses represent what key because even easier. Just a thought.
Post Edited (J. A. Streich) : 2/19/2009 5:48:29 PM GMT
This is for a CNC mill I'm building. I'm using Mach3 CNC control software from Artsoft. You can assign basically ANYTHING in the system to fire on a custom key combination. You can also assign anything in the system to one of 5 input pins on the parallel port (definitely not enough pins!).
I want to simulate a keyboard so I can hook up a bunch of buttons using their keyboard combinations.
Mach3 does allow you to setup a "port" (as far as I know this is always a printer port). Then it will listen on whatever "pin" you tell it to in order to see if that pin is high or low. If I knew more about how all these ports work I might be able to figure out how to simulate a port (or use the port that's setup when I plug my PPDB in) and query the Propeller pins. I just simply don't grasp enough to know if that's possible first off, and how to do it secondly.
The software, Mach3, actually allows me to communicate with the propeller chip using the Modbus protocol over serial. I'm trying to figure this out (pretty new with serial).
So Mach3 sends a command in a set of bytes that can be 8+ bytes (depending on the command). I've been reading over FullDuplexSerialPlus (over and over!) and playing around with it, trying to figure out the best way to do this. I just need to get a byte array that contains all the bytes coming in. I don't know how to do this on a dynamic number of bytes.
If I can get this figured out I think I'm home free. Any help is much appreciated! Thanks again!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
JMH