My static website generator using poole https://www.xythobuz.de
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

avrnetstack.html 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>avrNetStack - xythobuz.de</title>
  6. <meta name="description" content="Modular AVR TCP/IP Stack with Ethernet and WiFi support" />
  7. <meta name="keywords" content="xythobuz" />
  8. <link rel="author" href="/xythobuz@xythobuz.de">
  9. <link rel="shortcut icon" href="/img/favicon.ico">
  10. <script type="text/javascript" src="/js/sh_main.js"></script>
  11. <link type="text/css" rel="stylesheet" href="/css/sh_bright.min.css" />
  12. <link rel="stylesheet" href="/css/style.css" type="text/css" media="screen" />
  13. <link rel="alternate" type="application/rss+xml" title="Blog" href="/rss.xml">
  14. <link rel="stylesheet" href="/css/gh-fork-ribbon.css" />
  15. <link href='http://fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet' type='text/css'>
  16. <script type='text/javascript'>
  17. /* <![CDATA[ */
  18. (function() {
  19. var s = document.createElement('script');
  20. var t = document.getElementsByTagName('script')[0];
  21. s.type = 'text/javascript';
  22. s.async = true;
  23. s.src = '//api.flattr.com/js/0.6/load.js?mode=auto&uid=xythobuz&category=text';
  24. t.parentNode.insertBefore(s, t);
  25. })();
  26. /* ]]> */
  27. </script>
  28. </head>
  29. <body onload="sh_highlightDocument('/js/sh/', '.min.js');">
  30. <div class="github-fork-ribbon-wrapper right">
  31. <div class="github-fork-ribbon"><a href="
  32. https://github.com/xythobuz/avrNetStack
  33. ">Fork me on GitHub</a></div></div>
  34. <div id="header">
  35. <h1>xythobuz.de</h1>
  36. <h2>avrNetStack</h2>
  37. </div>
  38. <div id="lang"><span id="lang2">Translation:
  39. <a href='avrnetstack.html'>en</a>
  40. </span></div>
  41. <div class="colmask leftmenu"><div class="colleft">
  42. <div class="content">
  43. <div id="flattr">
  44. <a class="FlattrButton" href="http://www.xythobuz.de/avrnetstack.html" title="avrNetStack">Modular AVR TCP/IP Stack with Ethernet and WiFi support</a>
  45. </div>
  46. <div id="twitter">
  47. <a href="https://twitter.com/share" class="twitter-share-button" data-via="xythobuz" data-dnt="true" data-related="xythobuz" data-count="vertical">Tweet</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
  48. </div>
  49. <div id="reddit">
  50. <script type="text/javascript">reddit_url = "http://www.xythobuz.de/avrnetstack.html";</script>
  51. <script type="text/javascript" src="http://www.reddit.com/static/button/button2.js"></script>
  52. </div>
  53. <div id="github">
  54. <a href="https://github.com/xythobuz/avrNetStack" class="gitforked-button gitforked-forks gitforked-watchers">Fork</a>
  55. </div>
  56. <h1>avrNetStack</h1>
  57. <p><a href="https://github.com/xythobuz/avrNetStack">avrNetStack</a> aims to be a very modular Networking Stack running on AVR Microcontrollers and supporting different Network Hardware (ENC28J60, MRF24WB).
  58. Select your MCU and hardware driver in the makefile.
  59. Compile with "make lib" to create a static library.
  60. Compile with "make test" to create a test hex file to use with the hardware found in Hardware/avrNetStack.sch. You need Eagle 6, available for free from cadsoft.
  61. In the future, a PCB will be designed that can act as WLAN / LAN Module for your AVR Project, in addition to this software.</p>
  62. <p><a href="/img/net.jpg"><img alt="Foto 1" src="/img/net_small.jpg" /></a>
  63. <a href="/img/net2.jpg"><img alt="Foto 2" src="/img/net2_small.jpg" /></a>
  64. <a href="/img/teaser2.png"><img alt="Foto 2" src="/img/teaser2_small.png" /></a></p>
  65. <h2>License</h2>
  66. <p>All files in "lib/drivers/asynclabs" are released under the <a href="http://www.gnu.org/licenses/gpl-2.0.html">GPLv2</a>.</p>
  67. <pre>
  68. &copy; 2009 Async Labs Inc.
  69. &copy; 2012 Thomas Buck
  70. </pre>
  71. <p>Everything else, if not mentioned otherwise elsewhere, is released under a BSD 2-Clause License. See the accompanying COPYING file.</p>
  72. <h2>Software Overview</h2>
  73. <h3>ENC28J60 Driver</h3>
  74. <p>This is a self-written driver for <a href="http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en022889">Microchips ENC28J60</a>, based on it's <a href="http://ww1.microchip.com/downloads/en/DeviceDoc/39662d.pdf">datasheet</a> and the <a href="http://ww1.microchip.com/downloads/en/DeviceDoc/80349c.pdf">silicon errata</a>. It is operating (more or less) stable.
  75. The 8KB Buffer in the ENC28J60 is not really used, as all received Packets are placed in RAM before using their data. It will be used as FIFO for Packets that are received before the CPU is able to work on them.
  76. You can change the size and location of the Receive and Transmit Segments in the ENC28J60 SRAM.</p>
  77. <h3>MRF24WB0MA Driver</h3>
  78. <p>This is based on Stefan Heeschs modified version of Asynclabs G2100 Driver, released in <a href="http://www.mikrocontroller.net/topic/175463#1945568">this forum thread</a>, modified to work with this Networking Stack. This is a heavy work in progress.</p>
  79. <h3>Hardware Libraries</h3>
  80. <p>avrNetStack includes UART, SPI and Timer libs aswell as a basic task switcher and scheduler.
  81. The UART lib uses FIFO Buffers for receiving and transmitting interrupt driven. Change the Buffer size in 'include/serial.h', if you want. For debugging, you can run the serial library in a blocking mode.
  82. The Time lib supports 16MHz and 20MHz on a small selection of hardware devices. If you get compile errors after changing the target plattform in the makefile, you have to extend these libraries to support your target.
  83. If you want to use the UART with your own software don't include another UART library. Use the functions from serial.h!
  84. You need to call scheduler() and tasks() in you main-loop and also enable interrupts to use the Networking Stack. Both are completely dynamic, so you can use them for your application logic, too.
  85. The std module is a wrapper for the libc memory allocation functions. It is used to keep track of memory allocations for debugging purposes.</p>
  86. <h3>Debug Output</h3>
  87. <p>Every software modules debug output can be individually turned off or on. Just set the "#define DEBUG" at the start of the file to 1' or higher. To add debug output, use debugPrint() to print. If you need some more code to generate your output, put it in a "#if DEBUG == 1 ... #endif" block.
  88. debug.h also includes a custom assert implementation.</p>
  89. <h3>Controller Module</h3>
  90. <p>Controls the operation of the whole network stack. It contains only one function for the main program, networkInit. It is to be called once afer System Reset and performs initialization of all necessary hardware and buffers, etc. Also, some definitions can be uncommented in the controller.h file to deactivate parts of the stack. This could allow you to run a subset of the stack on a smaller AVR.</p>
  91. <h3>MAC Module</h3>
  92. <p>These are the Network Hardware drivers. Different MAC implementations will exist in the future, right now only the ENC28J60 is supported. This allows sending Ethernet Packets, as well as receiving them. Received Packets are given to the appropriate next layer by the controller.</p>
  93. <h3>ARP Module</h3>
  94. <p>Handles received ARP Packets, maintains an ARP Cache and gives functions of higher layers a method to obtain a MAC Address from an IP Address.
  95. If the Cache has no hit, an ARP Packet is issued, so that the higher layer can try again later.</p>
  96. <h3>IPv4 Module</h3>
  97. <p>Handles received IPv4 Packets. Received valid Datagrams are given to the appropriate next stack layer. Also, IPv4 Packets can be transmitted with this module.
  98. It buffers outgoing IPv4 Packets to get the target MAC from the ARP Module automatically.</p>
  99. <h3>ICMP Module</h3>
  100. <p>Handles received ICMP Packets. Can answer and send out echo requests.
  101. A single handler for echo replies can be registered. This is used to implement a simple Ping Utility in "test/main.c".</p>
  102. <h3>UDP Module</h3>
  103. <p>Handles the really simple User Datagram Protocol. A handler for every port can be registered and UDP packets can be transmitted.</p>
  104. <h3>NTP Module</h3>
  105. <p>Simple NTP (SNTP) Client. Will update systemTime automagically to the current unix timestamp some time after calling ntpIssueRequest().</p>
  106. <div id="disqus_thread"></div>
  107. <script type="text/javascript">
  108. var disqus_shortname = "xythobuz";
  109. (function() {
  110. var dsq = document.createElement("script"); dsq.type = "text/javascript"; dsq.async = true;
  111. dsq.src = "http://" + disqus_shortname + ".disqus.com/embed.js";
  112. (document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(dsq);
  113. })();
  114. </script>
  115. <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
  116. <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
  117. </div>
  118. <div class="nav">
  119. <h3>Thomas Buck</h3>
  120. <div id="logo"><img id="logoImg" src="http://www.gravatar.com/avatar/8d18fec40a74782052fb4c007d212475?s=180" alt="Avatar"></div>
  121. <p id="bio">
  122. I'm a 19 year old Information Engineering student from Germany, mostly building cool stuff with AVR microcontrollers. All of my projects are released as Free Software.
  123. </p>
  124. <ul id="menuList">
  125. <li><a href="/index.html">Home</a></li>
  126. <li><a href="/blog.html">Blog</a></li>
  127. <li><a href="/contact.html">Contact</a></li>
  128. <li>&nbsp;</li>
  129. <li><a href="/ledcube.html">8x8x8 LED Cube</a></li>
  130. <li><a href="/yasab.html">YASAB AVR Bootloader</a></li>
  131. <li><a href="/avrnetstack.html">avrNetStack</a></li>
  132. <li><a href="/avrserial.html">AVR Serial Library</a></li>
  133. <li><a href="/serialdebug.html">Serial Debug</a></li>
  134. <li><a href="/ledmatrix.html">LED Matrix</a></li>
  135. <li><a href="/ssop28.html">SSOP28 - DIL Adapter</a></li>
  136. <li><a href="/xyrobot.html">xyRobot</a></li>
  137. <li><a href="/bluetooth.html">Bluetooth UART (BTM-222)</a></li>
  138. <li><a href="/k6x4008.html">K6x4008 SRAM</a></li>
  139. <li><a href="/xyrobotremote.html">xyRobotRemote</a></li>
  140. <li><a href="/rremote.html">rRemote</a></li>
  141. <li>&nbsp;</li>
  142. <li><a href="/c250.html">Mio C250 Unlock</a></li>
  143. <li><a href="/nas.html">IB-NAS6210 Linux</a></li>
  144. <li><a href="/ultimatenotifier.html">Ultimate Notifier Script</a></li>
  145. <li><a href="/serialhelper.html">Serial Helper</a></li>
  146. </ul>
  147. <div id="recent">
  148. Recent blog posts:
  149. <ul id="recentList">
  150. <li class="recentList"><a href="/2013_04_04_html5.html">Kein DRM in HTML5</a></li><li class="recentDate">2013-04-04</li>
  151. <li class="recentList"><a href="/2013_04_02_zaphod.html">Neuer Webserver</a></li><li class="recentDate">2013-04-02</li>
  152. <li class="recentList"><a href="/2013_03_25_doxygen.html">xyControl Doxygen Dokumentation</a></li><li class="recentDate">2013-03-25</li>
  153. <li class="recentList"><a href="/2013_03_16_pid.html">xyCopter PID-Parameter</a></li><li class="recentDate">2013-03-16</li>
  154. <li class="recentList"><a href="/2013_03_13_test_rig.html">Quadrocopter Test Rig Video</a></li><li class="recentDate">2013-03-13</li>
  155. </ul>
  156. </div>
  157. </div>
  158. </div></div>
  159. <img id="dude" alt="The Dude abides..." src="/img/dude.png">
  160. <img id="walter" alt="Mark it zero!" src="/img/walter.png">
  161. <div id="footer">
  162. Built with <a href="http://bitbucket.org/obensonne/poole">Poole</a>
  163. &middot;
  164. Licensed as <a href="http://creativecommons.org/licenses/by/3.0">CC-BY</a>
  165. &middot;
  166. <a href="http://validator.w3.org/check?uri=referer">Validate HTML</a>
  167. &middot;
  168. <a href="http://jigsaw.w3.org/css-validator/validator?uri=xythobuz.de%2Fstyle.css&amp;profile=css3">Validate CSS</a>
  169. &middot;
  170. <a href="http://feed1.w3.org/check.cgi?url=http://www.xythobuz.de/rss.xml">Validate RSS</a>
  171. &middot;
  172. <a href="http://www.validome.org/google/validate?url=http://www.xythobuz.de&amp;googleTyp=SITEMAP">Validate Sitemap</a>
  173. </div>
  174. <img src="/stats/count.php?img" alt="Analytics">
  175. <script src="http://gitforked.com/api/1.1/button.js" type="text/javascript"></script>
  176. </body>
  177. </html>