←back to thread

410 points sbt567 | 1 comments | | HN request time: 0.324s | source
Show context
rkagerer ◴[] No.44384301[source]
This is awesome!

But it also makes me a little bit sad. The original parallel port and even ISA interface seemed so simple by comparison, with less layers of abstraction. Just run a wire, and write to a port.

I remember when I was a kid, I found a breakout board in an electronics store's random clearance parts bin, with an ISA header on an edge. On a whim I took it home and wire-wrapped a 7-segment LED onto it. Power and ground were easy. Each segment was hooked to a data line, through a simple buffer IC. I cheated and used only a minimal number of address lines to feed the enable port (guessing through a simple AND gate or something). I was amazed when I wrote to that address and it worked the first time!

I look at a protocol like USB, with hundreds of pages, and instead of that curious excitement and enablement I felt back then, I feel a bit overwhelmed.

replies(5): >>44384342 #>>44385045 #>>44386730 #>>44388110 #>>44390357 #
1. vbezhenar ◴[] No.44388110[source]
USB is designed to solve a complex, but necessary problem.

1. Hot-plug.

2. High speeds with long cables of dubious quality.

3. Multiplexing multiple devices on a single wire with hubs.

4. Reliable transmission on lower layer, so higher level protocols don't need to worry about it.

5. Multiple speeds with negotiation.

6. Newer USB standards support multiple power voltages with negotiation.

All that said, old USB protocols like USB 1.1 is not that hard. You don't need those hundreds of pages, only a subset of them. There are some tutorials in the Internets which will help you to understand everything, from wire signalling to application interface. Don't use USB reference as a learning source. These days ChatGPT probably will guide you over every layer. Just stick with old standards, they are simpler and plenty of devices use them.

With enough persistence and some fast enough MCU you should be able to bit-bang USB 1.1 LS (1.5 Mbps) and write some simple USB device. That will require to implement all layers of USB and I'm pretty sure it's not impossible task.