Complete Newbie - Need a board that can send USB keyboard messages to a PC

I am a software engineer looking for a hardware solution that wil interface with my software.

I need to build a button of some kind that will emulate a USB keyboard sending a particular character to the PC. For example, when I click th button I want it to send the letter "T" as if it was typed on a keyboard.

I have looked at hacking a standard keyboard controller, but I would lik a more elegant solution.

I am looking for advice on where to begin looking for information o programmable chips/boards that might accomplish this. I am completely ne to this, so I don't really even know what questions to ask.

Thanks in advance,

Jeff

Reply to
excellentia
Loading thread data ...

This is really not too hard. The PC keyboard sends clocked serial data over the PS/2 style connector or on a USB port it just sends data. There are any number of MCUs that support a USB slave interface with eval boards. I guess the hard part is knowing exactly what data to send. If you can live with the PS/2 interface, there are two single lines and the PC provides 5 volt power. The signals are just data and clock with both being bidirectional and open collector with pullups. I remember scoping this once and you could see the outputs go high impedance when they were done transmitting (this was a really old system and I believe the outputs were TTL, so slightly lower than

5 volts when driven even when pulled up). This would be a much simpler design than a USB interface. You only need to know the clock speed of your processor and the data rate of the interface which can be found by scoping or a web search will likely find it. Then the software is very simple, one loop to wait for a push button, on activation another loop sends the data with a timer loop to control the bit timing. The PC keyboard sends a scan code to indicate the key was pressed and another scan code when the key is released, IIRC. Repeats of pressed keys are done in the PC.

Here is a web page that gives a lot of detail about the interface and protocol.

formatting link

It may look a bit complex, but it is really very simple, not a lot different than SPI and much simpler than I2C. This should be tons simpler than a USB interface with the protocol that requires.

You can even implement this in a tiny 10 pin MCU with power coming from the PS/2 interface. Or if you do a search, you will find units that already do this, but they are likely to be more complex than your app requires. An MCU eval board is likely to be the right choice for your needs, check out the tiny eval boards TI sells for their MSP430 series. I think they have some that are the size of your thumbnail and sit on the end of a USB dongle for development. They might even be free or at least very cheap. Cypress also has a very tiny eval board that is the size of a 24 pin DIP or so. I seem to recall having another eval board the size of a 24 pin DIP from Analog Devices using an ARM7!

Reply to
rickman

try this link

formatting link

martin

Reply to
martin griffith

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.