Simpler USB HID Controller / Simple USB HID Controller

Guest #1830300
Good evening,

I've got the following problem that I'm trying to solve. I'm currently 
doing a masters project in electronics, involving some analogue and 
digital signal processing.
This all works rather well using an ADC and a DSP.

However, I'm now trying to achieve the following:

Based on the analysed data the DSP recognizes one of 6 cases and uses 3 
GPIO pins as outputs for these.
I'd like to be able to send simple keycommands to a PC via USB based on 
what case has been recognized.

Is there a simple, readily available, device that acts as a USB HID 
(keyboard) device that automatically sends "left arrow" "right arrow" 
etc to the PC ?
I'm looking for a solution thats relatively easy to implement, as I 
don't have much time to implement this, which isn't a main part of my 
project.

Any tips / ideas are greatly appreciated.

Thanks
Guest #1830785
PS/2 is a simple serial asynchronous connection, and the data the 
keyboard sends is easy to implement.

For a HID client implementation (USB) with an ATmega have a look for 
V_USB; they have a project which does about what you need 
(http://www.obdev.at/products/vusb/hidkeys.html).  It sends keystrokes 
over USB depending on some inputs (keys).
Guest #1830911
Thanks,
I had a look at their demo HIDkeys, looks great, only issue is that I 
don't have the required number of output pins on the device I'm using. 
Otherwise I'd just use the HIDkeys circuit and code, change the key 
assignments and pull the required pins low using output pins of my 
device.

I've looked at the USB-I2C device at 
http://www.firmwarefactory.com/USB-I2C.aspx

Do you think I can rig that to identify as a keyboard and just send the 
required messages to it via I2C when I want to "press a key"?

Thanks

Chris
#1830998
There's a commercial PS/2 keyboard emulation add-on for Bascom 
(www.mcselec.com), which makes sending scan codes to a PC a piece of 
cake... If you're using C, there should be ready-to-use code as well. 
The search phrase would be "arcade" (people building there own game 
controllers with PS/2 connections).


Good luck

Klaus
Guest #1832665
Just had the idea to simply use a I2C 8bit I/O extender. That way I 
could use the HIDkeys circuit and code an simple pull one pin at a time 
to trigger a "key pressed".

According to the ATMega8A datasheet 12MHz at 3.3V is outside the Safe 
Operating Area.

Has anyone got any experience running the ATMega8A at 3.3V and 12MHz? I 
don't really fancy introducting yet another voltage level to my circuit, 
with another set of level shifters etc.
Guest #1832678
microchip has for their PICs with USB examplecode which implements a HID 
keyboard and mouse. this is for free also the compiler and development 
software.
Guest #1833983
Is this for a one-off design or are you planning to mass produce this?

In the second case I can only recommend to stay away from PS/2 as it is 
an aged and never well documented interface. It can take you a few years 
to get the protocol stack sufficiently debugged because there are so 
many implementations around that vary in significant non-obvious 
details.

Reply

A question of your own? This thread is over 16 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.