3 ms·
The 40 pins on the Pi are intended for GPIO and low-speed connectivity (SPI, I2C and friends). Unless I'm missing something, it is simply not feasible to use th
by themulticaster 5y ago
The 40 pins on the Pi are intended for GPIO and low-speed connectivity (SPI, I2C and friends). Unless I'm missing something, it is simply not feasible to use those GPIO ports for any high-speed interfaces for three reasons:
1. The pins are likely connected to a memory-mapped GPIO controller in the Broadcom SoC (you write a value to a special memory location, and the GPIO controller will physically change the voltage on the associated pin). While you can implement certain slow interfaces - UART is the typical example - purely in software using bit-banging, this approach only works as long as your desired interface speed is a lot slower than the CPU clock. For example: To implement a UART controller at 9600 Bd running on a 1 GHz CPU, you have over 100000 cycles for each symbol you send or receive. For 1000BASE-T, you are looking at a symbol rate of 125000000 Bd, so you'd have just 8 cycles for each symbol (and this is completely ignoring the line code used for 1000BASE-T, which the GPIO controller very likely doesn't support on a physical level).
2. If you want to run an interface faster than a few MHz, you have to be more careful on the electrical level to avoid reflections/impedance mismatch and other signal integrity issues. Essentially, you can't just hook up 2.54mm pin headers at gigabit speeds and expect everything to work fine.
3. Related to the two previous points: Almost all high-speed interfaces (including GbE, USB, HDMI etc.) use line codes at the physical level and/or use differential voltage signaling (LVDS/TMDS etc.) for transmission. The Pi's GPIO controller is very likely unable to send/receive data using differential standards. By the way, if you're interested in this topic: Most FPGAs (even entry-level FPGAs) support differential voltage standards in their IO blocks and even include special encoder/decoder blocks (for 8b/10b encoding).
- mlyle 5y ago:D It's not my first rodeo doing high speed design. > 2. If you want to run an interface faster than a few MHz, you have to be more careful on the electrical level to avoid reflections/impedance mismatch and other signal integrity issues. Essentially, you can't just hook up 2.54mm pin headers at gigabit speeds and expect everything to work fine. Conversely, we got a gigabit out of a few wires, non-differential, on pin headers UltraDMA/ATAPI over distances of tens of inches, albeit with the insulation displacement connector able to put a ground between each wire on the ribbon to lower impedance a bit. It would be nice to have some more capable interfaces multiplexed onto the pins. That's all I'm saying. For that matter, an RJ45 doesn't have wonderful electrical characteristics, but it's a small impedance discontinuity at the ends of the circuit. Industrial uses put gigabit ethernet through all kinds of connectors. Gigabit Ethernet works in practice through a few inches of untwist and would work just fine through a pin header. Already not everything on the header is hooked up to a single GPIO controller-- some goes directly to the broadcom and some to an external GPIO controller on earlier PIs, I believe.