My static website generator using poole https://www.xythobuz.de
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

avrnetstack.html 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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. <p><a href="http://xythobuz.de/lastmusic">♫</a></p>
  37. <h2>avrNetStack</h2>
  38. </div>
  39. <div class="colmask leftmenu"><div class="colleft">
  40. <div class="content">
  41. <h1>avrNetStack</h1>
  42. <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).
  43. Select your MCU and hardware driver in the makefile.
  44. Compile with "make lib" to create a static library.
  45. 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.
  46. 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>
  47. <p><a href="/img/net.jpg"><img alt="Foto 1" src="/img/net_small.jpg" /></a>
  48. <a href="/img/net2.jpg"><img alt="Foto 2" src="/img/net2_small.jpg" /></a>
  49. <a href="/img/teaser2.png"><img alt="Foto 2" src="/img/teaser2_small.png" /></a></p>
  50. <h2>License</h2>
  51. <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>
  52. <pre>
  53. &copy; 2009 Async Labs Inc.
  54. &copy; 2012 Thomas Buck
  55. </pre>
  56. <p>Everything else, if not mentioned otherwise elsewhere, is released under a BSD 2-Clause License. See the accompanying COPYING file.</p>
  57. <h2>Software Overview</h2>
  58. <h3>ENC28J60 Driver</h3>
  59. <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.
  60. 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.
  61. You can change the size and location of the Receive and Transmit Segments in the ENC28J60 SRAM.</p>
  62. <h3>MRF24WB0MA Driver</h3>
  63. <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>
  64. <h3>Hardware Libraries</h3>
  65. <p>avrNetStack includes UART, SPI and Timer libs aswell as a basic task switcher and scheduler.
  66. 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.
  67. 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.
  68. If you want to use the UART with your own software don't include another UART library. Use the functions from serial.h!
  69. 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.
  70. 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>
  71. <h3>Debug Output</h3>
  72. <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.
  73. debug.h also includes a custom assert implementation.</p>
  74. <h3>Controller Module</h3>
  75. <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>
  76. <h3>MAC Module</h3>
  77. <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>
  78. <h3>ARP Module</h3>
  79. <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.
  80. If the Cache has no hit, an ARP Packet is issued, so that the higher layer can try again later.</p>
  81. <h3>IPv4 Module</h3>
  82. <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.
  83. It buffers outgoing IPv4 Packets to get the target MAC from the ARP Module automatically.</p>
  84. <h3>ICMP Module</h3>
  85. <p>Handles received ICMP Packets. Can answer and send out echo requests.
  86. A single handler for echo replies can be registered. This is used to implement a simple Ping Utility in "test/main.c".</p>
  87. <h3>UDP Module</h3>
  88. <p>Handles the really simple User Datagram Protocol. A handler for every port can be registered and UDP packets can be transmitted.</p>
  89. <h3>NTP Module</h3>
  90. <p>Simple NTP (SNTP) Client. Will update systemTime automagically to the current unix timestamp some time after calling ntpIssueRequest().</p>
  91. <span id="flattr">
  92. <a class="FlattrButton" href="http://www.xythobuz.de/avrnetstack.html" title="avrNetStack">Modular AVR TCP/IP Stack with Ethernet and WiFi support</a>
  93. </span>
  94. <span id="twitter">
  95. <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>
  96. </span>
  97. <span id="reddit">
  98. <script type="text/javascript">reddit_url = "http://www.xythobuz.de/avrnetstack.html";</script>
  99. <script type="text/javascript" src="http://www.reddit.com/static/button/button2.js"></script>
  100. </span>
  101. <span id="github">
  102. <a href="https://github.com/xythobuz/avrNetStack" class="gitforked-button gitforked-forks gitforked-watchers">Fork</a>
  103. </span>
  104. <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>
  105. <div id="disqus_thread"></div>
  106. <script type="text/javascript">
  107. var disqus_shortname = "xythobuz";
  108. (function() {
  109. var dsq = document.createElement("script"); dsq.type = "text/javascript"; dsq.async = true;
  110. dsq.src = "http://" + disqus_shortname + ".disqus.com/embed.js";
  111. (document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(dsq);
  112. })();
  113. </script>
  114. <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
  115. <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
  116. </div>
  117. <div class="nav">
  118. <h3>Thomas Buck</h3>
  119. <div id="logo"><img id="logoImg" src="http://www.gravatar.com/avatar/8d18fec40a74782052fb4c007d212475?s=180" alt="Avatar"></div>
  120. <p id="bio">
  121. 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 <a href="http://www.gnu.org/philosophy/free-sw.html">Free Software</a> on my <a href="https://github.com/xythobuz">GitHub Profile</a>. It would be nice if you could use this <a href="http://www.amazon.de/?_encoding=UTF8&amp;camp=1638&amp;creative=19454&amp;linkCode=ur2&amp;site-redirect=de&amp;tag=xythobuzorg-21">Amazon.de Affiliate Link</a>.
  122. </p>
  123. <ul id="menuList">
  124. <li><a href="/index.html">Home</a></li>
  125. <li><a href="/blog.html">Blog</a></li>
  126. <li><a href="/contact.html">Contact</a></li>
  127. <li>&nbsp;</li>
  128. <li><a href="/ledcube.html">8x8x8 LED Cube</a></li>
  129. <li><a href="/yasab.html">YASAB AVR Bootloader</a></li>
  130. <li><a href="/avrnetstack.html">avrNetStack</a></li>
  131. <li><a href="/xycontrol.html">xyControl</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_05_28_pid.html">Regelschwingungen</a></li><li class="recentDate">2013-05-28</li>
  151. <li class="recentList"><a href="/2013_05_20_just_cause.html">Just Cause 2 Capture</a></li><li class="recentDate">2013-05-20</li>
  152. <li class="recentList"><a href="/2013_05_17_itunes.html">Musik Script History</a></li><li class="recentDate">2013-05-17</li>
  153. <li class="recentList"><a href="/2013_05_09_itunes.html">Musikgeschmack</a></li><li class="recentDate">2013-05-09</li>
  154. <li class="recentList"><a href="/2013_05_05_debian.html">Debian Update</a></li><li class="recentDate">2013-05-05</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. <script type="text/javascript">
  177. var _gaq = _gaq || [];
  178. _gaq.push(['_setAccount', 'UA-39163591-1']);
  179. _gaq.push(['_setDomainName', 'xythobuz.org']);
  180. _gaq.push(['_setAllowLinker', true]);
  181. _gaq.push(['_trackPageview']);
  182. setTimeout("_gaq.push(['_trackEvent', '30_seconds', 'read'])", 30000);
  183. (function() {
  184. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  185. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  186. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  187. })();
  188. </script>
  189. </body>
  190. </html>