• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
Sign in to follow this  
Followers 0
jaclaz

The (meta-sata-pata)physics of USB Transfer

19 posts in this topic

Those slim USB drives must also make trade-offs to achieve the reduction in size, like a reduction in transfer speed. There is no easy way to cheat physics.

Well, it depends on the type of data you send.

You see, 1's are slim enough, 0's are rather fat and may get slowed down by friction in the tinier electronic pipes.

As long as you send lots of 1's everything seems normal but when you want to actually 00 out a stick, it will get SLOW.

:whistle:

Though for very different reasons, the effect is not completely unlike what happens with cable connections:

http://www.911cd.net/forums//index.php?showtopic=21827&st=23

though if you use 0's and 8's on those tiny USB sticks, you will actually worsen the issue :ph34r:

:lol:

jaclaz

Edited by jaclaz
0

Share this post


Link to post
Share on other sites

Those slim USB drives must also make trade-offs to achieve the reduction in size, like a reduction in transfer speed. There is no easy way to cheat physics.

Well, it depends on the type of data you send.

You see, 1's are slim enough, 0's are rather fat and may get slowed down by friction in the tinier electronic pipes.

As long as you send lots of 1's everything seems normal but when you want to actually 00 out a stick, it will get SLOW.

:whistle:

Though for very different reasons, the effect is not completely unlike what happens with cable connections:

http://www.911cd.net/forums//index.php?showtopic=21827&st=23

though if you use 0's and 8's on those tiny USB sticks, you will actually worsen the issue :ph34r:

:lol:

jaclaz

Too bad nobody posted the real reason 0's are slower than 1's when writing USB Devices.

0

Share this post


Link to post
Share on other sites

Too bad nobody posted the real reason 0's are slower than 1's when writing USB Devices.

It boils down to line capacity. 0's require more bandwidth than 1's going through the line. USB wiring specifications lack 0-bit compression.

USB nominal transfer rate bit 0

Type A Connector
__________ ____________________________________________________________
| ______ | ________ ________ ________ ________ ________
| [______] | --> / \ / \ / \ / \ / \
| _____ | --> | | | | | | | | | |
| [_____] | --> | | | | | | | | | |
| [_____] | --> | | | | | | | | | |
| ______ | --> | | | | | | | | | |
| [______] | --> \________/ \________/ \________/ \________/ \________/
|__________| ____________________________________________________________

Result 0 0 0 0 0

===============================================================================

USB nominal transfer rate bit 1

Type A Connector
__________ ____________________________________________________________
| ______ |
| [______] | --> /| /| /| /| /| /| /| /|
| _____ | --> / | / | / | / | / | / | / | / |
| [_____] | --> | | | | | | | |
| [_____] | --> | | | | | | | |
| ______ | --> | | | | | | | |
| [______] | --> __|__ __|__ __|__ __|__ __|__ __|__ __|__ __|__
|__________| ____________________________________________________________

Result 1 1 1 1 1 1 1 1

0

Share this post


Link to post
Share on other sites

It boils down to line capacity. 0's require more bandwidth than 1's going through the line. USB wiring specifications lack 0-bit compression.

