go_away

Author Topic: Custom USB Drivers  (Read 2951 times)

0 Members and 1 Guest are viewing this topic.

Offline vonlarkTopic starter

  • Jr. Member
  • **
  • Posts: 16
  • Helpful? 0
Custom USB Drivers
« on: December 31, 2007, 04:19:19 PM »
I'd love to be able to plug my projects into my computer's usb port and control them from my computer. Unfortunately I know next to nothing about usb communication. How can I get started writing drivers to interface with my custom usb devices?

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: Custom USB Drivers
« Reply #1 on: December 31, 2007, 04:37:03 PM »
I'm not an expert on this so others should definitely comment . . .

The method I do it is by using a chip called CP2102 which does a USB to UART conversion, then I use hyperterminal to send messages and commands.

this is my uart tutorial that might help you:
http://www.societyofrobots.com/microcontroller_uart.shtml

Offline SomeSaba

  • Full Member
  • ***
  • Posts: 75
  • Helpful? 0
Re: Custom USB Drivers
« Reply #2 on: December 31, 2007, 07:50:13 PM »
So u dont need like a TTL to 10volt serial conversion then again another one from serial to USB?

If its just USB to UART i assume thats TTL and u can connect the converted signal straight to the pins on ur mcu?
« Last Edit: December 31, 2007, 07:50:48 PM by SomeSaba »

Offline SomeSaba

  • Full Member
  • ***
  • Posts: 75
  • Helpful? 0
Re: Custom USB Drivers
« Reply #3 on: December 31, 2007, 08:02:59 PM »
I just looked it up and i cant find a non-surface mount version o.0 is this correct?

Offline frank26080115

  • Supreme Robot
  • *****
  • Posts: 322
  • Helpful? 2
Re: Custom USB Drivers
« Reply #4 on: December 31, 2007, 09:29:43 PM »
http://www.sparkfun.com/commerce/product_info.php?products_id=198

what's the big difference between a FT232 and the CP2102?

I'm also working on learning USB... It'd be cool to be able to grab frames from a webcam on a robot, right now all i know is I can get a bunch of info if i type lsusb into my terminal...

Offline vonlarkTopic starter

  • Jr. Member
  • **
  • Posts: 16
  • Helpful? 0
Re: Custom USB Drivers
« Reply #5 on: January 01, 2008, 01:24:48 AM »
I thought there was a pretty big difference between a high speed usb connection using a custom usb driver to interface a device with program on a pc and using hyperterminal to type messages to a robot.

For one, the first sounds much cooler.

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
Re: Custom USB Drivers
« Reply #6 on: January 01, 2008, 05:45:48 AM »
Quote
I thought there was a pretty big difference between a high speed usb connection using a custom usb driver to interface a device with program on a pc and using hyperterminal to type messages to a robot.

using a USB to UART chip (such as the FT232 and the CP2102) means you don't have to write a driver. the chip manufacturer has done that for you and the chip will appear on your computer as a virtual serial port (COM port if you use windows).

you can then have any program running on your PC write text strings to the virtual serial port.
nice and easy.

writing USB drivers is somewhat complicated.
have a look here if you want to get involved in making USB devices without using a USB to UART chip: http://www.obdev.at/products/avrusb/index.html
(unfortunately the recent SOR web hosting problems wiped out the code from my own project there. i'll have it back up i the next few days.)


Quote
what's the big difference between a FT232 and the CP2102?

different manufacturer. read the datasheets for exact differences.


dunk.

 


Get Your Ad Here

data_list