Programs using USB

Discussion in 'Programmer's Corner' started by PRS, Jun 24, 2009.

  1. PRS

    Thread Starter Well-Known Member

    Aug 24, 2008
    989
    35
    When I was properly informed about computers we used the parallel printer port or the serial port. Now there is the USB. Does anyone know how I can address a particular USB and make it do I/O?
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,154
    1,795
    Sure, I can make USB sing songs and do dances. What did you have in mind?
     
  3. nanovate

    Distinguished Member

    May 7, 2007
    665
    1
    Maybe Jan Axelson can help you out:
    http://www.lvr.com/
     
  4. Papabravo

    Expert

    Feb 24, 2006
    10,154
    1,795
    She definitely wrote a terrific pair of books. You should also check out

    www.usb.org

    There you will find a mountain of ".pdf" documentation. It may take upwards of several months to go through it all.

    A process known as enumeration will be used to assign an address and figure out how many endpoints there are and what capabilities a function has. Among all the kinds of things you will encounter are the HID(Human Interface Device) and the Bulk Only Transport. Have fun and knock yourself out!
     
  5. n9352527

    AAC Fanatic!

    Oct 14, 2005
    1,198
    4
    Or just use an FTDI chip, such as FT232. It connects to the USB port, can appear and be accessed as either a COM port or a USB peripheral. And outputs TTL level serial signal.
     
  6. CDRIVE

    Senior Member

    Jul 1, 2008
    2,223
    99
    Gentlemen, I'm also a member of several VB6 forums where this question comes up every few weeks. I always tell the TS that if they don't have a SDK for the device they're SOL. Have I been giving them erroneous information?

    EDIT: That would be a SDK for a given programming language.
     
    Last edited: Jul 14, 2009
  7. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    USB has two lives, that of device, and that of host. As a host residing within a Window's environment, you require additional Window's resource capabilities, typically made up of a device driver interfacing to an enduser application. That is a field in it's own. An SDK gives on the ability to fast track that end of things. Jungo offers driver development software, but an app is still required to 'process' the data.

    Luckily, Windows has a number of 'generic' drivers that will auto launch when certain USB devices 'identify' themselves in the appropriate manner. Mass storage and HID classes being common.

    Using this info, your device can 'emulate' these protocols and communicate over the generic port. Windows typically launches an app that recieves the 'data' over the port driver. In the HID class for instance, you could send data that could appear in a text editor.

    How usefull is this?, great for learning, but if you want to 'process' the data, you'll need an application running on the PC operating system to perform the required tasks.
     
  8. ELECTRONERD

    Senior Member

    May 26, 2009
    1,146
    16
    Did ya'll hear that they're coming out with USB 3.0? Pretty neat.
     
  9. CDRIVE

    Senior Member

    Jul 1, 2008
    2,223
    99
    Mass storage and HID classes are recognized by the OS so I'm not referring to them.
     
  10. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    well, may I add then that a class that provides for vendor extensions may be well served with an SDK?
     
    Last edited: Jul 15, 2009
Loading...