Communication via USB

Discussion in 'The Projects Forum' started by init-0, Aug 12, 2011.

  1. init-0

    Thread Starter New Member

    Aug 12, 2011

    I want to build my own little usb thing, but i dont now yet what it should do, just communicate with my pc for now. ;).
    I can connect my usb port to a breadboard and experiment with it.
    If i connect a LED to it it will light up ( picture ):
    But now i dont know what to connect to the d+ and the d- pole
    [​IMG] Here they only show a JR24 but i want to know how that jr24 or any other similar thing works.
    AFAIK the vendorID and that stuff must be transmitted through the d+ and d- poles aswell. How do i do that, and where can i find a protocol or something?

    Thanks ;)
  2. MrChips


    Oct 2, 2009
    Interfacing directly to USB is not a simple task even for the most knowledgeable and experienced person. Your best solution is to use a ready-made controller that already has a USB interface built-in. These are available from many well known microcontroller manufacturers such as Microchip, Atmel, Freescale, just to name a few. You can also use a USB bridge that translates from USB to serial, parallel or SPI. I am using Silicon Labs CP2102 USB to UART bridge and have found it very easy to use.

    Another solution I overlooked is to simply make the USB transparent by buying a USB to serial cable.
    Last edited: Aug 12, 2011
  3. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    The USB gives about 5V on two wires, and that can be used to light lights, run fans, fish tanks, lots of things.

    To communicate with the PC you need the hardware to handle D+ and D-. I could not find anything on what that JoyWarrier thing is. Do you have one or is it the first thing you have found so far? There are many devices that can do this right out of the box (meaning you don't have to learn programming and get a programmer).

    One example of a dedicated chip for this is here.

    Wiki on USB.
  4. bertus


    Apr 5, 2008
  5. init-0

    Thread Starter New Member

    Aug 12, 2011
    I am a programmer, so thats not the problem ;)
    The Joywarrior was just the first thing i found
    If I want to send data to the computer and back to my breadboard.
    The best would be in ascii, so if i want to send an "A" which is \x41 in hex to my computer i have to send 1000001 to a controller, who sends the data over the d+ and d- poles to my computer where i can parse the input with a driver.
    The controller also needs an output => if i want to send "A" from my Computer to the breadboard i have to parse it there and e.g. let an led light up.
    I think that is possible with the MCP2200, am i right?
    Im taking a look at the Silicon Labs CP2102 USB to UART.
    Which one would you suggest, which one is easier to use?
  6. nickelflipper

    Active Member

    Jun 2, 2010
    The MCP2200 has an easier to solder SOIC pkg. for installing on a smt to dip adapter. You have to add the external crystal and caps, comes with a little GUI for controlling GPIO like those leds, needs WIN XP sp3 or higher.

    If there is more smarts required on the micro side, then many of the arduino boards have the FTDI usb to uart chip on board. Another option is something like the usb bit whacker which has a usb bootloader on a PIC18F or PIC32
  7. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    yep Arduino (and many other microcontrollers) can do it out of the box ($30 for the arduino uno)..sending serial commands,etc.. via USD ports. Then you also have the option of hooking up tons of sensors/switches/LCD screens,etc.. I'd start there..