Thread: question about usb

  1. #1
    Registered User
    Join Date
    Oct 2006
    Location
    UK/Norway
    Posts
    485

    question about usb

    I have been doing some reading about usb programming. From what I gathered it looks fairly complex. I mostly do games related programming, and have no experience with communicating with any kind of hardware.

    From what I understand the usb cable has 4 pins. Power plus and negative, and two data ports. What I want to control with my usb is regular RC servo. It only takes one input (apart from power). Can I use one of the data signals from the usb and plug that directly into the rc servo?

    Is there anyway of doing this without having to write some over complicated driver? All I would need is a function for turning the data A and B signals on and off. Anyone knows of any resources that will point me in that direction without being overly complicated? Using a library would work great, if something like that exists.

    Something that works in c/c++ would be prefered but im open to anything that works. Im working on a Windows Vista machine.

    As a side note, does wireless usb exist?

    Thanks,
    Ole

  2. #2
    Registered User
    Join Date
    May 2006
    Posts
    169
    Seeing as usb also delivers power, I assume there isn't a wireless version.
    But if you are looking to control an RC vehicle wirelessly from the computer, then I would expect you should be able to get a remote control / radio transmitter and connect it to the computer, then be able to control just about any RC vehicle.

  3. #3
    Registered User
    Join Date
    Oct 2006
    Location
    UK/Norway
    Posts
    485
    Wireless is not important at all. I was just wondering. So using a usb cable and nothing else would be prefered, if its possible. The RC servo was just an example.

  4. #4
    Registered User
    Join Date
    May 2006
    Posts
    169
    http://www.rcgroups.com/forums/showthread.php?t=851820
    Check this guy here. He is using a usb to serial board that also comes with drivers.

  5. #5
    Registered User
    Join Date
    Oct 2006
    Location
    UK/Norway
    Posts
    485
    Thanks. That looks interesting.

    A question about the API for this one Will it work with visual studio (c++)and windows vista? I tried something like that before, but in order to get it to work I had to buy a license for some other compiler in order to use the .dll files that comes with it.

  6. #6
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,110
    A couple of years ago I did some usb interface programming (in that time I also asked this board for help - although i dont find the thread), at that time our goal was easy: set up a usb device which we can use as if we were adressing/controlling the typical parallel port - with the advantage of the power supply of usb of course. Anyhow my solution was to use a pic microcontroller which had already alot of assembler etc written for so it only took a couple of tweaks to the assembler code to accomplish the low level part.

    This site looks promising http://www.alanmacek.com/usb/ , a nice working example with source code included...

  7. #7
    www.entropysink.com
    Join Date
    Feb 2002
    Posts
    603
    Quote Originally Posted by h3ro View Post
    Thanks. That looks interesting.

    A question about the API for this one Will it work with visual studio (c++)and windows vista? I tried something like that before, but in order to get it to work I had to buy a license for some other compiler in order to use the .dll files that comes with it.

    Yes.

    http://www.ftdichip.com/Projects/CodeExamples.htm
    Visit entropysink.com - It's what your PC is made for!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. another do while question
    By kbpsu in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2009, 12:14 PM
  2. Usb 2.0
    By ober in forum Tech Board
    Replies: 6
    Last Post: 09-06-2003, 10:14 AM
  3. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  4. USB Network?
    By Aidman in forum Tech Board
    Replies: 25
    Last Post: 06-06-2003, 09:22 PM
  5. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 09:22 PM