My static website generator using poole https://www.xythobuz.de
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

avrnetstack.html 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9. <link rel="author" href="/xythobuz@xythobuz.de">
  10. <link rel="shortcut icon" href="/img/favicon.ico">
  11. <link rel="alternate" type="application/rss+xml" title="Blog" href="/rss.xml">
  12. <link type="text/css" rel="stylesheet" href="/css/sh_bright.min.css" />
  13. <link rel="stylesheet" href="/css/bootstrap.css" type="text/css" media="screen" />
  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" src="/js/sh_main.js"></script>
  17. <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.1/jquery.min.js"></script>
  18. <script type="text/javascript" src="/js/bootstrap.js"></script>
  19. <script type='text/javascript'>
  20. /* <![CDATA[ */
  21. (function() {
  22. var s = document.createElement('script');
  23. var t = document.getElementsByTagName('script')[0];
  24. s.type = 'text/javascript';
  25. s.async = true;
  26. s.src = '//api.flattr.com/js/0.6/load.js?mode=auto&uid=xythobuz&category=text';
  27. t.parentNode.insertBefore(s, t);
  28. })();
  29. /* ]]> */
  30. </script>
  31. </head>
  32. <body onload="sh_highlightDocument('/js/sh/', '.min.js');" style="font-size: 1.1em; font-family: 'Droid Sans', sans-serif;">
  33. <div class="github-fork-ribbon-wrapper right">
  34. <div class="github-fork-ribbon"><a href="
  35. https://github.com/xythobuz/avrNetStack
  36. ">Fork me on GitHub</a></div></div>
  37. <div class="navbar">
  38. <div class="navbar-inner">
  39. <ul class="nav">
  40. <li><a href="/index.html">Home</a></li>
  41. <li><a href="/blog.html">Blog</a></li>
  42. <li><a href="/contact.html">Contact</a></li>
  43. <li class="dropdown"><a href="/software.html" class="dropdown-toggle" data-toggle="dropdown">Software<b class="caret"></b></a><ul class="dropdown-menu">
  44. <li><a href="/avrnetstack.html">avrNetStack</a></li>
  45. <li><a href="/avrserial.html">AVR Serial Library</a></li>
  46. <li><a href="/yasab.html">YASAB AVR Bootloader</a></li>
  47. <li><a href="/c250.html">Mio C250 Unlock</a></li>
  48. <li><a href="/nas.html">IB-NAS6210 Linux</a></li>
  49. <li><a href="/serialhelper.html">Serial Helper</a></li>
  50. <li><a href="/ultimatenotifier.html">Ultimate Notifier Script</a></li>
  51. </ul>
  52. <li class="dropdown"><a href="/hardware.html" class="dropdown-toggle" data-toggle="dropdown">Hardware<b class="caret"></b></a><ul class="dropdown-menu">
  53. <li><a href="/ledcube.html">8x8x8 LED Cube</a></li>
  54. <li><a href="/xycontrol.html">xyControl</a></li>
  55. <li class="dropdown-submenu"><a href="/xyrobot.html" class="dropdown-toggle disabled" data-toggle="dropdown">xyRobot</a><ul class="dropdown-menu">
  56. <li><a href="/bluetooth.html">Bluetooth UART (BTM-222)</a></li>
  57. <li><a href="/k6x4008.html">K6x4008 SRAM</a></li>
  58. <li><a href="/rremote.html">rRemote</a></li>
  59. <li><a href="/xyrobotremote.html">xyRobotRemote</a></li>
  60. </ul>
  61. <li><a href="/ssop28.html">SSOP28 - DIL Adapter</a></li>
  62. <li><a href="/serialdebug.html">Serial Debug</a></li>
  63. <li><a href="/ledmatrix.html">LED Matrix</a></li>
  64. </ul>
  65. <li class="divider-vertical"></li>
  66. <li><a href="http://xythobuz.de/lastmusic">♫</a></li>
  67. <li class="divider-vertical"></li>
  68. <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Language<b class="caret"></b></a><ul class="dropdown-menu">
  69. <li><a href='avrnetstack.html'>English</a></li>
  70. </ul></li>
  71. <li class="divider-vertical"></li>
  72. <script type="text/javascript">
  73. function sitesearch(curobj) {
  74. curobj.q.value = "site:xythobuz.de " + curobj.r.value
  75. }
  76. </script>
  77. <form class="navbar-search" action="http://www.google.com/search" method="get" onSubmit="sitesearch(this)">
  78. <input name="q" type="hidden" />
  79. <input name="r" type="text" class="search-query span2" placeholder="Search..." />
  80. </form>
  81. </ul>
  82. </div>
  83. </div>
  84. <div style="width: 75%; margin-left: auto; margin-right: auto;">
  85. <h1>avrNetStack</h1>
  86. <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).
  87. Select your MCU and hardware driver in the makefile.
  88. Compile with "make lib" to create a static library.
  89. 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.
  90. 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>
  91. <p><a href="/img/net.jpg"><img alt="Foto 1" src="/img/net_small.jpg" /></a>
  92. <a href="/img/net2.jpg"><img alt="Foto 2" src="/img/net2_small.jpg" /></a>
  93. <a href="/img/teaser2.png"><img alt="Foto 2" src="/img/teaser2_small.png" /></a></p>
  94. <h2>License</h2>
  95. <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>
  96. <pre>
  97. &copy; 2009 Async Labs Inc.
  98. &copy; 2012 Thomas Buck
  99. </pre>
  100. <p>Everything else, if not mentioned otherwise elsewhere, is released under a BSD 2-Clause License. See the accompanying COPYING file.</p>
  101. <h2>Software Overview</h2>
  102. <h3>ENC28J60 Driver</h3>
  103. <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.
  104. 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.
  105. You can change the size and location of the Receive and Transmit Segments in the ENC28J60 SRAM.</p>
  106. <h3>MRF24WB0MA Driver</h3>
  107. <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>
  108. <h3>Hardware Libraries</h3>
  109. <p>avrNetStack includes UART, SPI and Timer libs aswell as a basic task switcher and scheduler.
  110. 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.
  111. 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.
  112. If you want to use the UART with your own software don't include another UART library. Use the functions from serial.h!
  113. 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.
  114. 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>
  115. <h3>Debug Output</h3>
  116. <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.
  117. debug.h also includes a custom assert implementation.</p>
  118. <h3>Controller Module</h3>
  119. <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>
  120. <h3>MAC Module</h3>
  121. <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>
  122. <h3>ARP Module</h3>
  123. <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.
  124. If the Cache has no hit, an ARP Packet is issued, so that the higher layer can try again later.</p>
  125. <h3>IPv4 Module</h3>
  126. <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.
  127. It buffers outgoing IPv4 Packets to get the target MAC from the ARP Module automatically.</p>
  128. <h3>ICMP Module</h3>
  129. <p>Handles received ICMP Packets. Can answer and send out echo requests.
  130. A single handler for echo replies can be registered. This is used to implement a simple Ping Utility in "test/main.c".</p>
  131. <h3>UDP Module</h3>
  132. <p>Handles the really simple User Datagram Protocol. A handler for every port can be registered and UDP packets can be transmitted.</p>
  133. <h3>NTP Module</h3>
  134. <p>Simple NTP (SNTP) Client. Will update systemTime automagically to the current unix timestamp some time after calling ntpIssueRequest().</p>
  135. <span id="flattr">
  136. <a class="FlattrButton" href="http://www.xythobuz.de/avrnetstack.html" title="avrNetStack">Modular AVR TCP/IP Stack with Ethernet and WiFi support</a>
  137. </span>
  138. <span id="twitter">
  139. <a href="https://twitter.com/share" class="twitter-share-buttdata-via="xythobuz" data-dnt="true" data-related="xythobuz" data-count="vertical">Tweet</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s;if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twi.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitwjs");</script>
  140. </span>
  141. <span id="reddit">
  142. <script type="text/javascript">reddit_url = "http://www.xythobuz.de/avrnetstack.html";</script>
  143. <script type="text/javascript" src="http://www.redcom/static/button/button2.js"></script>
  144. </span>
  145. <span id="github">
  146. <a href="https://github.com/xythobuz/avrNetStack" class="gitforked-button gitforked-forks gitforked-watchers"></a>
  147. </span>
  148. <div id="print"><script>var pfHeaderImgUrl = '';var pfHeaderTagline = '';var pfdisableClickToDel = 0;var pfHideImages = 0;var pfImageDisplayStyle = 'right';var pfDisablePDF = 0;var pfDisableEmail = 0;var pfDisablePrint = 0;var pfCustomCSS = '';var pfBtVersion='1';(function(){var js, pf;pf = document.createElement('script');pf.type = 'text/javascript';if('https:' == document.location.protocol){js='https://pf-cdn.printfriendly.com/ssl/main.js'}else{js='http://cdn.printfriendly.com/printfriendly.js'}pf.src=js;document.getElementsByTagName('head')[0].appendChild(pf)})();</script><a href="http://www.printfriendly.com" style="color:#6D9F00;text-decoration:none;" class="printfriendly" onclick="window.print();return false;" title="Printer Friendly and PDF"><img style="border:none;margin:0 6px" src="https://pf-cdn.printfriendly.com/images/icons/pf-print-icon.gif" width="16" height="15" alt="Print Friendly Version of this page" />Print <img style="border:none;margin:0 6px" src="https://pf-cdn.printfriendly.com/images/icons/pf-pdf-icon.gif" width="12" height="12" alt="Get a PDF version of this webpage" />PDF</a></div>
  149. <div id="disqus_thread"></div>
  150. <script type="text/javascript">
  151. var disqus_shortname = "xythobuz";
  152. (function() {
  153. var dsq = document.createElement("script"); dsq.type = "text/javascript"; dsq.async = true;
  154. dsq.src = "http://" + disqus_shortname + ".disqus.com/embed.js";
  155. (document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0] ).appendChild(dsq);
  156. })();
  157. </script>
  158. <noscript>Please enable JavaScript to view the <a href="http://disqus. com/?ref_noscript">comments powered by Disqus.</a></noscript>
  159. <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
  160. </div>
  161. <div style="color: gray; text-align: center;">
  162. Built with <a href="http://bitbucket.org/obensonne/poole">Poole</a>
  163. &middot;
  164. Made with <a href="http://twitter.github.io/bootstrap/index.html">Bootstrap</a>
  165. &middot;
  166. Using <a href="http://shjs.sourceforge.net">SHJS</a>
  167. &middot;
  168. Licensed as <a href="http://creativecommons.org/licenses/by/3.0">CC-BY</a>
  169. </div>
  170. <img src="http://xythobuz.de/stats/count.php?img" alt="Analytics">
  171. <script src="http://gitforked.com/api/1.1/button.js" type="text/javascript"></script>
  172. <script type="text/javascript">
  173. var _gaq = _gaq || [];
  174. _gaq.push(['_setAccount', 'UA-39163591-1']);
  175. _gaq.push(['_setDomainName', 'xythobuz.org']);
  176. _gaq.push(['_setAllowLinker', true]);
  177. _gaq.push(['_trackPageview']);
  178. setTimeout("_gaq.push(['_trackEvent', '30_seconds', 'read'])", 30000);
  179. (function() {
  180. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  181. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  182. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  183. })();
  184. </script>
  185. </body>
  186. </html>