树莓派 Pico 通过位操作实现 100 Mbit/S 以太网
Raspberry Pi Pico Bit-Bangs 100 Mbit/S Ethernet

原始链接: https://www.elektormagazine.com/news/rp2350-bit-bangs-100-mbit-ethernet

开发者史蒂夫·马克格拉夫(Steve Markgraf)在“Pico-100BASE-TX”项目中取得了重大进展,成功地在树莓派Pico上仅使用软件和RP2040/RP2350的可编程I/O (PIO)实现了100 Mbit/s快速以太网。该项目建立在先前成功的基础上,例如10 Mbit/s以太网和位敲击USB,利用PIO和DMA以125 MHz的速率进行复杂的编码和扰频。 这个仅发送的概念验证项目通过UDP实现了大约11 MB/s的速度,并通过实时音频和ADC数据流进行了演示。虽然需要隔离(脉冲变压器或开关)且不支持PoE,但该项目展示了将RP2040推向其预期能力之外的潜力。 这为低成本、高速数据采集和流式传输应用打开了大门,例如紧凑的测试仪器和远程传感器,所有这些都不需要专用的以太网PHY芯片。它引发了一个问题:在廉价的微控制器上,软件定义硬件可以被推到什么程度。

## 树莓派 Pico 通过位操作实现 100 Mbit/s 以太网 一个最近的项目展示了树莓派 Pico 的能力,它使用独特的可编程 I/O (PIO) 状态机实现了 100 Mbit/s 的以太网速度——本质上是“位操作”该协议。这突显了计算机历史中的一种反复出现的模式:从基于 CPU 的实现转向专用硬件,随着技术进步又回到 CPU。 这一讨论引发了对硬件优化周期性本质以及 Pico 创新的 PIO 的评论,PIO 允许在无需 FPGA 的情况下实现类似自定义硬件的行为。虽然这不是传统的以太网实现,但这项成就展示了 Pico 的强大功能,并为创建自定义 USB 以太网设备等可能性打开了大门。 用户们争论了鉴于 PIO 的专业性质,这是否符合真正的“位操作”定义,并将其与其他微控制器和 FPGA 设计中的类似方法进行了比较。该项目还引发了关于 Pico 强大 SDK 和示例代码的可用性的讨论,一些用户赞扬了它的文档,而另一些用户则希望有更多完整、可用于生产的周边设备实现。最终,这项成就强调了现代廉价微控制器中包含的令人印象深刻的功能。
相关文章

原文

Three years after the popular Pico-10BASE-T experiment and following bit-banged USB in 2023, developer Steve Markgraf now bit-bangs 100 Mbit/s Fast Ethernet on the Raspberry Pi Pico using only software and PIO. Let's take a look!

Three years ago, @kingyoPiyo’s Pico-10BASE-T project drew wide attention right here on Elektor for implementing 10 Mbit/s Ethernet on the Raspberry Pi Pico using just a few resistors. In 2023, another milestone followed with bit-banged USB, showing how far the RP2040’s (and now RP2350) programmable I/O could be pushed.

What Can an RP2350 Bit-Bang Next?

Now, developer Steve Markgraf (GitHub @steve-m) has extended the concept with Pico-100BASE-TX — a 100 Mbit/s Fast Ethernet transmitter running entirely in software.

Markgraf’s implementation uses the PIO and DMA to perform MLT-3 encoding, 4B5B line coding, and scrambling at a 125 MHz symbol rate. The result is a functioning 100 Mbit/s link capable of streaming about 11 Mbyte/s over UDP, demonstrated by real-time audio and ADC data streams.
 

As before, this is a transmit-only proof of concept and must not be connected to PoE-enabled hardware. A pulse transformer or intermediary Ethernet switch is recommended for isolation.

Check Out the Rest of His Repo

Example applications in the repository include a counter, internal-ADC streamer, and an audio demo using a PCM1802 converter at 75 kHz. The library supports both the RP2040 and the newer RP2350 (Pico 2) and builds with the standard Pico SDK.

Source: Pico-100BASE-TX on GitHub — check it in action in the video there.
 

Beyond the technical achievement, projects like this hint at new possibilities for low-cost, high-speed data acquisition and streaming using microcontrollers that were never designed for it. A Pico capable of pushing 11 MB/s over Ethernet could form the basis of compact, inexpensive test instruments, remote sensors, or experimental network interfaces — all without a dedicated PHY chip. As these bit-banged interfaces become faster and more capable, the question naturally follows: how far can software-defined hardware really go on a two-dollar microcontroller?

Subscribe

Tag alert: Subscribe to the tag Raspberry Pi and you will receive an e-mail as soon as a new item about it is published on our website!

 

联系我们 contact @ memedata.com