USB in a Nutshell (2010)
beyondlogic.org
beyondlogic.org
For an actual implementation, see V-USB [2] - surprisingly readable software library for bit-banging USB on AVR (Arduino/ATTiny/ATMega)
What a treat. I hope that the page is eventually updated to feature major updates up until USB4.
Thank you for posting this link.
For example, there's almost no information anywhere online on how the polling is supposed to work for noticing interrupt requests from the device. Is this typically handled at the OS level and the application writer does not mess with it? I still don't know.
The reason I ask is because while trying to implement USB on my PIC32, I observed USB traffic via wireshark of another third party custom HID device that I was trying to mimic. This device, once you pressed a button on it, wireshark would show INTERRUPT IN requests coming from the device, without any programs open. However with my own USB device implementation, I couldn't get this to happen, no matter how hard I tried. I just happen to try opening the USB device from an application and trying to read from it, at which point my interrupt IN transfers magically showed up in wireshark and starting working. I still don't understand why that's necessary when my third-party device can do it all by itself.
Now hotplugging pci wasn’t the best idea, but it’s on the inside of the machine, so you naturally power it off.
If I booted without one, then plugged one in, it wouldn't work, but that is a separate issue.
PS/2 is not a hot-swappable port, by design. Your hot-swap adventures mean you started out using more modern motherboards (2010-ish) which simply have an internal USB-PS/2 adapter for presenting PS/2 ports.
If it was running off USB, then plugging in a mouse after boot would have worked. But it didn't. Only re-plugging worked.
I specifically remember having a problem on our Windows 2000 Server box that would require a reboot any time the keyboard was un/replugged.
Many years ago family member asked me how to transfer photos from their Symbian phone onto PC. Over the years they have been conditioned to absolutely never plug or unplug anything from the computer while it is turned on. It took quite some time to convince them that USB is designed for hotplugging. But the moment we connect it, computer totally freezes. With egg on my face I think, oh, probably just Windows XP crashed. Power-cycling doesn't help at all though, no POST, no beeps, absolutely nothing. Out of ideas I open the computer case, only to see there's a huge bulge on the chipset...
I have no idea what happened there. Perhaps unlucky short when inserting connector, causing latch-up in the chip? Phone was totally fine after this, I connected it to different PC without issues.
young un's today don't know they are born - and get off my lawn!
You plug it into a random computer and watch the cursor go crazy. Great for pranks at the office!
With USB, all you had to do was stick a small plastic widget in a USB socket and you were ready to go. How cool is that?
Flash memory hammered home we lived in the future. Some USB flash drives fitted right into a USB type A plug, and stored hundreds of megabytes.
Perhaps as a range (95% confidence interval perhaps) - estimate of total hours on task?
SHOW HN: USB driver I created over the weekend
Call it 15 hours to get a "ping" signal across, and another 15 to get data travelling at full speed with proper SOF handling.
Nowhere near as simple as something like I2C that you can get a complete understanding of in an afternoon.
USB isnt so universal anymore
The current esp32 mass storage driver supports only bulk only transfer scsi, but usb floppies (those with the uf001f chip) use CBI(control/bulk/interrupt) and also UFI has a bit different command set: https://www.usb.org/sites/default/files/usbmass-ufi10.pdf
By using this site, a cheap logic analyzer and usbpcap for windows, I am trying to go around reading all the usb docs :)