Posts

Showing posts from August, 2022

Bitbanging Ethernet on an Arduino

Image
In this article, I will present a program that allows AVR-based Arduino to send and receive Ethernet packets at 10Mbit/s without the need for an external chip. This program only works on some Arduinos, as the Arduino must run at 20MHz (which may require hardware modifications), and it is still necessary to use external resistors and capacitors to adjust the voltage levels. The program also requires that the AVR chip have features that are only available on some chips (such as the atmega2560 on an Arduino Mega). This program also implements a simple ping server that works about 40% of the time. One can also transmit and receive simple UDP packets, so a possible use case would be making a sensor that transmits a value at regular intervals. Since the Arduino is only barely fast enough, transmitting a packet requires large sections of the packet to be hard-coded. The two PWM outputs of one of the timers are used to generate the differential signal and to perform the Manchester encoding