tags:

views:

168

answers:

1

we are developing a sendor device, with a arm7(current: LPC2368) .

this device samples a mv signal,A/D, and need to send this signal data to the PC.(continusly)

at the same time, PC need send command to arm7 (like get temperature, control status, etc..)

rs232 is too slow, so we choose USB.(20K/s - 200K/s)

but the question is, we donnot known how to do usb programming(both pc and arm..)

any direction? any portal? any tutorial?

currently we only sim the device as a HID....

+1  A: 

For the ARM side you need a USB Stack. For the PC side you need to implement an USB driver and an application interfacing the driver. It is therefore easier to stick to one of the common profiles (HID, Mass Storage, Virtual COM). For all these you will be able to find USB stacks and not to have to implenent your own. Also you won't need to implement a USB driver for the PC.

I think that the easiest thing to do is to use a Virtual COM approach. From the PC side it would like you are accessing a Serial Port. The speed however can be higher than standard RS232 ports. I have found this USB Stack targetting an earlier processor. You could adapt it for your needs or use it as reference. Generally a Virtual COM driver for the PC will be provided along with the ARM USB stack.

Another approach is to use libusb. This will allow you to interact with USB without writing a kernel driver.

For application notes and commercial USB stacks look here. If you are determined to write your own stack and driver, Jungo is the industry leader for embedded USB stacks and drivers.

kgiannakakis
I know there is libusb, and have no clue on how to use it...any tutorial for some real device like usb flash?
linjunhalida
Have a look at http://wiki.sikken.nl/index.php?title=LPCUSB
kgiannakakis