Changes

Jump to: navigation, search

FPGAmstrad

No change in size, 12:04, 28 February 2012
/* Sniffing USB frames */
==== Sniffing USB frames ====
USB use two wires in order to transmit frames, green and white, each with two logical values : 0v and 5v.
Let's plug a joystick on PC, if you listen at this its two wires, you can snif a USB transmission. Saving it for example on RAM.
Theses two wires can be traduce into one with four states : 00 01 10 11.
One of this state is sleep state, in fact it depends on USB mode you use.
===== pull up and pull down =====
If you respect USB protocol, you have to plug some pull-up and pull-down resistors and some capacitor. But as I am a bad electrician, I just simulate then in VHDL, they are important because they cause USB speed negotiations. You also have an electronic mechanism in order to detect presence of joystick plug, I don't care about it.
 
==== Synchronize, decode and check USB frames ====
One time sample is done, it is not readable. In fact USB frames are synchronized (they started with a certain synchronization pattern), encoded (NRZI), and checked (CRC). CRC type depends on frame length. Encoding is done for synchronization optimization.
1,200
edits