rossyroo's Avatar rossyroo 0
1 Asked
0 Answered
0 Best
0
No one has voted on this question yet :(
1 year, 5 months ago

Sorry if this is overly simple, but how can I interface i/o pins on a launchpad or arduino with usb data lines?

I'm trying to use a arduino or TI launchpad to interpret/convert data from a usb keyboard without going in through built in usb port. I haven't really tried anything yet because I don't exactly know where to start, but my main issue is reading the serial data at the proper rate. Sorry if this is a simple fix, I've googled and researched everything I could think of.
Separate topics with commas, or by pressing return. Use the delete or backspace key to edit or remove existing topics.

You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.

M$

What is Your Answer?

0
0
0

2 Answers

0
st2000's Avatar
st2000 | 1 year, 5 months ago
8
Welcome to the world of USB. Here are the rules. There is only one USB host. There can be many USB peripherals. The USB host is complex, controls everything and can talk different protocols to all the different peripherals. The USB peripherals are simple, only knows about its self and can only talk it's own protocol.

A keyboard is a USB HID (Universal Serial Bus Human Interface Device) peripheral. To talk to it you need to be a USB host. I doubt the TI processor on the Launch Pad has hardware to support a USB host port.

Maybe, just maybe you could implement a USB host in software that would only talk to a USB HID keyboard. And maybe you can squish that into the TI processor on a Launch Pad. But, if time were money, it would almost always be wiser to use a bigger embedded processor which implements some of the USB host features in hardware.

Should I say it? Yes, you bit off a lot trying to create a USB Host for your first USB project. To find out more I would recommend picking up some of Jan Axelson's great USB books. There's lots of details and useful information. You can find them at Amazon, but here is her web page which contains a lot more resources on the subject:

http://www.lvr.com/usb.htm

-good luck

You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.

M$

Report Abuse

Post Reply Cancel
0
farldarm's Avatar
farldarm | 1 year, 5 months ago
6
The simple answer is, you won't. The more advanced answer is, you need a usb host application and/or usb host chip to access the usb output of the usb keyboard. It might be possible to open up the keyboard and tap the data between the keyboard controller and usb interface chip IF they are separate chips. I have seen keyboards with dual chips and single chips. No way to know if yours is dual or single. If it's dual then you just need to figure out how they communicate and which lines they use. The easier answer is to use a PS/2 keyboard or one of the keyboards that do usb and ps/2 on the same connector and talk to it via the PS/2 interface. The PS/2 interface is a relatively simple serial protocol which is easy to implement on an AVR.(Arduinos use AVR microcontrollers) In fact, atmel.com (maker of AVR) has code on their site for doing just exactly that. I bet if you search you can find code specifically modded for the arduino to talk to a PS/2 style keyboard even. I have seen an AVR play usb host once to talk to a usb keyboard but I doubt it would work inside the arduino code framework as arduino libs are rather bulky and slow and the usb host for avr was done in assembly.

Enjoy,
Ray

You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.

M$

Report Abuse

Post Reply Cancel