Bitbang Ethernet

Implementation UDP into microcontroller Igor Atmel-UDP device:
UDP/IP infrared remote control
web page shows implementation UDP/IP on firmware level (similar as emulation of RS232 interface or USB interface).

UDP_IP_computer_infrared_remote_control

What makes it really cool is that the ethernet is bitbanged using nothing but the bare pins of an ATMEGA168. The downside is that this Ethernet implementation is 10 Mbit/s transmit-only: it cannot receive network packets. In think this is a cool hack, that could be enough for some projects.

By the way ATMEGA168 is same chip as used on Arduino Diecimila. Maybe this idea could be adapted to Arduino boards as well if the board is modufied for this (Arduino runs on 16 MHz, this circuits needs 20 MHz clock).

If you want a real full standard Ethernet interface that can transmit and receive, you need to use a real Ethernet controller for it (Ethernet chip or interface built into the microcontroller).

5 Comments

  1. Johnb808 says:

    Great, thanks for sharing this blog.Really thank you!

    Reply
  2. Tomi Engdahl says:

    Bit-banging Ethernet On An ATTiny85
    http://hackaday.com/2014/08/29/bit-banging-ethernet-on-an-attiny85/

    [Cnlohr] just published an ingenious but dangerous way to send Ethernet packets using an ATTiny85. The ATtiny directly drives one pair of differential TX wires of a standard Ethernet cable. Doing so will force the TX signal ground to be the same as the ATTiny’s and in some cases may put 48V on your AVR if your cable is plugged into a Power Over Ethernet switch… which may be a problem.

    the microcontroller is clocked at 20Mhz to bit-bang the Manchester encoded electrical signals. Using a neat trick his home switch will detect his platform as a 10MBit Ethernet switch which can then send hard-coded packets to his computer.

    Reply
  3. Tomi Engdahl says:

    A simplex 10Base-T send-only ethernet stack for AVRs
    https://github.com/cnlohr/ethertiny

    This is a really dangerous project. Use at your own risk.

    By directly ethernet without magnetics to an AVR, you may cause serious damage, fire, or anything else crazy if there is a DC offset. It does not follow 802.3 standards for 10Base-T Ethernet.

    You are still responsible for sending the NLP pulses every 16 +/- 8ms.

    Right now, port PB3,PB4 are the TX+/TX- pins. A switch can be connected between PB0 and PB1 and another switch may be connected btween PB2 and PB1.

    Reply
  4. Tomi Engdahl says:

    Implementation UDP into microcontroller Igor Atmel-UDP device:
    UDP/IP infrared remote control
    http://www.cesko.host.sk/IgorPlugUDP/IgorPlug-UDP%20%28AVR%29_eng.htm

    Purpose of this article is to inform readers about implementations UDP protocol (only transmitting) into singlechip microcontroller, which this interface directly not supports. Simply: implementation UDP/IP on firmware level (similar as emulation of RS232 interface in microcontrollers, which not have RS232 support).

    Reply
  5. Tomi Engdahl says:

    Interesting points from http://www.cesko.host.sk/IgorPlugUDP/IgorPlug-UDP%20%28AVR%29_eng.htm

    Device supports only transmitting, because receiving is not possible at this microcontroller speed. Therefore we must use device on full duplex networks only! Otherwise is probability that on network occurs collisions during device transmitting and because device not checks collisions (not receiving), then the transmitted code is not delivered to destination.

    Buffer is transmitted by UDP/IP protocol as broadcast to specified network. Default destination firmware values are:

    destination IP=192.168.1.255 (broadcast to 192.168.1.xxx adresses)
    destination port=6668, source port=6668
    destination MAC=FF-FF-FF-FF-FF-FF (broadcast)

    but can be easily changed

    I develop for programmers DLL library “IgorUDP.dll”, which offers access to the device from your programs in the simple way. It contains only 3 functions: InitUDP, CloseUDP and DoGetInfraCode.

    Reply

Leave a Comment

Your email address will not be published. Required fields are marked *

*

*