News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

USB Port

Started by Farabi, October 20, 2011, 04:06:15 AM

Previous topic - Next topic

Farabi

http://www.beyondlogic.org/usbnutshell/usb2.shtml

In here he was mentioned about


As we have discussed, USB uses a differential transmission pair for data. This is encoded using NRZI and is bit stuffed to ensure adequate transitions in the data stream. On low and full speed devices, a differential '1' is transmitted by pulling D+ over 2.8V with a 15K ohm resistor pulled to ground and D- under 0.3V with a 1.5K ohm resistor pulled to 3.6V. A differential '0' on the other hand is a D- greater than 2.8V and a D+ less than 0.3V with the same appropriate pull down/up resistors.

The receiver defines a differential '1' as D+ 200mV greater than D- and a differential '0' as D+ 200mV less than D-. The polarity of the signal is inverted depending on the speed of the bus. Therefore the terms 'J' and 'K' states are used in signifying the logic levels. In low speed a 'J' state is a differential 0. In high speed a 'J' state is a differential 1.


D+ 2.8V for 1
D- +2.8V for 0

Does it mean I should just send bit 1 to pin D+ for 1 and send bit 1 to D- as 0?
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

dedndave

i would think the differential driver/receiver is transparent to the programmer

if it isn't, a 1 would be:
D+ = 1
D- = 0

a 0 would be:
D+ = 0
D- = 1

dedndave

QuoteUnless you are designing the silicon for a USB device/transceiver or USB host/hub, there is not all that much
you need to know about the electrical specifications in chapter 7. We briefly address the essential points here.

tenkey

I've actually looked at USB signals and have been able to recognize the common bit patterns on a scope.
I wish I could tell you that a 1-bit was encoded as a differential "1" or "0", but it isn't.

And there is more to the signalling than just sending zeros and ones, which the "silicon" takes care of.
A programming language is low level when its programs require attention to the irrelevant.
Alan Perlis, Epigram #8