4 ms·
Since the title is rather vague, this is the start of a series about building a TCP/IP and Ethernet framing stack from scratch for a microcontroller. The author
by camtarn 2y ago
Since the title is rather vague, this is the start of a series about building a TCP/IP and Ethernet framing stack from scratch for a microcontroller. The author uses a chip (W5100) which can handle TCP/IP itself, but also supports handing it pre-built Ethernet frames, although the chip handles the preamble and CRC calculation. Most of the article is about trying to communicate with the chip itself, and sending a test packet (which I'm guessing is hardcoded, although it's not called out in the article).
(I was hoping it would be about bit-banging Ethernet on some improbable bit of hardware.)
- crest 2y agoThe RP2040 can be convinced to bit-bang Ethernet (yes even 100Mb/s) with only a transceiver. Part of the trick is to modify the common PHY + MagJack breakout boards to let the RP2040 generate the clock signal so that the signals are in sync and you don't have to oversample the RMII. Just 10Mb/s can be done even dirtier. I'm still waiting for someone to combine an RP2040 with DVI/HDMI video output and Ethernet into a "modern" glass terminal (just telnet, SSH is probably asking too much).
- telgareith 2y agoSsh is not asking too much! In the world of irony- HDMI/DP will be far harder than ssh.
- robinsonb5 2y agoBut of course it has been done: https://github.com/Wren6991/picodvi https://github.com/Wren6991/picodvi (OK, it's DVI rather than HDMI - at low resolutions HDMI isn't more difficult, just more legally contentious.)
- camtarn 2y agoThat's incredible - I missed this when it was first released!
- drougge 2y agoVGA is much easier to produce, and the RP2040 can do 1280x1024@60 no problem. The official examples use several clock cycles per pixel (2 IIRC, but it might be even more), but you don't have to. I made half a terminal with that output, aiming for something that ran the original VT100 ROM. I never finished the emulator part, but I did write video output (including scan line emulation) for VT100 memory -> VGA. Adding SSH once the rest works should be perfectly possible. (Not bit banging ethernet at the same time, but using some external chip.) I should probably put that online somewhere. Or finish it and then put it online.
- Evidlo 2y agoSomeone did that with an ATTiny85 years ago: https://hackaday.com/2014/08/29/bit-banging-ethernet-on-an-attiny85/ https://hackaday.com/2014/08/29/bit-banging-ethernet-on-an-a...