[time-nuts] time transfer over USB
attila at kinali.ch
Mon May 20 05:43:49 EDT 2013
On Tue, 14 May 2013 07:22:26 +0200
Herbert Poetzl <herbert at 13thfloor.at> wrote:
> > If the best-case response time is calibrated out, how good
> > can this get? Microseconds?
> With 125us latency and a fixed interval, it should be
> possible to calculate the relation between the transfer
> intervall (USB clock crystal) and the PPS (or whatever
> information is transmitted) and thus easily get below
> the 100us.
You can actually get better than that. If you are using a uC at
the sending end, you get a transfer completed interrupt. You can
time this interrupt and send a second packet to the PC to tell
it how long it took for the PC to receive the first packet.
Thus getting rid of quite a bit of the uncertainty between the
device and the usb controller.
Also use a uC with HS USB, as this allows to use micro frames which
are 125us long insted of the normal 1ms long frames.
Also, use interrupt transferes instead of bulk, as these are prefered
over bulk transfere in case of congestion, and have two times as many
slots per frame.
Oh.. and connect the whole thing to a port on the PC that does _not_
have an internal USB hub.
The people on 4chan are like brilliant psychologists
who also happen to be insane and gross.
More information about the time-nuts