Not really. :(

In your nice diagram both the 0 and 1's are propelled by a same given force, the --> :



Type A Connector
__________
| ______ |
| [______] | -->
| _____ | -->
| [_____] | -->
| [_____] | -->
| ______ | -->
| [______] | -->
|__________|

Since you are transmitting bits in vertical position the actual (band) width is actually the height between the two horizontal walls of the pipe (and is obviously a constant), this has nothing to do with actual rate.

A more accurate diagram (though you still have the actual bits sideways) is this one:


Type A Connector
__________ __________________________________
| ______ |
| [______] | --> /| --> /| --> /|
| _____ | --> / | --> / | --> / |
| [_____] | --> | --> | --> |
| [_____] | --> | --> | --> |
| ______ | --> | --> | --> |
| [______] | --> __|__ --> __|__ --> __|__
|__________| ___________________________________

(you have to push each single byte).

In such a scenario, physics tells us how if you give a stronger push, the pushed object will acquire greater speed, so that if the diagram was a motion picture, what you woud see would be roughly as follows:

Type A Connector
__________ __________________________________
| ______ | ____ ____ ____
| [______] | ---> / \ ---> / \ ---> / \
| _____ | ---> | | ---> | | ---> | |
| [_____] | ---> | | ---> | | ---> | |
| [_____] | ---> | | ---> | | ---> | |
| ______ | ---> | | ---> | | ---> | |
| [______] | ---> \____/ ---> \____/ ---> \____/
|__________| ___________________________________

BUT what the good guys did was simply to use smaller characters:


____
/| / \ ____
/ | | | /| / \
| and | | = | and | |
| | | __|__ \____/
| | |
__|__ \____/

And sent them vertically, here you can see how the fatter 0's may slow down transfer, since they go more tight in the pipe:


|__ __ |
| | |
| | |
| |/ |
| ____ |
|/ \|
|| ||
|\____/|
| ____ |
|/ \|
|| ||
|\____/|
| ____ |
|/ \|
|| ||
|\____/|
|__ __ |
| | |
| | |
| |/ |
|__ __ |
| | |
| | |
| |/ |
| ____ |
|/ \|
|| ||
|\____/|

jaclaz

Edited by jaclaz
0

Share this post


Link to post
Share on other sites

Guys, going over and over with that kind of jokes is not too helpfull IMO, however I was wondering if rloew was also joking saying that transmitting zeros was slower than transmitting ones so I looked up a bit and from what I understand (perhaps erroneously) by briefly reading about NRZI encoding used for USB data transmission it would be that the more there are bit changes the slower the transmission.

Edited by loblo
0

Share this post


Link to post
Share on other sites

Guys, going over and over with that kind of jokes is not too helpfull IMO, however I was wondering if rloew was also joking saying that transmitting zeros was slower than transmitting ones so I looked up a bit and from what I understand (perhaps erroneously) by briefly reading about NRZI encoding used for USB data transmission it would be that the more there are bit changes the slower the transmission.

Noone ever tagged those posts as "helpful", AFAIK. :whistle:

I asked dencorso if he could split these few posts to a new thread, so that we can discuss some physics ;) without deranging the NUSB topic. :ph34r:

A bit more seriously (but not much ;)) the NRZI in itself has no consequence, it is the bit stuffing that actually makes the USB behave the other way round:

http://en.wikipedia.org/wiki/Non-return-to-zero

Non-Return-to-Zero Inverted (NRZI)

Example NRZI encoding

NRZ-transition occurs for a zero

Non return to zero, inverted (NRZI) is a method of mapping a binary signal to a physical signal for transmission over some transmission media. The two level NRZI signal has a transition at a clock boundary if the bit being transmitted is a logical 1, and does not have a transition if the bit being transmitted is a logical 0.

"One" is represented by a transition of the physical level.

"Zero" has no transition.

Also, NRZI might take the opposite convention, as in Universal Serial Bus (USB) signalling, when in Mode 1 (transition when signalling zero and steady level when signalling one). The transition occurs on the leading edge of the clock for the given bit. This distinguishes NRZI from NRZ-Mark.

However, even NRZI can have long series of zeros (or ones if transitioning on "zero"), so clock recovery can be difficult unless some form of run length limited (RLL) coding is used on top. Magnetic disk and tape storage devices generally use fixed-rate RLL codes, while USB uses bit stuffing, which is efficient, but results in a variable data rate: it takes slightly longer to send a long string of 1 bits over USB than it does to send a long string of 0 bits. (USB inserts an additional 0 bit after 6 consecutive 1 bits.)

http://en.wikipedia.org/wiki/Bit_stuffing

A similar scheme is used in the Universal Serial Bus, but for a different reason: to ensure sufficient clock edges. Low- and full-speed USB data is sent NRZI encoded: a 0 bit causes a signal transition, while a 1 bit causes no change. The receiver must count the time between transitions to determine the number of 1 bits, and if that time is too long, the receiver can lose count. USB stuffs a 0 bit (causing a transition) after every 6 consecutive 1 bits; this guarantees at least one transition every 7 bit times. (A (0,6) RLL code.)

The main disadvantage of this form of bit-stuffing is that the code rate is unpredictable; it depends on the data being transmitted.

But that merely says that a 0 is added every few 1's, so as long as you send values up to 127 everything is fine and dandy.

170 and 85 will still be very nice numbers to transmit :yes: .

Guess why typing ASCII is usually faster than typing UNICODE? :w00t:

jaclaz

Edited by jaclaz
0

Share this post


Link to post
Share on other sites
Guess why typing ASCII is usually faster than typing UNICODE?

That ones simple:

ASCII = 5 characters

UNICODE = 7 characters

With that simple math ASCII is and will always be faster and (much easier on the fingers in the long run) than UNICODE...

Also what happens when and if binary gets pased 0-1, 2-3 and gets up to the rough and jagged numbers of 4 and 7???

