Thread: Programming for USB communications

  1. #1
    Funniest man in this seat minesweeper's Avatar
    Join Date
    Mar 2002

    Programming for USB communications

    For my MEng project, myself and the other 3 guys in my group have got to build a robot with intelligent navigation, collision avoidence etc. etc. Now though it is largely a group project we all have areas of 'expertise' that we take responsibility for. Mine is the programming/software. In order to build a robot, it obviously needs numerous bits of hardware, motors, sensors, hydraulic rams/pistons etc that I will need to control from my main program. We are at the stage of considering the options for internal communications and we are really faced with having multiple serial or parallel channels or going for USB. USB has an abundance of advantages with regards to functionality, bandwidth, modular design etc. etc. However my concern is that I haven't been able to find much information out there about programming for USB communications. There is loads of stuff about RS232 but I can't find anything about USB. I want to program using Visual C++ under windows, probably 98. Can anyone give me any good books or web links that could help me? Does anyone have any experience of this and be able to advise me on how viable an option it really is?

  2. #2
    Registered User
    Join Date
    Nov 2001
    I believe USB programming is a type of communication port programming. Apply the same concept as you would using COM ports. Here is a useful communication port programming guide from MSDN.


  3. #3
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Waterloo, Texas
    Heh, if you didn't live so far away, I'd give you mine Anyway, I haven't gotten through it yet, but it's extremely thorough, including the entire specs (condensed), programming examples in C++, VB, etc, and the innerworkings of the transmission protocol down to the bits and bytes. The book is "USB Complete" by Jan Axelson. Retails for $50 US. Check out the book's site at
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
        return std::pow
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Serial Communications w/API
    By john6304 in forum C++ Programming
    Replies: 2
    Last Post: 10-11-2005, 07:27 AM
  2. Ethernet Communications
    By Hankyaku in forum C++ Programming
    Replies: 6
    Last Post: 07-27-2005, 05:57 AM
  3. a tutorial on a voice communications program
    By Geo-Fry in forum C++ Programming
    Replies: 5
    Last Post: 08-12-2003, 07:31 AM
  4. Serial communications problem.
    By papudi in forum C Programming
    Replies: 1
    Last Post: 10-11-2002, 04:23 PM
  5. Serial Communications in C
    By ExDigit in forum Windows Programming
    Replies: 7
    Last Post: 01-09-2002, 10:52 AM