AVR Net IO - rmu75/linuxcnc-wiki GitHub Wiki
jjf 2011-02-20
A cheap AVR Board with ATmega32 and ENC28J60
The ENC28J60 is a Ethernet MAC+PHY, connected serial (spi) to the AVR
4 A/D channels
4 TTL-inputs
8 TTL-outputs
jjf@nb8:~$ ping -c 20 192.168.1.92
PING 192.168.1.92 (192.168.1.92) 56(84) bytes of data.
64 bytes from 192.168.1.92: icmp_req=1 ttl=64 time=1.07 ms
...
64 bytes from 192.168.1.92: icmp_req=19 ttl=64 time=1.11 ms
64 bytes from 192.168.1.92: icmp_req=20 ttl=64 time=1.09 ms
--- 192.168.1.92 ping statistics ---
20 packets transmitted, 20 received, 0% packet loss, time 19024ms
rtt min/avg/max/mdev = 1.075/1.087/1.114/0.041 ms
The picture shows the timing
yellow: eth-rx, green eth-tx
blue: spi-clk, magenta:spi-cs
upload:netio1.png
End-tx to start-rx: 770µs
Spi-cs high: 44µs (calculation of ping response)
Spi-clk: 4MHz
Conclusion:
Spi connected eth maybe to slow for realtime ethernet.
With the original firmware telnet <ip> 50290 works (see link 3)
Commands: getip, getmask getgw, getport 1, etc.
[1] <http://www.pollin.de/shop/downloads/D810058B.PDF> (schematics on page 7) <br>
[2] <http://www.pollin.de/shop/dt/MTQ5OTgxOTk-/Bausaetze_Module/Bausaetze/Bausatz_AVR_NET_IO.html> <br>
[3] <http://www.gtkdb.de/index_18_1032.html> <br>