Connect with us

Help with USB pinouts

Discussion in 'Datasheets, Manuals and Component Identification' started by Hermes, Mar 24, 2012.

  1. Hermes

    Hermes

    7
    0
    Mar 24, 2012
    Hello, could I ask for advice please? I am making a cable to connect my Garmin etrex to a USB plug. I have the pinouts for the USB (standrad A) and the data signals run through pins 2 and 3.

    Pin 2 is described as D-

    Pin 3 is described as D+

    My question is, does D+ mean it is the data out line (from my PC) or the data in line (from my Garmin)?

    Your help would be much appreciated.

    Regards

    Hermes
     
  2. KJ6EAD

    KJ6EAD

    1,114
    157
    Aug 13, 2011
  3. Hermes

    Hermes

    7
    0
    Mar 24, 2012
  4. timothy48342

    timothy48342

    218
    0
    Nov 28, 2011
    I think that D+ and D- are not 2 data lines. (like in and out)
    I can't say for sure, but here is my reasoning.
    With a signal sent along just one straight wire, (the return path would be the ground) you put out some radio waves from the wire. The radio waves are energy lost to the signal and the signal will be weaker at the other end. If you put another signal wire next to, (like as D+ is next to D- in the cable) then you get "crosstalk." A signal transmitted along D+ with ground as the return could be detected on D- as well. You could even get crosstalk that jumps to another cable laying on the floor next to it.

    Crosstalk is bad. The way to avoid it is to use 2 wires laying next to each other and not use the ground for the return. The signal is respresented in the voltage difference between the 2 wires. The 2 wires put out opposite radio waves and from a distance they essentially cancle each other. Up close they still they would not and you would still get crosstalk from those 2 wires to another pair of wires in the same cable.

    So what they do in the case of telephone and ethernet cables is to twist the 2 wires together. The rate of twisting has something to do with the speed that the signal propagates along the pair and with the proper twisting, crosstalk is reduced to near nil.

    Now did they do this with UBS?? I do not know. However, I was reading this wiki on USB pinouts and in the cabling section:
    http://en.wikipedia.org/wiki/Universal_Serial_Bus#Cabling
    They talk about the crosstalk and the fact that D+ and D- are twisted together.

    Now if you took 2 wires carrying 2 seperate signals and twisted them together, you wouldn't prevent ANY crosstalk since the wires are not twisted with their return paths. (ground) AND you would actually CAUSE crosstalk between the 2 twisted signal carrying wires.

    I have to conclued that D+ and D- must be together carrying 1 signal.

    That does leave the question of how data is sent and recieved. There have been some systems in the past where multiple devices all listened to a sort of "shouting channel" When one device would shout out information, all the devices would here it and there would be an ID code so that only the device with the correct ID would pay attention. There was some way that the devices all kept from shouting over each other. (I think Appletalk used that method)

    So maybe the USB host and the USB device have a way of taking turns shouting along the same channel, and both just use D+ and D- together as one channel.

    I couldn't find that for sure, but I am betting it is the case, mostly from just the fact that they twist the wires in the cable and that would be stupid if it was not the case.

    Whew!! Just wrote a book. Sorry. Hope you all enjoyed your reading asignment for the evening.

    --tim
     
  5. davenn

    davenn Moderator

    13,260
    1,748
    Sep 5, 2009
    USB data is sent as packets, in a single direction at a time....
    4. Types of data transfers
    Before we can understand any further detail about the communications process within a USB network, we need to be aware of the types of data that it must cope with. To accommodate the different types of data that needs to travel across the USB, each pipe can be configured as one of four transfer types.

    Control Transfers : These differ from the other types in that they are intended for use in configuring, controlling, and checking the status of a USB device. A request is sent to the device from the host, and appropriate data transfers follow in the appropriate pipes. At some later stage, a status indicator is returned to the host. The pipe used for this type of data may be bidirectional, but uses the same numbered endpoint for each direction. In addition, a device only handles one control request at a time, with the host withholding outstanding requests until a status is returned on the one in progress. For example, the Default Control Pipe uses Control Transfers and accomplishes such tasks as initialising the device, and telling the host of the requirements of each of its endpoints. This type of pipe might also be used to control the operation of other pipes.

    Isochronous Transfers : These involve data whose accuracy is not critical and which is sent at a rate corresponding to some timing mechanism. For example, 44100KHz audio fits into this category since it doesn't have to be perfectly accurate and every 44100 samples indicates one second of audio. USB provides a special type of transfer for this data, giving it preference to guarantee a constant transmission rate with the required bandwidth. To ensure that the USB has enough time to handle the maximum data flow (1023 bytes) in each frame, a check is made during the initial configuration and the pipes will only be configured if this check is successful. This transfer method uses unidirectional pipes with no error handling procedures. Even though an error may be indicated in the status reply to a request, the pipe will not be halted and it is up to the software to decide what to do.

    Interrupt Transfers : These are used for small, infrequent transfers which require priority over other requests. As with Isochronous transfers, pipe configuration is granted on whether or not the system can handle the maximum packet size within the required time, with a further restriction that stops Interrupt and Isochronous Transfers from using more than 90% of any frame (discussed later) and stopping other transfers from occurring. The endpoint tells the host during configuration how often it should be polled for interrupt requests, and upon each polling returns a NAK signal if there is nothing to send. The use of this type of pipe is in some ways similar in purpose to the IRQ lines of the traditional peripheral system used in computers.

    Bulk Transfers : As the name suggests, the intended purpose is for transmitting large amounts of data. This type of transfer gets the lowest priority, so pipes using this method are only allowed to transmit when there is available bandwidth. This means that a heavily loaded USB may have relatively slow bulk transfers compared to one with is servicing few devices. This transfer type would be useful for sending data from devices like digital scanners.

    Cheers
    Dave
     
  6. Hermes

    Hermes

    7
    0
    Mar 24, 2012
    Soooo, what does D+ and D- mean? Is D+ carrying a signal in or out of my PC?
     
  7. davenn

    davenn Moderator

    13,260
    1,748
    Sep 5, 2009
    Both.... Read the first part of my post :)

    The D+ and D- are just a pair of wires .... The D+ is carrying signal both ways BUT only in one direction at a time

    Dave
     
  8. Hermes

    Hermes

    7
    0
    Mar 24, 2012
    This would indicate that it doesn't matter which way around they are connected?
     
  9. gcb

    gcb

    32
    0
    Mar 26, 2012
    as with any wire :)

    just link the ports correctly
     
  10. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,178
    2,690
    Jan 21, 2010
    No it wouldn't.

    If it didn't matter they'd both be called D

    The fact that they have suspiciously different designations indicates that it does matter.
     
  11. timothy48342

    timothy48342

    218
    0
    Nov 28, 2011
    If you swap the + and - on an analog signal like audio or a radio carrier, it doesn't have much effect, but if ya take a digital signal and swap all the 1's for 0's and 0's for 1's, it changes its meaning entirely.

    So, no, you can't swap D+ and D-. I can't imagine it would cause any damage to have them wrong, but just wouldn't work.

    -tim
     
  12. Steve Johnson

    Steve Johnson

    19
    0
    Feb 10, 2012
    I would consider this as it's only 10 bucks and reviews say it works with the eTrex:
    http://www.amazon.com/gp/product/B0007T27H8

    Update: Got the USB/serial cable and it installed fine in Win 7 but I can't get it to install as com 1 through 8 which the Garmin needs.
    Will try installing it on one of my other workstations that does not have so much USB hardware hooked up to it.
     
    Last edited: Apr 17, 2012
  13. timothy48342

    timothy48342

    218
    0
    Nov 28, 2011
    I was just reading up on the Garmin etrex and while it has the same number of connections as USB, it doesn't seem to use UBS protocol, and there is no reason at all to assume that the 2 data lines are used like D+ and D- of USB and no reason to assume it is compatible at all with USB. The manual calls those data in and data out and they probably are.

    The expensive cables that they sell have thier proprietary plug on one end and serial on the other.

    Why were you trying to connect it with USB in the first place? Why not serial?

    One way you might search for more info:
    Type "hacking garmin etrex" into your search engine, (or some similar phrase of your choise) but click on images, so the search engine gives you just pictures. Visually scan through those images and click on the ones that look like they might be plugs or cables that someone has made or schematics or pictures of pinouts, then look at the website it came from to see what they are talking about.

    And everyplace I look (not just the manual) people call those 2 data pins data in and data out, never D+/D-.

    --tim
     
  14. Hermes

    Hermes

    7
    0
    Mar 24, 2012
    This is actually my poiont. My original question was asking what way around they should be connected.
     
  15. davenn

    davenn Moderator

    13,260
    1,748
    Sep 5, 2009
    D+ to D+
    D- to D-


    Dave
     
  16. timothy48342

    timothy48342

    218
    0
    Nov 28, 2011
    But davenn, he doesn't 2 D+'s and 2 D-'s.
    He has "D+", "D-", "data in", "data out" and he is aksing how those 4 get paired up.

    I am pretty sure the answer is that they don't get paired up.

    Hermes, why not use a seriel connection? Then you have "data out", "data in", "RxD" and "TxD". It seems like am lot other people with the etrex are using serial.
    --tim
     
  17. Hermes

    Hermes

    7
    0
    Mar 24, 2012
    I don't have a serial connection on my PC or laptop. I can easily make a lead with a serial connector because the exact instructions are on line ( http://www.jens-seiler.de/etrex/datacable.html )

    and then I could buy a serial to USB convertor lead on ebay ( http://www.ebay.co.uk/itm/230584255185?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1438.l2649 ) and connect the purchased convertor lead and my home made lead together.

    But considering all the convertor lead will do is to reroute the same two data lines to a USB plug, I thought I may as well just make a lead with a USB connector in the first place.
     
  18. davenn

    davenn Moderator

    13,260
    1,748
    Sep 5, 2009
    U misunderstand

    D+ of one end of the cable to D+ of the USB port on the puter and the same with the D-
    And the same at the other end of the cable where it goes to the USB device

    For my E-trex I use the serial connection it works well

    Dave
     
  19. Hermes

    Hermes

    7
    0
    Mar 24, 2012
    Great, I'm off to make up the cable :) Thanks davenn
     
  20. ridgerider56

    ridgerider56

    4
    0
    Apr 14, 2012
    germain scope both pins

    not sure if this is how to reply scope it
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-