Edited by Kelsenellenelvian
0

Share this post


Link to post
Share on other sites

ASCII = 01000001 01010011 01000011 01001001 01001001

UNICODE = 01010101 01001110 01001001 01000011 01001111 01000100 01000101

As you can see the 2 extra characters in binary cause ALOT more typing and effort.

Edited by Kelsenellenelvian
0

Share this post


Link to post
Share on other sites

Also what happens when and if binary gets pased 0-1, 2-3 and gets up to the rough and jagged numbers of 4 and 7???

Again it depends which effect you want to reduce, or the feature you want to add...

0 and 8's are very good as they are rounded, but, given that the pipes walls are made in a hard enough material, both the 4 and 7, since they have sharp, scraping edges may contribute to clean the pipes from any escaped electron that may pile up and clog the pipes, like:

|.8.|
|. .|
|. .|

The alternative, as you might know, is to send a few asterisks down the pipe, like:

|*  |
|* |
| * |
| * |
| *|
| *|

Or, as some do, a set of slashes/backslashes:


| \ |
| \ |
| \|
| \|
|/ |
|/ |

Personally I prefer the asterisks because you can give 'em a little spin, so that they rotate, and each one of the six edges works * only a little time and thus last longer.

jaclaz

0

Share this post


Link to post
Share on other sites

Yeah but that is assuming you have a straight length of cable...

ANY slight bend and your going to get a clog.

(My cables have ALL sorts of bends, twists and loops in them.)

Edited by Kelsenellenelvian
0

Share this post


Link to post
Share on other sites

Yeah but that is assuming you have a straight length of cable...

ANY slight bend and your going to get a clog.

Sure :), on cables, back to where it all began:

http://www.911cd.net/forums//index.php?showtopic=21827&st=23

It is not very common, but it can happen, it obviously depends on the material the pipes are made of/layered with.

Ever wondered how there were once gold (SCSI) cables and even today there is people willing to spend some US$21,.000 :w00t:

http://www.noiseaddicts.com/2008/11/most-expensive-speaker-cable-world-audioquest-audiophile/

http://www.verber.com/mark/ce/cables.html

http://consumerist.com/2008/03/do-coat-hangers-sound-as-good-monster-cables.html

It's easy, they are made with better materials and have much smoother walls, after a few hours of use coathangers get all clogged by electrons. :ph34r:

Ha!, noone ever runs an endurance comparison with coathangers! :whistle:

But with Foxbat, we were talking of USB transfers and of the tinier sticks, and of USB connectors, they are straight enough normally.

jaclaz

Edited by jaclaz
0

Share this post


Link to post
Share on other sites

ALTHOUGH! I am now building a app to send a metric sh!tload of spining asterisks down my pipes once every morning so I can have that fresh' clean feeling everyday.

0

Share this post


Link to post
Share on other sites

ALTHOUGH! I am now building a app to send a metric sh!tload of spining asterisks down my pipes once every morning so I can have that fresh' clean feeling everyday.

You should NOT run that app every morning! :no:

It's just like DEFRAG, you only need to do it when it is needed and it depends on the use you do of the disk.

Currently used 1's already provide for normal cleaning, so unless you send too much 0's you shouldn't have so frequent the need.

There are some reports that streaming p0rn can clog cables faster, though. :rolleyes:

jaclaz

0

Share this post


Link to post
Share on other sites

Ah good point, BUT hey I do watch alot of porn so maybe I will set it to every wednesday morning at 3am, MS thinks thats good enough for my win7 defrag so I might as well have everything sorted out at the same time.

Edited by Kelsenellenelvian
0

Share this post


Link to post
Share on other sites

Ah good point, BUT hey I do watch alot of porn so maybe I will set it to every wednesday morning at 3am, MS thinks thats good enough for my win7 so I might as well have everything sorted out at the same time.

You should be VERY aware of the risks involved in running that at 3 A.M. :ph34r:

You need to add to your scheduling set a provision to calculate if the moon is full and skip the cleaning on that night if it is.

The sound (well below what the human ear can perceive) made by the spinning asterisks on some cable types can be very similar to the mating cry of werewolves... :w00t:

Of course it is well possible that it doesn't happen on your cables, but I wouldn't take the chance, if I were you. :no:

http://www.imdb.com/title/tt0072431/quotes?qt=qt0484648

:)

jaclaz

0

Share this post


Link to post
Share on other sites
The sound (well below what the human ear can perceive) made by the spinning asterisks on some cable types can be very similar to the mating cry of werewolves...

