{"id":76083,"date":"2020-03-08T18:45:47","date_gmt":"2020-03-08T12:45:47","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=76083"},"modified":"2022-01-08T20:40:27","modified_gmt":"2022-01-08T14:40:27","slug":"stm32-enc28j60-arduino","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=76083","title":{"rendered":"STM32 + ENC28J60 (Arduino)"},"content":{"rendered":"<p>ENC28J60 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u043f\u043b\u0430\u0442\u0435 Arduino \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SPI \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u0442\u0430\u043a\u0442\u043e\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u0430 ISP \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0442\u044c 20 \u041c\u0413\u0446. \u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0442\u0438 TCP\/IP \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u044a\u0451\u043c RJ-45. \u041c\u043e\u0434\u0443\u043b\u044c \u0433\u0430\u043b\u044c\u0432\u0430\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0437\u0432\u044f\u0437\u0430\u043d \u0441 \u043d\u0438\u043c.<\/p>\n<p><a class=\"highslide-image\" href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA-%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0-%D0%BE%D1%82-2020-02-15-123035.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-75789\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA-%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0-%D0%BE%D1%82-2020-02-15-123035.png\" sizes=\"auto, (max-width: 269px) 100vw, 269px\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-123035.png 393w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-123035-200x185.png 200w\" alt=\"\" width=\"269\" height=\"249\" \/><\/a><\/p>\n<p><strong>\u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u043c\u043e\u0434\u0443\u043b\u044f ENC28J60:<\/strong><\/p>\n<ul>\n<li>\u0421\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0441 Ethernet \u0441\u0435\u0442\u044f\u043c\u0438 10\/100\/1000 Base-T. \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 10 \u043c\u0431\u0438\u0442\/\u0441\u0435\u043a, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f TCP\/IP \u0441\u0442\u0435\u043a\u0430.<\/li>\n<li>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c \u2013 SPI, \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0434\u043e 20 \u043c\u0413\u0446.<\/li>\n<li>\u041d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f 3,1 \u2013 3,6 \u0412. \u0422\u0438\u043f\u043e\u0432\u043e\u0435 3,3 \u0412.<\/li>\n<li>\u0422\u043e\u043a \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u043e\u0442 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u043f\u0438\u0442\u0430\u043d\u0438\u044f 3,3 \u0412:\n<ul>\n<li>\u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e 180 \u043c\u0410;<\/li>\n<li>\u0432 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438, \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 120 \u043c\u0410;<\/li>\n<li>\u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 2 \u043c\u0410.<\/li>\n<\/ul>\n<\/li>\n<li>\u041c\u043e\u0434\u0443\u043b\u044c \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0433\u0430\u043b\u044c\u0432\u0430\u043d\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0440\u0430\u0437\u0432\u044f\u0437\u043a\u0443 \u043e\u0442 \u043b\u0438\u043d\u0438\u0438 \u0441\u0432\u044f\u0437\u0438.<\/li>\n<li>\u0412\u044b\u0432\u043e\u0434\u044b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043c\u043e\u0434\u0443\u043b\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b \u0441 5 \u0432\u043e\u043b\u044c\u0442\u043e\u0432\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u0430\u043c.<\/li>\n<\/ul>\n<p>\u041e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u0430\u044f\u00a0 \u043f\u043b\u0430\u0442\u0430 STM32 (\u0431\u0430\u0437\u0435 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 STM32F103C8T6) \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043c\u043e\u0434\u0443\u043b\u044f ENC28J60.<\/p>\n<div id=\"marketWidget\"><\/div>\n<p>\u0412\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 ENC28J60 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 STM32 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 HTML \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0431 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 \u043a \u043f\u043b\u0430\u0442\u0435 Arduino \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u0432. \u0421\u0430\u043c \u043c\u043e\u0434\u0443\u043b\u044c ENC28J60 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u043a\u0430\u0431\u0435\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0443 (\u0440\u043e\u0443\u0442\u0435\u0440) \u0438\u043b\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u0435 \u041f\u041a.<\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435:<\/p>\n<table style=\"border-collapse: collapse; width: 100%;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"width: 50%; text-align: center;\"><strong>ENC28J60<\/strong><\/td>\n<td style=\"width: 50%; text-align: center;\"><strong>STM32F103<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 50%; text-align: center;\">VCC<\/td>\n<td style=\"width: 50%; text-align: center;\">3.3V<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 50%; text-align: center;\">GND<\/td>\n<td style=\"width: 50%; text-align: center;\">GND<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 50%; text-align: center;\">SCK<\/td>\n<td style=\"width: 50%; text-align: center;\">PA5<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 50%; text-align: center;\">SO<\/td>\n<td style=\"width: 50%; text-align: center;\">PA6<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 50%; text-align: center;\">SI<\/td>\n<td style=\"width: 50%; text-align: center;\">PA7<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 50%; text-align: center;\">CS<\/td>\n<td style=\"width: 50%; text-align: center;\">PA8<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4 style=\"text-align: center;\">\u0412\u044b\u0432\u043e\u0434 \u0442\u0435\u0441\u0442\u0430 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 HTML<\/h4>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0437\u0430\u043b\u0438\u0432\u043a\u043e\u0439 \u0441\u043a\u0435\u0442\u0447\u0430 \u0432 STM32 \u0412\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u2014\u00a0<a href=\"http:\/\/rcl-radio.ru\/?p=68376\">STM32 Arduino IDE<\/a><\/p>\n<pre class=\"actionscript\">\u0414\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u043a\u0435\u0442\u0447\u0430 \u0412\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043d\u0430\u0431\u043e\u0440 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a <a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/12\/Arduino_STM32-master.zip\">Arduino_STM32-master.zip<\/a><\/pre>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 10px;\"><span style=\"color: #808080; font-style: italic;\">\/\/ ENC28J60 -  STM32F103<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/   VCC    -    3.3V<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/   GND    -    GND<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/   SCK    -    Pin PA5<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/   SO     -    Pin PA6<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/   SI     -    Pin PA7<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/   CS     -    Pin PA8<\/span>\r\n\u00a0\r\n\/\/ \u0423\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432\u0445\u043e\u0434\u044f\u0442 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 \u043d\u0430\u0431\u043e\u0440\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a <a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/12\/Arduino_STM32-master.zip\">Arduino_STM32-master.zip<\/a>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;EtherCard_STM.h&gt;<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;SPI.h&gt;<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">static<\/span> byte mymac<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #66cc66;\">]<\/span> = <span style=\"color: #66cc66;\">{<\/span> 0x74,0x69,0x69,0x2D,0x30,0x31 <span style=\"color: #66cc66;\">}<\/span>;\r\n<span style=\"color: #0066cc;\">static<\/span> byte myip<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #66cc66;\">]<\/span> = <span style=\"color: #66cc66;\">{<\/span> <span style=\"color: #cc66cc;\">10<\/span>,<span style=\"color: #cc66cc;\">42<\/span>,<span style=\"color: #cc66cc;\">0<\/span>,<span style=\"color: #cc66cc;\">100<\/span> <span style=\"color: #66cc66;\">}<\/span>;\r\n\u00a0\r\nbyte Ethernet::buffer<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">1000<\/span><span style=\"color: #66cc66;\">]<\/span>;\r\nBufferFiller bfill;\r\n\u00a0\r\n<span style=\"color: #0066cc;\">static<\/span> word homePage<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  bfill = ether.<span style=\"color: #006600;\">tcpOffset<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  bfill.<span style=\"color: #006600;\">emit_p<\/span><span style=\"color: #66cc66;\">(<\/span>PSTR<span style=\"color: #66cc66;\">(<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;html&gt;&lt;head&gt;&lt;meta charset='UTF-8'&gt;\"<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;h1&gt;\u041f\u0440\u0438\u0432\u0435\u0442 \u041c\u0418\u0420!!!&lt;\/h&gt;\"<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;\/html&gt; \"<\/span>\r\n  <span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  <span style=\"color: #b1b100;\">return<\/span> bfill.<span style=\"color: #0066cc;\">position<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> setup <span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  Serial.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">9600<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  ether.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span>sizeof Ethernet::buffer, mymac<span style=\"color: #66cc66;\">)<\/span>;\r\n  ether.<span style=\"color: #006600;\">staticSetup<\/span><span style=\"color: #66cc66;\">(<\/span>myip<span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> loop <span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n\u00a0\r\n  word pos = ether.<span style=\"color: #006600;\">packetLoop<\/span><span style=\"color: #66cc66;\">(<\/span>ether.<span style=\"color: #006600;\">packetReceive<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  <span style=\"color: #b1b100;\">if<\/span> <span style=\"color: #66cc66;\">(<\/span>pos<span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span> \r\n  ether.<span style=\"color: #006600;\">httpServerReply<\/span><span style=\"color: #66cc66;\">(<\/span>homePage<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">)<\/span>;   \r\n<span style=\"color: #66cc66;\">}<\/span><span style=\"color: #66cc66;\">}<\/span><\/pre>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/03\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-03-08-184430.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-76084\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/03\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-03-08-184430.png\" alt=\"\" width=\"398\" height=\"101\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/03\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-03-08-184430.png 398w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/03\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-03-08-184430-200x51.png 200w\" sizes=\"auto, (max-width: 398px) 100vw, 398px\" \/><\/a><\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u0432\u0435\u0441\u0442\u0438 \u0432 \u0430\u0434\u0440\u0435\u0441\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 IP \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 ENC28J60. \u041e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d \u0432 \u0441\u043a\u0435\u0442\u0447\u0435:<\/p>\n<blockquote><p>static\u00a0byte myip[]\u00a0=\u00a0{\u00a010,42,0,100\u00a0};<\/p><\/blockquote>\n<p>\u0415\u0441\u043b\u0438 \u0412\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438 ENC28J60 \u043a \u0440\u043e\u0443\u0442\u0435\u0440\u0443, \u0442\u043e \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c IP \u0430\u0434\u0440\u0435\u0441 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0435\u0442\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u043e\u0443\u0442\u0435\u0440 \u0438\u043c\u0435\u0435\u0442 \u0430\u0434\u0440\u0435\u0441 192.168.0.1 , \u0442\u043e \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u043d\u0435 \u0437\u0430\u043d\u044f\u0442\u044b\u0439 IP \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0442\u0438 (\u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 192.168.0.100).<\/p>\n<p>\u0423 \u043c\u0435\u043d\u044f \u0443\u043a\u0430\u0437\u0430\u043d \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u0430\u0434\u0440\u0435\u0441, \u0442\u0430\u043a \u043a\u0430\u043a \u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b ENC28J60 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u0435 \u041f\u041a, \u0442\u043e \u043c\u043e\u044f \u0441\u0435\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432\u0441\u0435\u0433\u043e \u0438\u0437 \u0434\u0432\u0443\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 (\u041f\u041a \u0438 ENC28J60) \u0438 \u0432\u044b\u0431\u0440\u0430\u043b IP \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0439 \u0441\u0435\u0442\u0438.<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u041c\u0410\u0421 \u0430\u0434\u0440\u0435\u0441\u0430 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0446\u0438\u0444\u0440\u044b (\u0432 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435), \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u043b \u0441 MAC \u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438 \u0443\u0441\u0442-\u0432 \u0438\u043c\u0435\u044e\u0449\u0438\u0445\u0441\u044f \u0432 \u0441\u0435\u0442\u0438.<\/p>\n<p><a class=\"highslide-image\" href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA-%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0-%D0%BE%D1%82-2020-02-15-130116.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-75794\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA-%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0-%D0%BE%D1%82-2020-02-15-130116.png\" sizes=\"auto, (max-width: 520px) 100vw, 520px\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-130116.png 520w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-130116-200x198.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-130116-500x494.png 500w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-130116-45x45.png 45w\" alt=\"\" width=\"520\" height=\"514\" \/><\/a><\/p>\n<h4 style=\"text-align: center;\">\u0422\u0435\u0440\u043c\u043e\u043c\u0435\u0442\u0440 \u043d\u0430 DS18B20<\/h4>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u0434\u0430\u0442\u0447\u0438\u043a \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b DS18B20. \u0414\u0430\u0442\u0447\u0438\u043a \u0431\u0443\u0434\u0435\u0442 \u0438\u0437\u043c\u0435\u0440\u044f\u0442\u044c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u0438 \u0435\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 HTML \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443. \u0414\u0430\u0442\u0447\u0438\u043a \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b DS18B20 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u0432\u044b\u0445\u043e\u0434\u0443 PA4. HTML \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0435 10 \u0441\u0435\u043a\u0443\u043d\u0434.<\/p>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/03\/073287283972839.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-76088\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/03\/073287283972839.png\" alt=\"\" width=\"433\" height=\"117\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/03\/073287283972839.png 433w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/03\/073287283972839-200x54.png 200w\" sizes=\"auto, (max-width: 433px) 100vw, 433px\" \/><\/a><\/p>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 10px;\"><span style=\"color: #808080; font-style: italic;\">\/\/ ENC28J60 -  STM32F103<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/   VCC    -    3.3V<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/   GND    -    GND<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/   SCK    -    Pin PA5<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/   SO     -    Pin PA6<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/   SI     -    Pin PA7<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/   CS     -    Pin PA8<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/ \u0423\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432\u0445\u043e\u0434\u044f\u0442 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 \u043d\u0430\u0431\u043e\u0440\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a Arduino_STM32-master.zip<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;EtherCard_STM.h&gt;<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;SPI.h&gt;<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;OneWireSTM.h&gt;<\/span>\r\nOneWire  ds<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">4<\/span><span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ PA4<\/span>\r\nbyte i,present = <span style=\"color: #cc66cc;\">0<\/span>,type_s = <span style=\"color: #cc66cc;\">0<\/span>, <span style=\"color: #0066cc;\">data<\/span><span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">12<\/span><span style=\"color: #66cc66;\">]<\/span>, addr<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">8<\/span><span style=\"color: #66cc66;\">]<\/span>;\r\nfloat celsius;\r\n<span style=\"color: #0066cc;\">int<\/span> temp0,temp1;\r\nunsigned long times;\r\n\u00a0\r\n<span style=\"color: #0066cc;\">static<\/span> byte mymac<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #66cc66;\">]<\/span> = <span style=\"color: #66cc66;\">{<\/span> 0x74,0x69,0x69,0x2D,0x30,0x31 <span style=\"color: #66cc66;\">}<\/span>;\r\n<span style=\"color: #0066cc;\">static<\/span> byte myip<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #66cc66;\">]<\/span> = <span style=\"color: #66cc66;\">{<\/span> <span style=\"color: #cc66cc;\">10<\/span>,<span style=\"color: #cc66cc;\">42<\/span>,<span style=\"color: #cc66cc;\">0<\/span>,<span style=\"color: #cc66cc;\">100<\/span> <span style=\"color: #66cc66;\">}<\/span>;\r\n\u00a0\r\nbyte Ethernet::buffer<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">5000<\/span><span style=\"color: #66cc66;\">]<\/span>;\r\nBufferFiller bfill;\r\n\u00a0\r\n<span style=\"color: #0066cc;\">static<\/span> word homePage<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  bfill = ether.<span style=\"color: #006600;\">tcpOffset<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  bfill.<span style=\"color: #006600;\">emit_p<\/span><span style=\"color: #66cc66;\">(<\/span>PSTR<span style=\"color: #66cc66;\">(<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;html&gt;&lt;head&gt;&lt;meta charset='UTF-8'&gt;\"<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;meta http-equiv='refresh' content='10'\/&gt;\"<\/span><span style=\"color: #808080; font-style: italic;\">\/\/ \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043a\u0430\u0436\u0434\u044b\u0435 10 \u0441\u0435\u043a\u0443\u043d\u0434<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;h1&gt;\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430: $D.$D &amp;#176;C&lt;\/h1&gt;\"<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;\/html&gt; \"<\/span>\r\n  <span style=\"color: #66cc66;\">)<\/span>,temp0,temp1<span style=\"color: #66cc66;\">)<\/span>;\r\n  <span style=\"color: #b1b100;\">return<\/span> bfill.<span style=\"color: #0066cc;\">position<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> setup <span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  Serial.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">9600<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  ether.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span>sizeof Ethernet::buffer, mymac<span style=\"color: #66cc66;\">)<\/span>;\r\n  ether.<span style=\"color: #006600;\">staticSetup<\/span><span style=\"color: #66cc66;\">(<\/span>myip<span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> loop <span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n   <span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>millis<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>-times<span style=\"color: #66cc66;\">&gt;<\/span><span style=\"color: #cc66cc;\">2000<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>\r\n  <span style=\"color: #808080; font-style: italic;\">\/\/\/\/\/\/\/\/\/ 18b20 \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/span>\r\n  <span style=\"color: #b1b100;\">if<\/span> <span style=\"color: #66cc66;\">(<\/span> <span style=\"color: #66cc66;\">!<\/span>ds.<span style=\"color: #006600;\">search<\/span><span style=\"color: #66cc66;\">(<\/span>addr<span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>ds.<span style=\"color: #006600;\">reset_search<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;delay<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">250<\/span><span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #b1b100;\">return<\/span>;<span style=\"color: #66cc66;\">}<\/span>\r\n  ds.<span style=\"color: #006600;\">reset<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;ds.<span style=\"color: #006600;\">select<\/span><span style=\"color: #66cc66;\">(<\/span>addr<span style=\"color: #66cc66;\">)<\/span>;ds.<span style=\"color: #006600;\">write<\/span><span style=\"color: #66cc66;\">(<\/span>0x44, <span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #66cc66;\">)<\/span>;delay<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">250<\/span><span style=\"color: #66cc66;\">)<\/span>; present = ds.<span style=\"color: #006600;\">reset<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;ds.<span style=\"color: #006600;\">select<\/span><span style=\"color: #66cc66;\">(<\/span>addr<span style=\"color: #66cc66;\">)<\/span>;ds.<span style=\"color: #006600;\">write<\/span><span style=\"color: #66cc66;\">(<\/span>0xBE<span style=\"color: #66cc66;\">)<\/span>; \r\n  <span style=\"color: #b1b100;\">for<\/span> <span style=\"color: #66cc66;\">(<\/span>i = <span style=\"color: #cc66cc;\">0<\/span>; i <span style=\"color: #66cc66;\">&lt;<\/span> <span style=\"color: #cc66cc;\">9<\/span>; i++<span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span><span style=\"color: #0066cc;\">data<\/span><span style=\"color: #66cc66;\">[<\/span>i<span style=\"color: #66cc66;\">]<\/span> = ds.<span style=\"color: #006600;\">read<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #66cc66;\">}<\/span>\r\n  int16_t raw = <span style=\"color: #66cc66;\">(<\/span><span style=\"color: #0066cc;\">data<\/span><span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #66cc66;\">]<\/span> <span style=\"color: #66cc66;\">&lt;&lt;<\/span> <span style=\"color: #cc66cc;\">8<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">|<\/span> <span style=\"color: #0066cc;\">data<\/span><span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">]<\/span>;<span style=\"color: #b1b100;\">if<\/span> <span style=\"color: #66cc66;\">(<\/span>type_s<span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>raw = raw <span style=\"color: #66cc66;\">&lt;&lt;<\/span> <span style=\"color: #cc66cc;\">3<\/span>;<span style=\"color: #66cc66;\">}<\/span>celsius = <span style=\"color: #66cc66;\">(<\/span>float<span style=\"color: #66cc66;\">)<\/span>raw <span style=\"color: #66cc66;\">\/<\/span> <span style=\"color: #cc66cc;\">16.0<\/span>;\r\n  <span style=\"color: #808080; font-style: italic;\">\/\/\/\/\/\/\/\/ end 18b20 \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/span>\r\n  <span style=\"color: #66cc66;\">}<\/span>\r\n  temp0 = <span style=\"color: #0066cc;\">int<\/span><span style=\"color: #66cc66;\">(<\/span>celsius<span style=\"color: #66cc66;\">)<\/span>;\r\n  temp1 = <span style=\"color: #66cc66;\">(<\/span>celsius-temp0<span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">*<\/span><span style=\"color: #cc66cc;\">100<\/span>;\r\n\u00a0\r\n  word pos = ether.<span style=\"color: #006600;\">packetLoop<\/span><span style=\"color: #66cc66;\">(<\/span>ether.<span style=\"color: #006600;\">packetReceive<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  <span style=\"color: #b1b100;\">if<\/span> <span style=\"color: #66cc66;\">(<\/span>pos<span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span> \r\n  ether.<span style=\"color: #006600;\">httpServerReply<\/span><span style=\"color: #66cc66;\">(<\/span>homePage<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">)<\/span>;   \r\n<span style=\"color: #66cc66;\">}<\/span><span style=\"color: #66cc66;\">}<\/span><\/pre>\n<h4 style=\"text-align: center;\">\u0422\u0435\u0440\u043c\u043e\u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440 DS18B20<\/h4>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0440\u043c\u043e\u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440 \u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0447\u0435\u0440\u0435\u0437 HTML \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0434\u0430\u0442\u044c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 PB7 STM32. \u0422\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.\u00a0 \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u0430\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0437\u0430\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0432 \u044d\u043d\u0435\u0440\u0433\u043e\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/03\/23429732847.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-76090\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/03\/23429732847.png\" alt=\"\" width=\"737\" height=\"360\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/03\/23429732847.png 737w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/03\/23429732847-200x98.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/03\/23429732847-500x244.png 500w\" sizes=\"auto, (max-width: 737px) 100vw, 737px\" \/><\/a><\/p>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 10px;\"><span style=\"color: #808080; font-style: italic;\">\/\/ ENC28J60 -  STM32F103<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/   VCC    -    3.3V<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/   GND    -    GND<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/   SCK    -    Pin PA5<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/   SO     -    Pin PA6<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/   SI     -    Pin PA7<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/   CS     -    Pin PA8<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/ \u0423\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432\u0445\u043e\u0434\u044f\u0442 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 \u043d\u0430\u0431\u043e\u0440\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a Arduino_STM32-master.zip<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;EtherCard_STM.h&gt;<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;SPI.h&gt;<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;OneWireSTM.h&gt;<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;EEPROM.h&gt;<\/span>\r\nOneWire  ds<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">4<\/span><span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ PA4<\/span>\r\nbyte i,present = <span style=\"color: #cc66cc;\">0<\/span>,type_s = <span style=\"color: #cc66cc;\">0<\/span>, <span style=\"color: #0066cc;\">data<\/span><span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">12<\/span><span style=\"color: #66cc66;\">]<\/span>, addr<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">8<\/span><span style=\"color: #66cc66;\">]<\/span>;\r\nfloat celsius;\r\n<span style=\"color: #0066cc;\">int<\/span> temp0,temp1,reg,a,w,timer;\r\n<span style=\"color: #0066cc;\">String<\/span> line;\r\nunsigned long times;\r\nconst byte gis=<span style=\"color: #cc66cc;\">1<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0413\u0438\u0441\u0442\u0435\u0440\u0435\u0437\u0438\u0441 1 \u0433\u0440\u0430\u0434\u0443\u0441<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">static<\/span> byte mymac<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #66cc66;\">]<\/span> = <span style=\"color: #66cc66;\">{<\/span> 0x74,0x69,0x69,0x2D,0x30,0x31 <span style=\"color: #66cc66;\">}<\/span>;\r\n<span style=\"color: #0066cc;\">static<\/span> byte myip<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #66cc66;\">]<\/span> = <span style=\"color: #66cc66;\">{<\/span> <span style=\"color: #cc66cc;\">10<\/span>,<span style=\"color: #cc66cc;\">42<\/span>,<span style=\"color: #cc66cc;\">0<\/span>,<span style=\"color: #cc66cc;\">100<\/span> <span style=\"color: #66cc66;\">}<\/span>;\r\n\u00a0\r\nbyte Ethernet::buffer<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">5000<\/span><span style=\"color: #66cc66;\">]<\/span>;\r\nBufferFiller bfill;\r\n\u00a0\r\n<span style=\"color: #0066cc;\">static<\/span> word <span style=\"color: #0066cc;\">HTML<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  bfill = ether.<span style=\"color: #006600;\">tcpOffset<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  bfill.<span style=\"color: #006600;\">emit_p<\/span><span style=\"color: #66cc66;\">(<\/span>PSTR<span style=\"color: #66cc66;\">(<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;html&gt;&lt;head&gt;&lt;meta charset='UTF-8'&gt;\"<\/span>\r\n <span style=\"color: #ff0000;\">\"&lt;meta http-equiv='refresh' content='$D'\/&gt;&lt;\/head&gt;\"<\/span>\r\n <span style=\"color: #ff0000;\">\"&lt;style&gt;.tab1 {background-color:#F5F5F5;border-radius: 5px;margin: auto;}a{color:#333;&lt;\/style&gt;&lt;\/head&gt;\"<\/span>\r\n <span style=\"color: #ff0000;\">\"&lt;br&gt;&lt;TABLE class='tab1' align='center' width='470' BORDER='1' cellspacing='0' cellpadding='10'&gt;\"<\/span>\r\n <span style=\"color: #ff0000;\">\"&lt;td&gt;&lt;center&gt;&lt;big&gt;&lt;b&gt;\u0422\u0435\u0440\u043c\u043e\u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440 STM32 DS18B20&lt;\/b&gt;&lt;\/big&gt;&lt;\/td&gt;&lt;tr&gt;&lt;td&gt;&lt;center&gt;\"<\/span>\r\n <span style=\"color: #ff0000;\">\"\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430: &lt;b&gt;$D.$D &lt;\/b&gt;&amp;#176;C\"<\/span>\r\n <span style=\"color: #ff0000;\">\"&lt;\/td&gt;&lt;tr&gt;&lt;td align='center'&gt;\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (0...125&amp;#176;C)\"<\/span>\r\n <span style=\"color: #ff0000;\">\"&lt;form action='' method='GET'&gt;\"<\/span>\r\n <span style=\"color: #ff0000;\">\"&lt;br&gt;&lt;input type='text' name='reg' autocomplete='off' size='1'&gt;&lt;\/input&gt;  \"<\/span>\r\n <span style=\"color: #ff0000;\">\"&lt;button type='submit'&gt;\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c&lt;\/button&gt;&lt;\/form&gt;&lt;\/td&gt;&lt;tr&gt;\"<\/span>\r\n <span style=\"color: #ff0000;\">\"&lt;td&gt;&lt;center&gt;\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438: &lt;b&gt;$D &amp;#176;C&lt;\/b&gt;&lt;\/td&gt;\"<\/span>\r\n <span style=\"color: #ff0000;\">\"&lt;tr&gt;&lt;td&gt;&lt;center&gt;&lt;small&gt;\u0412\u0440\u0435\u043c\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043a\u0430\u0436\u0434\u044b\u0435 $D \u0441\u0435\u043a | &lt;b&gt;&lt;a href='\/?p=5'&gt;5 \u0441\u0435\u043a&lt;\/a&gt; &lt;a href='\/?p=10'&gt;10 \u0441\u0435\u043a&lt;\/a&gt; &lt;a href='\/?p=30'&gt;30 \u0441\u0435\u043a&lt;\/a&gt; &lt;a href='\/?p=60'&gt;1 \u043c\u0438\u043d&lt;\/a&gt;&lt;\/b&gt;\"<\/span>\r\n <span style=\"color: #ff0000;\">\"&lt;\/td&gt;&lt;\/table&gt;&lt;\/center&gt;&lt;\/html&gt;\"<\/span>\r\n  <span style=\"color: #66cc66;\">)<\/span>,timer,temp0,temp1,reg,timer<span style=\"color: #66cc66;\">)<\/span>;\r\n  <span style=\"color: #b1b100;\">return<\/span> bfill.<span style=\"color: #0066cc;\">position<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> setup <span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  Serial.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">9600<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  EEPROM.<span style=\"color: #006600;\">init<\/span><span style=\"color: #66cc66;\">(<\/span>0x801F000,0x801F800,0x400<span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #808080; font-style: italic;\">\/\/ 1024 byte<\/span>\r\n  ether.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span>sizeof Ethernet::buffer, mymac<span style=\"color: #66cc66;\">)<\/span>;\r\n  ether.<span style=\"color: #006600;\">staticSetup<\/span><span style=\"color: #66cc66;\">(<\/span>myip<span style=\"color: #66cc66;\">)<\/span>;\r\n  pinMode<span style=\"color: #66cc66;\">(<\/span>PB7, OUTPUT<span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ PB7 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u043b\u0435 \u043d\u0430\u0433\u0440\u0435\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430<\/span>\r\n  reg = EEPROM.<span style=\"color: #006600;\">read<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">10<\/span><span style=\"color: #66cc66;\">)<\/span>;timer = EEPROM.<span style=\"color: #006600;\">read<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">11<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> loop <span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n   <span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>millis<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>-times<span style=\"color: #66cc66;\">&gt;<\/span><span style=\"color: #cc66cc;\">2000<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>\r\n  <span style=\"color: #808080; font-style: italic;\">\/\/\/\/\/\/\/\/\/ 18b20 \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/span>\r\n  <span style=\"color: #b1b100;\">if<\/span> <span style=\"color: #66cc66;\">(<\/span> <span style=\"color: #66cc66;\">!<\/span>ds.<span style=\"color: #006600;\">search<\/span><span style=\"color: #66cc66;\">(<\/span>addr<span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>ds.<span style=\"color: #006600;\">reset_search<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;delay<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">250<\/span><span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #b1b100;\">return<\/span>;<span style=\"color: #66cc66;\">}<\/span>\r\n  ds.<span style=\"color: #006600;\">reset<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;ds.<span style=\"color: #006600;\">select<\/span><span style=\"color: #66cc66;\">(<\/span>addr<span style=\"color: #66cc66;\">)<\/span>;ds.<span style=\"color: #006600;\">write<\/span><span style=\"color: #66cc66;\">(<\/span>0x44, <span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #66cc66;\">)<\/span>;delay<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">250<\/span><span style=\"color: #66cc66;\">)<\/span>; present = ds.<span style=\"color: #006600;\">reset<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;ds.<span style=\"color: #006600;\">select<\/span><span style=\"color: #66cc66;\">(<\/span>addr<span style=\"color: #66cc66;\">)<\/span>;ds.<span style=\"color: #006600;\">write<\/span><span style=\"color: #66cc66;\">(<\/span>0xBE<span style=\"color: #66cc66;\">)<\/span>; \r\n  <span style=\"color: #b1b100;\">for<\/span> <span style=\"color: #66cc66;\">(<\/span>i = <span style=\"color: #cc66cc;\">0<\/span>; i <span style=\"color: #66cc66;\">&lt;<\/span> <span style=\"color: #cc66cc;\">9<\/span>; i++<span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span><span style=\"color: #0066cc;\">data<\/span><span style=\"color: #66cc66;\">[<\/span>i<span style=\"color: #66cc66;\">]<\/span> = ds.<span style=\"color: #006600;\">read<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #66cc66;\">}<\/span>\r\n  int16_t raw = <span style=\"color: #66cc66;\">(<\/span><span style=\"color: #0066cc;\">data<\/span><span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #66cc66;\">]<\/span> <span style=\"color: #66cc66;\">&lt;&lt;<\/span> <span style=\"color: #cc66cc;\">8<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">|<\/span> <span style=\"color: #0066cc;\">data<\/span><span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">]<\/span>;<span style=\"color: #b1b100;\">if<\/span> <span style=\"color: #66cc66;\">(<\/span>type_s<span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>raw = raw <span style=\"color: #66cc66;\">&lt;&lt;<\/span> <span style=\"color: #cc66cc;\">3<\/span>;<span style=\"color: #66cc66;\">}<\/span>celsius = <span style=\"color: #66cc66;\">(<\/span>float<span style=\"color: #66cc66;\">)<\/span>raw <span style=\"color: #66cc66;\">\/<\/span> <span style=\"color: #cc66cc;\">16.0<\/span>;\r\n  <span style=\"color: #808080; font-style: italic;\">\/\/\/\/\/\/\/\/ end 18b20 \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/span>\r\n  <span style=\"color: #66cc66;\">}<\/span>\r\n  temp0 = <span style=\"color: #0066cc;\">int<\/span><span style=\"color: #66cc66;\">(<\/span>celsius<span style=\"color: #66cc66;\">)<\/span>;\r\n  temp1 = <span style=\"color: #66cc66;\">(<\/span>celsius-temp0<span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">*<\/span><span style=\"color: #cc66cc;\">100<\/span>;\r\n  <span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>reg <span style=\"color: #66cc66;\">&gt;<\/span>= celsius + gis<span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>digitalWrite<span style=\"color: #66cc66;\">(<\/span>PB7,HIGH<span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #66cc66;\">}<\/span> \r\n  <span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>reg <span style=\"color: #66cc66;\">&lt;<\/span>= celsius - gis<span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>digitalWrite<span style=\"color: #66cc66;\">(<\/span>PB7,LOW<span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #66cc66;\">}<\/span> \r\n\u00a0\r\n  word pos = ether.<span style=\"color: #006600;\">packetLoop<\/span><span style=\"color: #66cc66;\">(<\/span>ether.<span style=\"color: #006600;\">packetReceive<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n   <span style=\"color: #b1b100;\">if<\/span> <span style=\"color: #66cc66;\">(<\/span>pos<span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span> char <span style=\"color: #66cc66;\">*<\/span><span style=\"color: #0066cc;\">data<\/span> = <span style=\"color: #66cc66;\">(<\/span>char <span style=\"color: #66cc66;\">*<\/span><span style=\"color: #66cc66;\">)<\/span> Ethernet::buffer + pos;\r\n\u00a0\r\n  line = <span style=\"color: #0066cc;\">data<\/span>;\r\n  a = line.<span style=\"color: #0066cc;\">indexOf<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #ff0000;\">\"?reg=\"<\/span><span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>a<span style=\"color: #66cc66;\">&gt;<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>reg = line.<span style=\"color: #0066cc;\">substring<\/span><span style=\"color: #66cc66;\">(<\/span>a+<span style=\"color: #cc66cc;\">5<\/span>, a+<span style=\"color: #cc66cc;\">8<\/span><span style=\"color: #66cc66;\">)<\/span>.<span style=\"color: #006600;\">toInt<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;w=<span style=\"color: #cc66cc;\">1<\/span>; <span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>reg<span style=\"color: #66cc66;\">&lt;<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>reg=<span style=\"color: #cc66cc;\">0<\/span>;<span style=\"color: #66cc66;\">}<\/span><span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>reg<span style=\"color: #66cc66;\">&gt;<\/span><span style=\"color: #cc66cc;\">125<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>reg=<span style=\"color: #cc66cc;\">125<\/span>;<span style=\"color: #66cc66;\">}<\/span><span style=\"color: #66cc66;\">}<\/span>\r\n  a = line.<span style=\"color: #0066cc;\">indexOf<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #ff0000;\">\"?p=\"<\/span><span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>a<span style=\"color: #66cc66;\">&gt;<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>timer = line.<span style=\"color: #0066cc;\">substring<\/span><span style=\"color: #66cc66;\">(<\/span>a+<span style=\"color: #cc66cc;\">3<\/span>, a+<span style=\"color: #cc66cc;\">6<\/span><span style=\"color: #66cc66;\">)<\/span>.<span style=\"color: #006600;\">toInt<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;w=<span style=\"color: #cc66cc;\">1<\/span>;<span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n  ether.<span style=\"color: #006600;\">httpServerReply<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #0066cc;\">HTML<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n\u00a0\r\n  <span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>w==<span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>w=<span style=\"color: #cc66cc;\">0<\/span>;EEPROM.<span style=\"color: #006600;\">update<\/span><span style=\"color: #66cc66;\">(1<\/span><span style=\"color: #cc66cc;\">0<\/span>,reg<span style=\"color: #66cc66;\">)<\/span>;EEPROM.<span style=\"color: #006600;\">update<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">11<\/span>,timer<span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #66cc66;\">}<\/span>\r\n<span style=\"color: #66cc66;\">}<\/span><span style=\"color: #66cc66;\">}<\/span><\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ENC28J60 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u043f\u043b\u0430\u0442\u0435 Arduino \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SPI \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u0442\u0430\u043a\u0442\u043e\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u0430 ISP \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0442\u044c 20 \u041c\u0413\u0446. \u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0442\u0438 TCP\/IP \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u044a\u0451\u043c RJ-45. \u041c\u043e\u0434\u0443\u043b\u044c \u0433\u0430\u043b\u044c\u0432\u0430\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0437\u0432\u044f\u0437\u0430\u043d \u0441 \u043d\u0438\u043c. \u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u043c\u043e\u0434\u0443\u043b\u044f ENC28J60: \u0421\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0441 Ethernet \u0441\u0435\u0442\u044f\u043c\u0438 10\/100\/1000 Base-T. \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 10 \u043c\u0431\u0438\u0442\/\u0441\u0435\u043a, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f TCP\/IP \u0441\u0442\u0435\u043a\u0430. \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":76084,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[239,17],"tags":[],"class_list":["post-76083","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","category-17"],"views":5307,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/76083","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=76083"}],"version-history":[{"count":8,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/76083\/revisions"}],"predecessor-version":[{"id":111265,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/76083\/revisions\/111265"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/76084"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=76083"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=76083"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=76083"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}