{"id":92677,"date":"2021-02-14T21:48:43","date_gmt":"2021-02-14T15:48:43","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=92677"},"modified":"2022-01-08T15:05:07","modified_gmt":"2022-01-08T09:05:07","slug":"dac-tda1543-dir9001-pt2259-arduino","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=92677","title":{"rendered":"DAC TDA1543 + DIR9001 + PT2259 (Arduino)"},"content":{"rendered":"<p>\u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u0426\u0410\u041f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u0434\u043e\u0440\u043e\u0433\u0438\u0445 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u0445, \u0440\u0435\u0441\u0438\u0432\u0435\u0440 S\/PDIF \u043d\u0430 \u0431\u0430\u0437\u0435 DIR9001, \u0426\u0410\u041f \u043d\u0430 TDA1543, \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440 \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u043d\u0430 PT2259. \u0422\u0430\u043a \u043a\u0430\u043a \u0432\u0445\u043e\u0434 DIR9001 \u0438\u043c\u0435\u0435\u0442 \u0432\u0445\u043e\u0434 \u0443\u0440\u043e\u0432\u043d\u044f TTL, \u0441\u0438\u0433\u043d\u0430\u043b S\/PDIF \u043f\u043e\u0434\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 MAX485. \u0426\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440 \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u0438 PT2259 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c Arduino \u0438\u043c\u0435\u0435\u0442 79 \u0448\u0430\u0433\u043e\u0432 \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u0438, \u0440\u0435\u0436\u0438\u043c MUTE, \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c\u044e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u044d\u043d\u043a\u043e\u0434\u0435\u0440\u0430 ky-040 (\u043c\u043e\u0434\u0443\u043b\u044c), \u043a\u043d\u043e\u043f\u043a\u0430 \u044d\u043d\u043a\u043e\u0434\u0435\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u0440\u0435\u0436\u0438\u043c\u0430 MUTE. \u0423\u0440\u043e\u0432\u0435\u043d\u044c \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u043c\u0438\u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043d\u044b\u0439 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u044b\u0439 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 TM1637 (\u043c\u043e\u0434\u0443\u043b\u044c).<\/p>\n<table style=\"border-collapse: collapse; width: 100%;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"width: 50%;\"><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-02-14-212648.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-92679\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-02-14-212648.png\" alt=\"\" width=\"295\" height=\"142\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-02-14-212648.png 295w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-02-14-212648-200x96.png 200w\" sizes=\"auto, (max-width: 295px) 100vw, 295px\" \/><\/a><\/td>\n<td style=\"width: 50%;\"><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-02-14-212658.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-92678\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-02-14-212658.png\" alt=\"\" width=\"320\" height=\"160\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-02-14-212658.png 320w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-02-14-212658-200x100.png 200w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u0420\u0435\u0441\u0438\u0432\u0435\u0440 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 24-Bit I2S \u0441 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 96 \u043a\u0413\u0446. \u0426\u0410\u041f TDA1543 16 \u0431\u0438\u0442 \u0441 \u0442\u043e\u043a\u043e\u0432\u044b\u043c \u0432\u044b\u0445\u043e\u0434\u043e\u043c. \u041a\u0430\u0436\u0434\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0426\u0410\u041f\u0430 \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u041e\u0431\u0449\u0438\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 12 \u0412, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u044f\u0442\u044c \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u044b Arduino.<\/p>\n<p>\u041d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f PT2259 \u043e\u0442 4 \u0434\u043e 10 \u0412, 9 \u0412 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u043e\u0435, \u0432\u0445\u043e\u0434\u043d\u043e\u0435 \u0441\u043e\u043f\u0440\u043e\u0442\u0438\u0432\u043b\u0435\u043d\u0438\u0435 33 \u043a\u041e\u043c, \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u043f\u0440\u043e\u0442\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 6 \u043a\u041e\u043c. \u041e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\/\u0448\u0443\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 120 \u0434\u0411, \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0438\u0441\u043a\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 0.003% \u043f\u0440\u0438 \u0443\u0440\u043e\u0432\u043d\u0435 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 200mVrms.<\/p>\n<p style=\"text-align: center;\"><strong>\u0421\u0445\u0435\u043c\u0430 \u0440\u0435\u0441\u0438\u0432\u0435\u0440\u0430 \u043d\u0430 DIR9001<\/strong><\/p>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-02-14-213541.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-92680\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-02-14-213541.png\" alt=\"\" width=\"647\" height=\"523\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-02-14-213541.png 647w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-02-14-213541-200x162.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-02-14-213541-500x404.png 500w\" sizes=\"auto, (max-width: 647px) 100vw, 647px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><strong>\u0421\u0445\u0435\u043c\u0430 \u0426\u0410\u041f \u043d\u0430 TDA1543 \u0438 \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440\u0430 \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u0438 \u043d\u0430 PT2259<\/strong><\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-02-14-213709.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-92681\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-02-14-213709.png\" alt=\"\" width=\"530\" height=\"366\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-02-14-213709.png 530w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-02-14-213709-200x138.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-02-14-213709-500x345.png 500w\" sizes=\"auto, (max-width: 530px) 100vw, 530px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><strong>\u0421\u0445\u0435\u043c\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f<\/strong><\/p>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-02-14-213755.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-92682\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-02-14-213755.png\" alt=\"\" width=\"622\" height=\"537\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-02-14-213755.png 622w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-02-14-213755-200x173.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-02-14-213755-500x432.png 500w\" sizes=\"auto, (max-width: 622px) 100vw, 622px\" \/><\/a>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 Arduino Nano<\/p>\n<ul>\n<li><img loading=\"lazy\" decoding=\"async\" class=\"alignright\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/%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-2018-07-28-174033.png\" width=\"77\" height=\"79\" \/>\u042d\u043d\u043a\u043e\u0434\u0435\u0440\n<ul>\n<li>CLK &#8212; D9<\/li>\n<li>DT &#8212; D8<\/li>\n<li>SW &#8212; D10<\/li>\n<li>\u041f\u0438\u0442\u0430\u043d\u0438\u0435 +5 \u0412<\/li>\n<\/ul>\n<\/li>\n<li><img loading=\"lazy\" decoding=\"async\" class=\"alignright\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/Screenshot-21.02.2020-100758-e1582258554732.png\" width=\"115\" height=\"60\" \/>\u0418\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 TM1637\n<ul>\n<li>CLK &#8212; D2<\/li>\n<li>DIO &#8212; D3<\/li>\n<li>\u041f\u0438\u0442\u0430\u043d\u0438\u0435 +5 \u0412<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<div id=\"marketWidget\"><\/div>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 10px;\"><span style=\"color: #808080; font-style: italic;\">#include &lt;Wire.h&gt;<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;PT2259.h&gt;<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;Encoder.h&gt; \/\/ http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/05\/Encoder.zip<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;EEPROM.h&gt; \/\/ \u0412\u0445\u043e\u0434\u0438\u0442 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 Arduino IDE<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;MsTimer2.h&gt; \/\/ http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/11\/MsTimer2.zip<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;STM32_TM1637.h&gt; \/\/ http:\/\/forum.rcl-radio.ru\/misc.php?action=pan_download&amp;item=452&amp;download=1<\/span>\r\n STM32_TM1637 tm<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">2<\/span>,<span style=\"color: #cc66cc;\">3<\/span><span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #808080; font-style: italic;\">\/\/ CLK, DIO<\/span>\r\n PT2259 pt;\r\n Encoder myEnc<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">8<\/span>, <span style=\"color: #cc66cc;\">9<\/span><span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #808080; font-style: italic;\">\/\/ DT, CLK<\/span>\r\n  <span style=\"color: #0066cc;\">int<\/span> vol,w,w1,mute;\r\n  unsigned long <span style=\"color: #0066cc;\">time<\/span>,oldPosition  = -<span style=\"color: #cc66cc;\">999<\/span>,newPosition;   \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  pinMode<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">10<\/span>,INPUT<span style=\"color: #66cc66;\">)<\/span>;  <span style=\"color: #808080; font-style: italic;\">\/\/ \u041c\u0415\u041d\u042e \u041a\u041d\u041e\u041f\u041a\u0410 SW \u044d\u043d\u043a\u043e\u0434\u0435\u0440\u0430<\/span>\r\n  MsTimer2::<span style=\"color: #0066cc;\">set<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">1<\/span>, to_Timer<span style=\"color: #66cc66;\">)<\/span>;MsTimer2::<span style=\"color: #0066cc;\">start<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  <span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>EEPROM.<span style=\"color: #006600;\">read<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">100<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">!<\/span>=<span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span><span style=\"color: #b1b100;\">for<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #0066cc;\">int<\/span> i=<span style=\"color: #cc66cc;\">0<\/span>;i<span style=\"color: #66cc66;\">&lt;<\/span><span style=\"color: #cc66cc;\">101<\/span>;i++<span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>EEPROM.<span style=\"color: #006600;\">update<\/span><span style=\"color: #66cc66;\">(<\/span>i,<span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #66cc66;\">}<\/span><span style=\"color: #66cc66;\">}<\/span><span style=\"color: #808080; font-style: italic;\">\/\/ \u043e\u0447\u0438\u0441\u0442\u043a\u0430 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 <\/span>\r\n  tm.<span style=\"color: #006600;\">brig<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">7<\/span><span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u042f\u0420\u041a\u041e\u0421\u0422\u042c 0...7<\/span>\r\n  tm.<span style=\"color: #006600;\">print_float<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">0<\/span>,<span style=\"color: #cc66cc;\">0<\/span>,  0b01000000,0b01110011,0b01111000,0b01000000<span style=\"color: #66cc66;\">)<\/span>;\r\n  delay<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">2000<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  tm.<span style=\"color: #006600;\">print_float<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">2259<\/span>,<span style=\"color: #cc66cc;\">0<\/span>,  <span style=\"color: #cc66cc;\">0<\/span>,<span style=\"color: #cc66cc;\">0<\/span>,<span style=\"color: #cc66cc;\">0<\/span>,<span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  delay<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">2000<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  vol = EEPROM.<span style=\"color: #006600;\">read<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  audio<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> loop<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/\/\/\/\/\/\/\/\/ VOLUME \/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/span>\r\n <span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>newPosition <span style=\"color: #66cc66;\">!<\/span>= oldPosition<span style=\"color: #66cc66;\">&amp;&amp;<\/span>mute==<span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>oldPosition = newPosition;vol=vol+newPosition;myEnc.<span style=\"color: #006600;\">write<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">)<\/span>;newPosition=<span style=\"color: #cc66cc;\">0<\/span>;<span style=\"color: #0066cc;\">time<\/span>=millis<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;w=<span style=\"color: #cc66cc;\">1<\/span>;w1=<span style=\"color: #cc66cc;\">1<\/span>;vol_func<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>w==<span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>w=<span style=\"color: #cc66cc;\">0<\/span>;audio<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;tm.<span style=\"color: #006600;\">print_float<\/span><span style=\"color: #66cc66;\">(<\/span>vol<span style=\"color: #66cc66;\">*<\/span><span style=\"color: #cc66cc;\">10<\/span>,<span style=\"color: #cc66cc;\">0<\/span>,  0b00001000,<span style=\"color: #cc66cc;\">0<\/span>,<span style=\"color: #cc66cc;\">0<\/span>,0b00001000<span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #808080; font-style: italic;\">\/\/\/\/\/\/\/\/\/ MUTE \/\/\/\/\/\/\/\/\/\/\/\/ <\/span>\r\n  <span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>digitalRead<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">10<\/span><span style=\"color: #66cc66;\">)<\/span>==LOW<span style=\"color: #66cc66;\">&amp;&amp;<\/span>mute==<span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>mute=<span style=\"color: #cc66cc;\">1<\/span>; audio<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;tm.<span style=\"color: #006600;\">print_float<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">0<\/span>,<span style=\"color: #cc66cc;\">0<\/span>,  0b01000000,0b01000000,0b01000000,0b01000000<span style=\"color: #66cc66;\">)<\/span>;delay<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">200<\/span><span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #66cc66;\">}<\/span>\r\n  <span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>digitalRead<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">10<\/span><span style=\"color: #66cc66;\">)<\/span>==LOW<span style=\"color: #66cc66;\">&amp;&amp;<\/span>mute==<span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>mute=<span style=\"color: #cc66cc;\">0<\/span>; audio<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;w=<span style=\"color: #cc66cc;\">1<\/span>;delay<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">200<\/span><span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #808080; font-style: italic;\">\/\/\/\/\/\/\/\/\/ EEPROM \/\/\/\/\/\/\/\/\/\/\/\/\/<\/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>-time<span style=\"color: #66cc66;\">&gt;<\/span><span style=\"color: #cc66cc;\">5000<\/span> <span style=\"color: #66cc66;\">&amp;&amp;<\/span> w1==<span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>w1=<span style=\"color: #cc66cc;\">0<\/span>;EEPROM.<span style=\"color: #006600;\">update<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">0<\/span>,vol<span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #66cc66;\">}<\/span>\r\n   delay<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">10<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span><span style=\"color: #808080; font-style: italic;\">\/\/ loop<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> audio<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>\r\n pt.<span style=\"color: #006600;\">setVol_ch2<\/span><span style=\"color: #66cc66;\">(<\/span>mute, vol<span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ mute, vol<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/ mute on  === 1<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/ mute off === 0<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/ vol === -79...0 dB === int 0...79  <\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/ channel-by-channel adjustment<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/ pt.setVol_left(0, 79);<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">\/\/ pt.setVol_right(0, 79);<\/span>\r\n  <span style=\"color: #66cc66;\">}<\/span> \r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> to_Timer<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>newPosition = myEnc.<span style=\"color: #006600;\">read<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">\/<\/span><span style=\"color: #cc66cc;\">4<\/span>;<span style=\"color: #66cc66;\">}<\/span> \r\n<span style=\"color: #0066cc;\">void<\/span> vol_func<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span><span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>vol<span style=\"color: #66cc66;\">&lt;<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>vol=<span style=\"color: #cc66cc;\">0<\/span>;<span style=\"color: #66cc66;\">}<\/span><span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>vol<span style=\"color: #66cc66;\">&gt;<\/span><span style=\"color: #cc66cc;\">79<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>vol=<span style=\"color: #cc66cc;\">79<\/span>;<span style=\"color: #66cc66;\">}<\/span><span style=\"color: #66cc66;\">}<\/span><\/pre>\n<ul>\n<li><strong><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/TDA1543_.pdf\">TDA1543_.pdf<\/a><\/strong><\/li>\n<li><strong><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/02\/pt22593.pdf\">pt2259.pdf<\/a><\/strong><\/li>\n<li><strong><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/11\/MAX485.pdf\">MAX485.pdf<\/a><\/strong><\/li>\n<li><strong> <a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/11\/dir9001.pdf\">dir9001.pdf<\/a><\/strong><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u0426\u0410\u041f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u0434\u043e\u0440\u043e\u0433\u0438\u0445 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u0445, \u0440\u0435\u0441\u0438\u0432\u0435\u0440 S\/PDIF \u043d\u0430 \u0431\u0430\u0437\u0435 DIR9001, \u0426\u0410\u041f \u043d\u0430 TDA1543, \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440 \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u043d\u0430 PT2259. \u0422\u0430\u043a \u043a\u0430\u043a \u0432\u0445\u043e\u0434 DIR9001 \u0438\u043c\u0435\u0435\u0442 \u0432\u0445\u043e\u0434 \u0443\u0440\u043e\u0432\u043d\u044f TTL, \u0441\u0438\u0433\u043d\u0430\u043b S\/PDIF \u043f\u043e\u0434\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 MAX485. \u0426\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440 \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u0438 PT2259 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c Arduino \u0438\u043c\u0435\u0435\u0442 79 \u0448\u0430\u0433\u043e\u0432 \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u0438, \u0440\u0435\u0436\u0438\u043c MUTE, \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c\u044e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":92679,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[239,5],"tags":[],"class_list":["post-92677","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","category-5"],"views":4494,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/92677","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=92677"}],"version-history":[{"count":4,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/92677\/revisions"}],"predecessor-version":[{"id":111169,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/92677\/revisions\/111169"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/92679"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=92677"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=92677"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=92677"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}