| Author |
Message |
|
|
Posted: Feb 26, 2012 - 09:22 AM |
|

Joined: Sep 22, 2010
Posts: 41
|
|
Hi all,
I am working on a project that requires interfacing with a laser scanner (The Hokuyo URG-04LX-UG01 in particular). The interface is USB 2.0 So I figured I needed a micro-controller with USB OTG or Host capabilities and decided to go with an AVR32 UC3 C Series since I needed the extra floating point power for implementing my filtering algorithms.
The problem is that I am new to both the AVR32 family and the USB protocol. So I just wanted to ask whether there is a guide to programming the AVR32, or implementing host features using it. Also, the laser scanner itself when plugged into the computer is detected as a COM port, so it made me thinking if there is a hardware solution that will allow me to interface with it using UART, without having to worry about the intricacies of the USB protocol.
Thanks
Abunada |
|
|
| |
|
|
|
|
|
Posted: Feb 27, 2012 - 03:14 PM |
|

Joined: Sep 22, 2010
Posts: 41
|
|
The project has pretty tight deadlines so I would appreciate any sort of help!
Thanks Again
Abdullah |
|
|
| |
|
|
|
|
|
Posted: Mar 07, 2012 - 12:38 AM |
|

Joined: Mar 28, 2010
Posts: 129
Location: Palmerston North, New Zealand
|
|
Hi Abunada,
The issue you will run into is actually having to write a 'driver' for connecting to the Scanner. This is what is provided for with each operating system, and even though it appears as a COM port, this is because someone has written a driver for the USB system on board the scanner to make it appear that way.
You will need to determine what the parameters of the USB connection are (and therefrore the VID and PID) and then identify the actual protocol requirements (on top of USB) for the devices to be able to talk to each other.
I had a similar issue with a CP210x USB Driver chip that was being used to talk to another device. When connected to a host computer is appeared as a COM port, but still required a driver. You may want to look at the driver (open source) that is available for the scanner in Linux (if there is one) as this is a very good source of information on what the driver should actually do.
The other piece of information I can give is get yourself a copy of Jan AxelSon's book USB Complete, as it is a very good guide to USB.
Regards. |
|
|
| |
|
|
|
|
|
Posted: Apr 16, 2012 - 03:23 PM |
|

Joined: Sep 22, 2010
Posts: 41
|
|
Thanks a lot daffiness for the advice,
I actually got the USB Complete book, and it seems pretty decent; but the protocol is a little complicated and I would really like it if I did not have to write the driver myself. I was just wondering, whether I could use the included ASF CDC driver to communicate with the device, since I know the device implements that class. BTW, when I use linux, I load the cdc_acm driver, which enables me to use it as a regular TTY device.
Thanks Again. |
|
|
| |
|
|
|
|
|
Posted: Apr 17, 2012 - 09:48 PM |
|

Joined: Mar 28, 2010
Posts: 129
Location: Palmerston North, New Zealand
|
|
Hi Abunada,
The ASF implements most of the USB functionality for you, the 'driver' you will need to implement is what commands need to be sent to the device that are specific to the device.
Example here is for the CP210x, using all the normal ASF USB framework, once I had identified that the device was connected, I then needed to send a command message to turn on the USART (in the CP210x) and configure its baud rate using Endpoint 0, then I could send and receive information on the main Bulk endpoint (1). This is the specific functionality you will need to investigate.
If the Device supports a CDC type class then it may be pretty easy, and you can simply start sending and receiving on the main Bulk endpoints that are available.
Regards. |
|
|
| |
|
|
|
|
|