from Hacker News

10BASE-T using Raspberry Pi Pico with 2 GPIO pins

by sleepy_keita on 8/22/22, 8:47 AM with 88 comments

  • by squarefoot on 8/22/22, 1:20 PM

    A word of caution: this has been done with other uControllers in the past; nothing wrong with it from a functional point of view, but be aware that the lack of transformers means the boards i/o pins aren't insulated from whatever it's connected to them; any wrong connection by mistake or static charges in case of a long cable could damage the chip forever. The best and safest use i can imagine of a transformerless arrangement would be a cluster of Pi Picos all mounted on a backplane containing a Ethernet switch chip; in that situation they would share the same power supply and ground so a simple level translation where necessary would be enough, and probably a total of two wires could be used for transmission and receive since balanced signals wouldn't be needed anymore.
  • by CTDOCodebases on 8/22/22, 10:13 AM

    I read the this as 10GBASE-T and for a brief moment in time my whole world turned upside down.
  • by jandrese on 8/22/22, 11:36 AM

    Oh wow, this is was earlier in development than I was expecting. Literally just banging out the bits on the wire for a UDP packet without any underlying protocol support. No CSMA/CA. No ARP. No autonegotiation. Can't even receive. Just enough support to calculate the checksums and do the Manchester encoding before clocking the bits out on the wire.
  • by nigrioid on 8/22/22, 9:30 AM

    cnlohr did something similar with an ATTiny85:

    https://www.youtube.com/watch?v=mwcvElQS-hM https://www.youtube.com/watch?v=m4f4OzEyueg&t=0s

    Pretty amazing!

  • by avodonosov on 8/22/22, 9:03 AM

    A similar thing for the Forth chips produced by Chuck More and colleagues: https://www.greenarraychips.com/home/documents/greg/AN007-14...
  • by jhallenworld on 8/22/22, 12:58 PM

    Should be able to run CANbus also, here we go, someone did it:

    https://github.com/kentindell/canhack

  • by bcrl on 8/22/22, 1:45 PM

    This is also possible using GPIOs on an FPGA as well. Have a look over at FPGA4Fun: https://www.fpga4fun.com/10BASE-T.html 10base-T is such a simple protocol, and implementing it is a good way to learn many of the physicaly layer fundamentals of Ethernet.
  • by jhallenworld on 8/22/22, 4:56 PM

    The funniest Ethernet system I've seen is that used in dataprobe's "iBoot" remote power switch. These used 8051 microcontroller (the classic 40-pin DIP) connected to an ISA-bus FIFO-based 10/100 Ethernet chip using GPIOs. The FIFO saves you since the 8051 doesn't have to keep up with the line rate (one whole packet has to fit in the FIFO).

    But I know these devices fail when the network is chatty- like if you have spanning-tree enabled.

    The iBoot has a simple web interface. Somebody wrote an entire network stack for 8051..

  • by synergy20 on 8/22/22, 1:18 PM

    RP2040 is an amazing MCU, I'm unaware of any other similar MCU has a programmable PIO module.

    Based on the Ethernet and previous HDMI work done to this chip, I'm to write my own I3C master/slave on it soon, should be doable.

  • by LAC-Tech on 8/22/22, 9:35 AM

    Can someone explain to me what I'm looking at it?
  • by giomasce on 8/22/22, 9:16 AM

    Is "register" instead of "resistor" just a typo, or is that word really used in this context?
  • by sylwester on 8/22/22, 2:40 PM

    The other repository seems more interesting (can someone translate?) https://github.com/kingyoPiyo/RasPico_SHIBAKI_Board

    This seems to be SFP with Raspberry Pico.

  • by hnewsum on 8/22/22, 10:10 AM

    Pretty neat. I wonder how much noise those lines can handle.
  • by ISL on 8/22/22, 8:22 PM

    The transformer-coupling of Ethernet isn't a trivial fact.

    When building precision instrumentation, I was extremely happy to learn about this from one of our old-timers who had been working on systems since the days of the VAX.

    You need not worry about DC ground-loops with Ethernet.

    When I saw the post-title, I thought, "oh, no, what about the transformer-coupling?". Was very happy to see a simple technique outlined in the article.

  • by francisduvivier on 8/22/22, 9:04 AM

    Sooo, with this you can send ethernet packets from a RPI pico? I wonder at which speeds with this setup only using 2 GPIO's.
  • by protecto on 8/22/22, 9:22 AM

    LWIP [1] could be used for this. You'd just need to implement I/O.

    [1]: https://www.nongnu.org/lwip/

  • by EddySchauHai on 8/22/22, 2:11 PM

    Was hoping that said 10GB - need a couple 10GB devices for load testing a network lab if anyone has any cheap suggestions :)