On Thu, 26 Jul 2007 07:42:48 -0500, in comp.arch.embedded
"excellentia" <jash@excellentiasoftware.com> wrote:
>I am a software engineer looking for a hardware solution that will
>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 the
>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 like
>a more elegant solution.
>
>I am looking for advice on where to begin looking for information on
>programmable chips/boards that might accomplish this. I am completely new
>to this, so I don't really even know what questions to ask.
>
>Thanks in advance,
>
>Jeff
>
On Jul 26, 8:42 am, "excellentia" <j...@excellentiasoftware.com>
wrote:
> I am a software engineer looking for a hardware solution that will
> 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 the
> 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 like
> a more elegant solution.
>
> I am looking for advice on where to begin looking for information on
> programmable chips/boards that might accomplish this. I am completely new
> to this, so I don't really even know what questions to ask.
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.
http://www.computer-engineering.org/ps2protocol/
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 by Donald●July 26, 20072007-07-26
excellentia wrote:
> I am a software engineer looking for a hardware solution that will
> 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 the
> 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 like
> a more elegant solution.
>
> I am looking for advice on where to begin looking for information on
> programmable chips/boards that might accomplish this. I am completely new
> to this, so I don't really even know what questions to ask.
>
> Thanks in advance,
>
> Jeff
>
>
http://www.xs4all.nl/~dicks/avr/usbtiny/
This is a begining.
You will need to learn assembly language programming as well as hardware
programming.
good luck, let us know how you get along.
donald
Reply by excellentia●July 26, 20072007-07-26
I am a software engineer looking for a hardware solution that will
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 the
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 like
a more elegant solution.
I am looking for advice on where to begin looking for information on
programmable chips/boards that might accomplish this. I am completely new
to this, so I don't really even know what questions to ask.
Thanks in advance,
Jeff