The possibility of this make me think of sparkly vampires. I understand that they seem to go hand-in-hand with werewolves nowadays. While I am curious I REALLY don't want all of the trouble this may bring.

However the pale-skinned, dark haired beauties they attract might be nice :D

http://verydemotivational.files.wordpress.com/2010/05/129194375038528447.jpg

Edited by Kelsenellenelvian
0

Share this post


Link to post
Share on other sites

Guys, going over and over with that kind of jokes is not too helpfull IMO, however I was wondering if rloew was also joking saying that transmitting zeros was slower than transmitting ones so I looked up a bit and from what I understand (perhaps erroneously) by briefly reading about NRZI encoding used for USB data transmission it would be that the more there are bit changes the slower the transmission.

I wasn't joking!

But I wasn't talking about "transmitting" zeroes, I was talking about "writing" zeroes.

Nobody has gotten even close yet.

0

Share this post


Link to post
Share on other sites
In such a scenario, physics tells us how if you give a stronger push, the pushed object will acquire greater speed
Why stop here? USB pin 1 provides 5V max. If the USB specifications were modified to be driven at 12V (volt is a unit of pressure), we can utilize the VBUS to additionally accelerate the data rate by 2.4 times faster over the existing rate.
BUT what the good guys did was simply to use smaller characters
With bit compression, we can further reduced reduce the size to its most basic form. 0, 1.
And sent them vertically, here you can see how the fatter 0's may slow down transfer, since they go more tight in the pipe
Any advantage of transmitting them lengthwise is negated by their adjacency to each other which allows them to take advantage of aerodynamic drafting (a la stock car racing). Transmitting them as originally diagrammed always result in shorter data length, and therefore faster rate.

Tightness of the pipe can be resolved with a wider gauge cable. USB data conductor wires use a twisted pair (figure 1). The problem with this configuration is twofold. Transmitting data through a swirly twist as opposed to a straight line is inherently slower. The gauge is also narrow. Data can only flow in single file (figure 2). Rather than have each pin in its own wire, all pins can be propelled en mass over a multi/fat pipeline, and applying multi-quad shielding to compensate for not using twisted pair, which also helps stiffen the cable, thus avoiding sharp bends or kinks (figure 3).

USB Type A Connector
__________
| ______ |
| [______] | 1 5V --> ------------------------------------------------------------------------
| _____ | _ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ _
| [_____] | 2 Data- --> \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/
| [_____] | 3 Data+ --> _/\__/\__/\__/\__/\__/\__/\__/\__/\__/\__/\__/\__/\__/\__/\__/\__/\__/\_
| ______ | Twisted Pair
| [______] | 4 GND --> ------------------------------------------------------------------------
|__________|

Figure 1: USB data lines in a twisted pair

==================================================================================================

USB Type A Connector
__________
| ______ |
| [______] | 1 5V ------------------------------------------------------------------------
| _____ |
| [_____] | 2 Data- 01 11 00 10 00 01 00 11 00 01 10 00 00 11 00 01 00 00
| [_____] | 3 Data+ --> 01 00 01 11 01 00 01 10 01 01 00 00 01 11 01 10 01 11
| ______ | Twisted Pair
| [______] | 4 GND ------------------------------------------------------------------------
|__________|
Transmission Order: ...............................................................987654321
(using dots to represent two digit numbers due to lack of space)
Figure 2: Data transmitted slowly over 72 individual bits through a twisted pair

==================================================================================================

USB Type A Connector Extra Shielding
=======================================
__________ =======================================
| ______ | ------------> 0 0 0 0 0 0 0 0 0
| [______] | 1 12V ------------> 1 1 1 0 1 1 1 1 1
| _____ | ------------> 0 0 0 1 0 0 0 0 0
| [_____] | 2 Data- ------------> 0 0 0 0 0 0 0 0 1
| [_____] | 3 Data+ ------------> 1 1 1 0 0 1 0 1 0
| ______ | ------------> 1 0 1 0 1 0 0 1 0
| [______] | 4 GND ------------> 0 0 1 0 0 1 0 1 1
|__________| ------------> 0 1 1 0 1 1 1 0 0
=======================================
=======================================
Extra Shielding
Transmission Order: 9 8 7 6 5 4 3 2 1

Figure 3: Data transmitted quickly in 9 bytes yielding the output of:
01010011 01001110 01000001 01001011 01000101 00100000 01001111 01001001 01001100

0

Share this post


Link to post
Share on other sites

Ah, you're talking about UPB (Universal Parallel Bus)? :ph34r:

GL

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.