{"id":161993,"date":"2012-12-09T19:51:04","date_gmt":"2012-12-09T15:51:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=161993"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=161993","title":{"rendered":"<span class=\"post_title\">\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 STM32 \u2014 \u0441 \u043c\u0435\u0441\u0442\u0430 \u0432 \u043a\u0430\u0440\u044c\u0435\u0440<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u041d\u0438\u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043d \u043c\u043e\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u043e\u043f\u044b\u0442 \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c \u0432 \u043b\u0438\u0446\u0435 <a href=\"http:\/\/www.st.com\/internet\/evalboard\/product\/250863.jsp\">STM32VLDiscovery<\/a>, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043c\u0430\u0448\u0438\u043d\u043a\u0430 \u0438\u0437 LEGO, \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u0430\u044f \u0441 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430, \u0438 \u0435\u0449\u0451 \u043a\u043e\u0435-\u0447\u0442\u043e. \u042f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u0438\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u0443\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044e, \u043d\u043e, \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u044e \u0441\u0440\u0430\u0437\u0443, \u043d\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u00ab\u043a\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u00bb. \u041f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0430 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435\u043c \u0438 \u043d\u0435 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0443. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/-IWRVoqjjs5s\/UMIKBJxzZCI\/AAAAAAAADXY\/6hVu8wRWsuE\/s625\/DSC00350.JPG\" alt=\"image\"\/><\/p>\n<h4>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435:<\/h4>\n<p>  <\/p>\n<ol>\n<li>\u041f\u0435\u0440\u0432\u044b\u0439 \u043a\u043e\u043d\u0442\u0430\u043a\u0442 \u0441 \u043c\u0438\u043a\u0440\u043e\u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u0438\u043a\u043e\u0439. <\/li>\n<li>\u0421\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u043c\u0430\u0448\u0438\u043d\u043a\u0438 \u043d\u0430 \u043d\u0435\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0445.<\/li>\n<li>\u041d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u0441 STM32. \u0421\u0440\u0435\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u043a \u043c\u0430\u0448\u0438\u043d\u043a\u0435.<\/li>\n<li>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0443\u0433\u043e\u043b \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u043f\u0435\u0440\u0435\u0434\u043d\u0438\u0445 \u043a\u043e\u043b\u0451\u0441 \u2014 \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0432\u044f\u0437\u044c \u0447\u0435\u0440\u0435\u0437 \u0410\u0426\u041f.<\/li>\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0426\u0410\u041f \u0434\u043b\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0437\u0432\u0443\u043a\u043e\u0432.<\/li>\n<\/ol>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>1. \u041f\u0435\u0440\u0432\u044b\u0439 \u043a\u043e\u043d\u0442\u0430\u043a\u0442 \u0441 \u043c\u0438\u043a\u0440\u043e\u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u0438\u043a\u043e\u0439<\/h4>\n<p>  \u041d\u0435\u0432\u0430\u0436\u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443, \u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043c\u044b\u0441\u043b\u044c: \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0435\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430. \u041a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c? \u041c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 Bluetooth, WiFi, USB \u0438 \u0442.\u0434. \u041d\u043e \u043f\u0440\u043e\u0449\u0435 \u0438 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u0435\u0439 \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0435 \u0437\u0432\u0443\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u0440\u0430\u0442\u044c \u0441 \u0432\u044b\u0445\u043e\u0434\u0430 \u043d\u0430 \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0443 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 (\u0437\u0434\u0435\u0441\u044c \u0438 \u0434\u0430\u043b\u0435\u0435 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441\u0430\u043c\u044b\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b). <br \/>  \u0417\u0432\u0443\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0438\u043d\u0442\u0435\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u0434\u043b\u044f \u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d\u0430, \u043d\u043e \u0435\u0441\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0439 \u2014 <a href=\"http:\/\/ru.wikipedia.org\/wiki\/DTMF\">DTMF<\/a>-\u0441\u0438\u0433\u043d\u0430\u043b\u044b. \u041e\u043d\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043b\u044e\u0431\u043e\u043c \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u0438 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u044b\u0445 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432 (\u043f\u0440\u0438 \u043d\u0430\u0431\u043e\u0440\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u0438\u043b\u0438 \u0432 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u043e\u043c \u043c\u0435\u043d\u044e), \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u043e\u043c \u043a\u0430\u043d\u0430\u043b\u0435.<\/p>\n<h6>\u0417\u0430\u0434\u0430\u0447\u0430 1: \u0420\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0435 DTMF-\u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432<\/h6>\n<p>  \u0418\u0437 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u043e\u0432 \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0440\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 DTMF-\u0434\u0435\u0448\u0438\u0444\u0440\u0430\u0446\u0438\u0438 (\u043c\u043e\u044f \u0438\u0434\u0435\u044f \u043d\u0435 \u043d\u043e\u0432\u0430), \u0441 \u043d\u0438\u043c\u0438 \u2014 \u0432 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u043c\u0430\u0433\u0430\u0437\u0438\u043d. \u041f\u043e\u043a\u0443\u043f\u0430\u0435\u0442\u0441\u044f:  <\/p>\n<ul>\n<li>\u0414\u0435\u0448\u0438\u0444\u0440\u0430\u0442\u043e\u0440 MT 8870DE \u2014 \u0438\u0437 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 (4 \u0431\u0438\u0442\u0430) \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d\u043d\u043e\u0439 DTMF \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 1 \u0431\u0438\u0442 \u2014 \u043d\u0430\u043b\u0438\u0447\u0438\u0435\/\u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 DTMF \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u0438\u044e \u0441\u0435\u043a\u0443\u043d\u0434\u0443 (\u043d\u0430\u0437\u043e\u0432\u0451\u043c \u0435\u0433\u043e \u00ab\u043f\u044f\u0442\u044b\u0439 \u0432\u044b\u0432\u043e\u0434\u00bb).<\/li>\n<li>\u041a\u0432\u0430\u0440\u0446\u0435\u0432\u044b\u0439 \u0440\u0435\u0437\u043e\u043d\u0430\u0442\u043e\u0440, \u043a\u043e\u043d\u0434\u0435\u043d\u0441\u0430\u0442\u043e\u0440\u044b \u0438 \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u0435\u0448\u0438\u0444\u0440\u0430\u0442\u043e\u0440\u0430.<\/li>\n<li>7-\u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043d\u044b\u0439 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u2014 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043d\u0430\u0436\u0430\u0442\u043e\u0439 \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 \u0446\u0438\u0444\u0440\u044b.<\/li>\n<li>\u041a\u0420 514\u0418\u0414-1 \u0434\u0435\u0448\u0438\u0444\u0440\u0430\u0442\u043e\u0440 \u0434\u043b\u044f 7-\u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u2014 \u0438\u0437 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 7 \u0432\u044b\u0445\u043e\u0434\u043e\u0432 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043e\u0432.<\/li>\n<li>\u041c\u0430\u043a\u0435\u0442\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0430 \u0434\u043b\u044f \u043c\u043e\u043d\u0442\u0430\u0436\u0430 \u0431\u0435\u0437 \u043f\u0430\u0439\u043a\u0438.<\/li>\n<li>\u041f\u0440\u043e\u0432\u043e\u0434\u043a\u0438\/\u043f\u0435\u0440\u0435\u043c\u044b\u0447\u043a\u0438 \u0434\u043b\u044f \u043c\u0430\u043a\u0435\u0442\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u044b.<\/li>\n<\/ul>\n<p>  \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0438\u2026 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0428\u043e\u043a.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0451 \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u043a\u043e\u0439. \u041f\u0440\u0438\u0447\u0451\u043c, \u0447\u0442\u043e\u0431\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u0430\u0448\u0438\u043d\u043a\u0438 \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u043d\u0430\u0436\u0430\u0442\u043e\u0439 \u0446\u0438\u0444\u0440\u0435: 2 \u2014 \u0432\u043f\u0435\u0440\u0451\u0434, 4 \u2014 \u0432\u043b\u0435\u0432\u043e, 6 \u2014 \u0432\u043f\u0440\u0430\u0432\u043e, 8 \u2014 \u043d\u0430\u0437\u0430\u0434.<\/p>\n<h6>\u0417\u0430\u0434\u0430\u0447\u0430 2: 4 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u0441 DTMF-\u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0438\u0437 4-\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/h6>\n<p>  \u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0439 \u0434\u0435\u0448\u0438\u0444\u0440\u0430\u0442\u043e\u0440. \u0411\u044b\u043b \u043a\u0443\u043f\u043b\u0435\u043d \u041a155\u0418\u041410 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440\u043e\u043c \u2014 4 \u0432\u0445\u043e\u0434\u0430 \u0434\u043b\u044f \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, 10 \u0432\u044b\u0445\u043e\u0434\u043e\u0432 \u0441\u0438\u043c\u0432\u043e\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u0447\u0438\u0441\u043b\u0430 \u043e\u0442 0 \u0434\u043e 9, \u043d\u0430 \u043d\u0443\u0436\u043d\u043e\u043c \u0432\u044b\u0445\u043e\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u00ab0\u00bb, \u043d\u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u2014 \u00ab1\u00bb. \u0414\u0430\u043d\u043d\u044b\u0439 \u0434\u0435\u0448\u0438\u0444\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430\u043c\u0438, \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0442\u043e\u043a \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0442\u044c 80 \u043c\u0410 (\u043b\u0430\u043c\u043f\u043e\u0447\u043a\u0438 \u043d\u0430\u043a\u0430\u043b\u0438\u0432\u0430\u043d\u0438\u044f, \u0440\u0435\u043b\u0435), \u0447\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e. \u0425\u043e\u0442\u044f \u0442\u0440\u0430\u043d\u0437\u0438\u0441\u0442\u043e\u0440\u044b \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. <\/p>\n<h6>\u0417\u0430\u0434\u0430\u0447\u0430 3: \u0421\u043c\u0435\u043d\u0430 \u043f\u043e\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043c\u043e\u0442\u043e\u0440\u043e\u0432, \u041d-\u043c\u043e\u0441\u0442<\/h6>\n<p>  \u0412\u0441\u0451 \u0434\u0435\u0442\u0441\u0442\u0432\u043e \u044f \u0441\u043e\u0431\u0438\u0440\u0430\u043b \u043c\u0430\u0448\u0438\u043d\u043a\u0438 \u0438\u0437 LEGO, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0437\u0434\u0438\u043b\u0438 \u0432\u043f\u0435\u0440\u0451\u0434-\u043d\u0430\u0437\u0430\u0434 \u0440\u0443\u0447\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u0438 \u0431\u0430\u0442\u0430\u0440\u0435\u0435\u043a (\u043d\u0430\u0431\u043e\u0440\u043e\u0432 LEGO \u0441 \u043c\u043e\u0442\u043e\u0440\u0430\u043c\u0438 \u0438 \u043f\u0443\u043b\u044c\u0442\u0430\u043c\u0438 \u0443 \u043c\u0435\u043d\u044f \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u044b\u043b\u043e \u0438 \u043d\u0435\u0442). \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u0433\u0440\u0430\u0442\u044c \u0432 \u0438\u0433\u0440\u0443\u0448\u043a\u0438 \u043f\u043e-\u0432\u0437\u0440\u043e\u0441\u043b\u043e\u043c\u0443.<br \/>  \u041d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043b\u044e\u0434\u0438 \u0434\u0435\u043b\u0430\u044e\u0442 <a href=\"http:\/\/ru.wikipedia.org\/wiki\/H_%D0%BC%D0%BE%D1%81%D1%82\">\u041d-\u043c\u043e\u0441\u0442<\/a> \u043d\u0430 \u0442\u0440\u0430\u043d\u0437\u0438\u0441\u0442\u043e\u0440\u0430\u0445. \u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0435 \u2014 \u043f\u043e\u043a\u0443\u043f\u0430\u044e\u0442 \u0433\u043e\u0442\u043e\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u044d\u0442\u0438\u0445 \u0441\u0430\u043c\u044b\u0445 \u0442\u0440\u0430\u043d\u0437\u0438\u0441\u0442\u043e\u0440\u0430\u0445. \u042f \u0441\u0434\u0435\u043b\u0430\u043b \u043d\u0430 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043c\u0430\u0433\u043d\u0438\u0442\u043d\u044b\u0445 \u0440\u0435\u043b\u0435. \u041f\u043e\u0437\u0436\u0435 \u044f \u043a\u0443\u043f\u0438\u043b \u043c\u043e\u0449\u043d\u044b\u0435 (\u043d\u0430 \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0439 \u0442\u043e\u043a \u0434\u043e 3\u0410) NPN \u0438 PNP \u0442\u0440\u0430\u043d\u0437\u0438\u0441\u0442\u043e\u0440\u044b TIP31 C ST \u0438 TIP32 C ST, \u0441\u043e\u0431\u0440\u0430\u043b \u0438\u0437 \u043d\u0438\u0445 \u044d\u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u041d-\u043c\u043e\u0441\u0442, \u043d\u043e \u043e\u043d \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u043c\u0438 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430\u043c\u0438, \u0430 \u043c\u043e\u0442\u043e\u0440 \u043a\u0440\u0443\u0442\u0438\u0442\u044c \u0431\u044b\u043b \u043d\u0435 \u0432 \u0441\u0438\u043b\u0430\u0445. \u041d\u0435 \u0437\u043d\u0430\u044e, \u043f\u043e\u0447\u0435\u043c\u0443. <\/p>\n<p>  \u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0440\u0435\u043b\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e \u0434\u0432\u0430 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0442\u043e\u0440 (\u0442\u0440\u0430\u043d\u0437\u0438\u0441\u0442\u043e\u0440\u043e\u0432 \u0438\u043b\u0438 \u0437\u0430\u043c\u044b\u043a\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0440\u0435\u043b\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e 4). \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043e\u0431\u0430 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430 \u043c\u043e\u0442\u043e\u0440\u0447\u0438\u043a\u0430 (\u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0433\u043e, \u043a\u0430\u043a \u0432 \u0438\u0433\u0440\u0443\u0448\u043a\u0430\u0445) \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u0441 \u043c\u0438\u043d\u0443\u0441\u043e\u043c. \u0415\u0441\u043b\u0438 \u043d\u0430 \u043e\u0434\u043d\u043e \u0438\u0437 \u0440\u0435\u043b\u0435 \u043f\u043e\u0434\u0430\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0441\u0438\u0433\u043d\u0430\u043b, \u043a\u043e\u043d\u0442\u0430\u043a\u0442 \u043c\u043e\u0442\u043e\u0440\u0447\u0438\u043a\u0430 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u0441\u044f \u043d\u0430 \u043f\u043b\u044e\u0441, \u043c\u043e\u0442\u043e\u0440 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u2014 \u043d\u0438 \u043f\u0440\u0438 \u043a\u0430\u043a\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u043a\u0440\u0430\u0442\u043a\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0435 \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u0435 \u043f\u043e \u0432\u0438\u043d\u0435 \u0440\u0435\u043b\u0435. \u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u2014 \u043f\u0440\u0438 \u0441\u043d\u044f\u0442\u0438\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u0441 \u0440\u0435\u043b\u0435 \u043c\u043e\u0442\u043e\u0440 \u0437\u0430\u043a\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0442\u043e\u0440\u043c\u043e\u0437\u043e\u043c. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u2014 \u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u0440\u0435\u043b\u0435, \u0437\u0430\u043c\u044b\u043a\u0430\u044e\u0449\u0435\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043c\u043e\u0442\u043e\u0440\u0430 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043c\u044b\u043a\u0430\u0442\u044c \u0438 \u0435\u0433\u043e \u0442\u043e\u0436\u0435, \u0434\u043b\u044f \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0433\u043e \u0445\u043e\u0434\u0430 \u2014 \u0440\u0430\u0437\u043c\u044b\u043a\u0430\u0442\u044c, \u0434\u043b\u044f \u00ab\u0442\u043e\u0440\u043c\u043e\u0436\u0435\u043d\u0438\u044f\u00bb \u2014 \u0441\u043d\u043e\u0432\u0430 \u0437\u0430\u043c\u044b\u043a\u0430\u0442\u044c. \u042d\u0442\u043e \u0440\u0435\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u043f\u043e\u0437\u0436\u0435.<\/p>\n<h6>\u0417\u0430\u0434\u0430\u0447\u0430 4: \u0421\u043e\u0431\u0440\u0430\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u043a\u0443<\/h6>\n<p>  \u041c\u043e\u0442\u043e\u0440\u043e\u0432 \u0432 \u043c\u0430\u0448\u0438\u043d\u043a\u0435 \u0434\u0432\u0430: \u043e\u0434\u0438\u043d \u0447\u0435\u0440\u0435\u0437 LEGO\u0432\u0441\u043a\u0438\u0439 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b \u043a\u0440\u0443\u0442\u0438\u0442 \u0437\u0430\u0434\u043d\u0438\u0435 \u043a\u043e\u043b\u0451\u0441\u0430, \u0432\u0442\u043e\u0440\u043e\u0439 \u2014 \u043f\u043e\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u043d\u0438\u0435. \u041f\u043b\u0430\u0441\u0442\u043c\u0430\u0441\u0441\u043e\u0432\u044b\u0435 \u0448\u0435\u0441\u0442\u0435\u0440\u043d\u0438 \u0432 \u0440\u0435\u0434\u0443\u043a\u0442\u043e\u0440\u0430\u0445 \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u041a\u041f\u0414, \u043d\u043e \u0432\u0441\u0451 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. <\/p>\n<p>  \u0421\u0442\u0430\u0432\u0438\u043c \u043d\u0430 \u043f\u043b\u0430\u0442\u0443 4 \u0440\u0435\u043b\u0435. \u041c\u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438, \u0447\u0442\u043e \u043c\u0430\u043a\u0435\u0442\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0430 \u043d\u0435 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0442\u043e\u043a\u0438 (\u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0442\u043e\u0440 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442 \u043f\u043e 1-1,6 \u0410), \u043d\u043e \u0435\u0441\u043b\u0438 \u044f \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0435 \u0441\u0440\u043e\u043a\u0438, \u043f\u0440\u043e\u0435\u043a\u0442 \u0440\u0438\u0441\u043a\u0443\u0435\u0442 \u043e\u0441\u0442\u0430\u0442\u044c\u0441\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u044b\u043c \u0432\u043e\u0437\u0434\u0443\u0448\u043d\u044b\u043c \u0437\u0430\u043c\u043a\u043e\u043c. \u041a\u0441\u0442\u0430\u0442\u0438, \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043b\u044e\u0431\u043e\u0433\u043e \u0440\u0435\u043b\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u043e \u0431\u0440\u043e\u0441\u043a\u0438 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b\u043e \u043a \u0437\u0430\u0446\u0438\u043a\u043b\u0438\u0432\u0430\u043d\u0438\u044e \u0438 \u0441\u0431\u043e\u044f\u043c \u0432 \u0440\u0430\u0431\u043e\u0442\u0435. \u041d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u044d\u0442\u043e \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0441\u0445\u0435\u043c\u0430\u043c\u0438, \u043d\u043e \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u0438\u0442\u0430\u043b \u043c\u043e\u0442\u043e\u0440\u044b \u043e\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u0441 \u0431\u0430\u0442\u0430\u0440\u0435\u0439\u043a\u0430\u043c\u0438.<\/p>\n<p>  \u042d\u043b\u0435\u043a\u0442\u0440\u043e\u043c\u0430\u0433\u043d\u0438\u0442\u043d\u044b\u0435 \u0440\u0435\u043b\u0435, \u0434\u0432\u0430 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u2014 \u043d\u0435 \u043c\u043d\u043e\u0433\u043e\u0432\u0430\u0442\u043e \u043b\u0438 \u0445\u0430\u0440\u0434\u043a\u043e\u0440\u0430? \u0414\u0430\u043b\u044c\u0448\u0435 \u0431\u043e\u043b\u044c\u0448\u0435!<\/p>\n<p>  \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0441\u0451 \u044d\u0442\u043e \u043a \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u043c\u0443 \u0434\u0435\u0448\u0438\u0444\u0440\u0430\u0442\u043e\u0440\u0443. \u041d\u0443\u0436\u043d\u044b\u0435 \u0432\u044b\u0432\u043e\u0434\u044b \u043a \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u0430\u043c 4-\u0445 NPN-\u0442\u0440\u0430\u043d\u0437\u0438\u0442\u043e\u0440\u043e\u0432 BC547, \u043a \u0431\u0430\u0437\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0438\u0433\u043d\u0430\u043b \u0441 DTMF-\u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u0436\u0430\u0442\u0430 \u043a\u043b\u0430\u0432\u0438\u0448\u0430 (\u00ab\u043f\u044f\u0442\u044b\u0439 \u0432\u044b\u0432\u043e\u0434\u00bb), \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440\u044b \u2014 \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0438\u0437 \u0440\u0435\u043b\u0435. \u041a\u0440\u0438\u0432\u043e, \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/-CKrha4frKdE\/UMIKbflBt4I\/AAAAAAAADYE\/7SBgBdTz_UE\/s625\/DSC00333.JPG\" alt=\"image\"\/><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/-iswmJ90ae8o\/UMIKiQLuJZI\/AAAAAAAADYs\/GwYBLfp3VaA\/s625\/DSC00335.JPG\" alt=\"image\"\/><\/p>\n<p>  <iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"http:\/\/www.youtube.com\/embed\/ltE-U0UD-is\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<h4>2. \u0421\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u043c\u0430\u0448\u0438\u043d\u043a\u0438 \u043d\u0430 \u043d\u0435\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0445<\/h4>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u043c\u0430\u0448\u0438\u043d\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0443\u043c\u0435\u0442\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0435\u0445\u0430\u0442\u044c \u0438 \u043f\u043e\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c. \u041b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0446\u0438\u0444\u0440\u044b 1, 3, 7, 9, \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u043e \u0434\u0432\u0430 \u0440\u0435\u043b\u0435. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u044f \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0434\u0438\u043e\u0434\u043e\u0432 \u043e\u0442 \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u043e\u0432 \u0442\u0440\u0430\u043d\u0437\u0438\u0441\u0442\u043e\u0440\u043e\u0432 \u043a \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u043c\u0443 \u0434\u0435\u0448\u0438\u0444\u0440\u0430\u0442\u043e\u0440\u0443, \u043d\u043e \u044d\u0442\u043e \u0432\u0441\u0451 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u0421\u0435\u0439\u0447\u0430\u0441 \u0434\u043e \u043c\u0435\u043d\u044f \u0434\u043e\u0445\u043e\u0434\u0438\u0442, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0439 \u0434\u0435\u0448\u0438\u0444\u0440\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u0451\u0442 \u00ab0\u00bb, \u0442\u043e \u043d\u0443\u0436\u0435\u043d PNP \u0442\u0440\u0430\u043d\u0437\u0438\u0441\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u044d\u0442\u0438\u043c \u00ab\u043d\u0443\u043b\u0451\u043c\u00bb \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f. \u041d\u043e \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e NPN.<\/p>\n<h6>\u0417\u0430\u0434\u0430\u0447\u0430 5: \u041c\u0430\u0448\u0438\u043d\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0435\u0445\u0430\u0442\u044c \u0438 \u043f\u043e\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 1, 3, 7 \u0438\u043b\u0438 9<\/h6>\n<p>  \u0412 \u0446\u0435\u043b\u044f\u0445 \u0440\u0430\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f\/\u043e\u0441\u0432\u043e\u0435\u043d\u0438\u044f\/\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u0443\u043f\u043b\u0435\u043d\u044b \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b 4-\u0418, 4-\u0418\u041b\u0418, \u041d\u0415, \u0418-\u041d\u0415, \u0418\u041b\u0418-\u041d\u0415, \u0418 \u043f\u043e \u043e\u0434\u043d\u043e\u0439 \u0448\u0442\u0443\u043a\u0435. \u041f\u0435\u0440\u0432\u0430\u044f \u0436\u0435 \u043c\u044b\u0441\u043b\u044c \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434\u044b \u0441 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u0434\u0435\u0448\u0438\u0444\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u00ab\u043f\u044f\u0442\u044b\u0439 \u0432\u044b\u0432\u043e\u0434\u00bb \u0441 DTMF-\u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 \u0432 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0445\u0435\u043c\u0435, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432 \u0438\u0442\u043e\u0433\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0442\u0440\u0430\u043d\u0437\u0438\u0441\u0442\u043e\u0440\u044b (\u0430 \u0447\u0435\u0440\u0435\u0437 \u043d\u0438\u0445 \u2014 \u0440\u0435\u043b\u0435). \u041d\u043e! \u0414\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0439 \u0434\u0435\u0448\u0438\u0444\u0440\u0430\u0442\u043e\u0440 \u041a155\u0418\u041410 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u00ab\u0435\u0434\u0438\u043d\u0438\u0446\u044b\u00bb \u0432\u044b\u0434\u0430\u0451\u0442 2 \u0441 \u0447\u0435\u043c-\u0442\u043e \u0412\u043e\u043b\u044c\u0442\u0430. \u041d\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u0438\u043c\u0435\u0432\u0448\u0438\u0445\u0441\u044f \u0432 \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0438 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0442\u0430\u043a\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u0437\u0430 \u00ab\u0435\u0434\u0438\u043d\u0438\u0446\u0443\u00bb \u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u043b. \u041a\u0440\u043e\u043c\u0435 4-\u0418 (\u041a\u04201533). \u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u00ab\u0433\u043e\u043b\u044b\u0435\u00bb 4 \u0431\u0438\u0442\u0430 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0441 DTMF-\u0430, \u0442\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0443\u044e\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0443 \u0438\u0437 \u0438\u043c\u0435\u044e\u0449\u0438\u0445\u0441\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u043e\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c. \u041d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0436\u0435 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0439 \u0434\u0435\u0448\u0438\u0444\u0440\u0430\u0442\u043e\u0440 \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u043b \u0431\u044b \u0437\u0430\u0434\u0430\u0447\u0443 \u0432\u043e \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437. \u0410 \u0442\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0442\u0430\u043a\u043e\u0435 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0435 \u0438\u0437\u0434\u0435\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u2014 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u044f\u0436\u0435\u043b\u043e, \u043d\u043e \u0432\u0435\u0434\u044c \u043c\u043e\u0436\u043d\u043e \u0436\u0435! (\u0418\u0434\u0435\u044f \u043b\u0435\u0447\u044c \u0441\u043f\u0430\u0442\u044c \u0438 \u0443\u0442\u0440\u043e\u043c \u0441\u044a\u0435\u0437\u0434\u0438\u0442\u044c \u0437\u0430 \u0434\u0435\u0442\u0430\u043b\u044f\u043c\u0438 \u0431\u044b\u043b\u0430 \u043e\u0442\u0432\u0435\u0440\u0433\u043d\u0443\u0442\u0430).<\/p>\n<p>  \u041f\u043e\u043c\u043d\u044f, \u0447\u0442\u043e \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0439 \u0434\u0435\u0448\u0438\u0444\u0440\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u0451\u0442 \u0441\u0432\u043e\u044e \u00ab\u043d\u0435\u0434\u043e\u0435\u0434\u0438\u043d\u0438\u0446\u0443\u00bb \u043d\u0430 \u0432\u0441\u0435 \u0432\u044b\u0432\u043e\u0434\u044b, \u043a\u0440\u043e\u043c\u0435 \u0432\u044b\u0432\u043e\u0434\u0430 \u0441 \u0434\u0435\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c, \u0434\u0435\u043b\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435. <br \/>  \u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439\u2026 \u043c\u2026 \u043a\u0432\u0430\u0440\u0442\u0435\u0442 \u0432\u0445\u043e\u0434\u043e\u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 4-\u0418 \u043f\u043e\u0434\u0430\u0451\u043c \u0447\u0438\u0441\u043b\u0430 1, 2, 3 \u0438 \u00ab\u0435\u0434\u0438\u043d\u0438\u0446\u0443\u00bb; \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u2014 7, 8, 9 \u0438 \u00ab\u0435\u0434\u0438\u043d\u0438\u0446\u0443\u00bb. \u0421 \u0432\u044b\u0445\u043e\u0434\u0430 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u00ab\u043d\u043e\u043b\u044c\u00bb, \u0435\u0441\u043b\u0438 \u043d\u0430\u0436\u0430\u0442\u0430 \u0431\u044b\u043b\u0430 1, 2 \u0438\u043b\u0438 3 (\u043c\u0430\u0448\u0438\u043d\u043a\u0430 \u0435\u0434\u0435\u0442 \u0432\u043f\u0435\u0440\u0451\u0434), \u0441 \u0432\u044b\u0445\u043e\u0434\u0430 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u2014 \u0435\u0441\u043b\u0438 7, 8, 9 (\u043d\u0430\u0437\u0430\u0434). \u0418\u043d\u0430\u0447\u0435 \u043e\u0431\u0430 \u0432\u044b\u0445\u043e\u0434\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 4-\u0418 \u2014 \u00ab\u0435\u0434\u0438\u043d\u0438\u0446\u044b\u00bb.<br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u044b. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c 5 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0445\u0438\u0442\u0440\u0443\u044e \u0441\u0445\u0435\u043c\u0443. \u041e\u0442 \u0446\u0438\u0444\u0440 4 \u0438 6 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f (\u0437\u0430\u0447\u0435\u043c \u043d\u0430 \u043c\u0435\u0441\u0442\u0435 \u043f\u043e\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u043b\u0451\u0441\u0430?!), \u043d\u043e \u0434\u0430\u0436\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0445\u0435\u043c\u044b \u0434\u043b\u044f \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u043e\u0432 \u043e\u0434\u043d\u0438\u043c\u0438 \u0442\u043e\u043b\u044c\u043a\u043e 1 \u0438 7 (\u043d\u0430\u043b\u0435\u0432\u043e), 3 \u0438 9 (\u043d\u0430\u043f\u0440\u0430\u0432\u043e) \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u0438\u0437\u0440\u044f\u0434\u043d\u043e \u043d\u0430\u043f\u0440\u044f\u0447\u044c\u0441\u044f.<\/p>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435, \u043d\u0430 \u043f\u043b\u0430\u0442\u0435 (\u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043a\u0443\u043f\u0438\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u043d\u0443, \u043f\u043e\u0431\u043e\u043b\u044c\u0448\u0435) DTMF-\u0434\u0435\u043a\u043e\u0434\u0435\u0440, \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440, \u0434\u0435\u0448\u0438\u0444\u0440\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u043d\u0435\u0433\u043e, \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0439 \u0434\u0435\u0448\u0438\u0444\u0440\u0430\u0442\u043e\u0440, 4-\u0418, \u041d\u0415, 4-\u0418\u041b\u0418, \u0418\u041b\u0418-\u041d\u0415, \u0418-\u041d\u0415, 4 \u0442\u0440\u0430\u043d\u0437\u0438\u0441\u0442\u043e\u0440\u0430, 4 \u0440\u0435\u043b\u0435. <br \/>  \u041c\u0430\u0448\u0438\u043d\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442 6 \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434, \u043d\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u043d\u0438\u0435 \u043a\u043e\u043b\u0451\u0441\u0430 \u043d\u0430 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0443 \u043d\u0435 \u0443\u043c\u0435\u0435\u0442. \u041a\u041f\u0414 LEGO\u0432\u0441\u043a\u0438\u0445 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0438 \u043c\u0430\u043b\u0430\u044f \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0442\u043e\u0440\u0447\u0438\u043a\u0430 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u043d\u0443\u044e \u043f\u0440\u0443\u0436\u0438\u043d\u0443 \u0438\u043b\u0438 \u0440\u0435\u0437\u0438\u043d\u043a\u0443. <br \/>  \u0420\u0435\u043b\u0435 \u0438\u043d\u043e\u0433\u0434\u0430 \u0446\u043e\u043a\u0430\u044e\u0442 \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437, \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u043d\u0435 \u044f\u0441\u043d\u044b (\u043f\u043e\u043c\u0435\u0445\u0438?). <br \/>  \u041b\u043e\u0433\u0438\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043b\u043e\u0433\u0438\u043a\u043e\u0439 \u043e\u0441\u0432\u043e\u0435\u043d\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/-kVlwT7f1RTk\/UMIKbdk3zVI\/AAAAAAAADYA\/5xDX-IjVI8E\/s625\/DSC00343.JPG\" alt=\"image\"\/><\/p>\n<h4>3. \u041d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u0441 STM32<\/h4>\n<p>  \u0421\u0440\u0435\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<br \/>  \u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043e\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0432\u043e\u0434\u043a\u0430\u043c\u0438 \u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043a\u043e\u0434\u043e\u043c. \u041e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u0445\/\u0447\u0438\u043f\u0430\u0445 \u044f \u0438\u043c\u0435\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043c\u0443\u0442\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0447\u0442\u043e Raspberry Pi \u2014 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043e\u0449\u043d\u043e, Arduino \u2014 \u0434\u043e\u0440\u043e\u0433\u043e \u0438 \u043d\u0435 \u043a\u043e\u043c\u0438\u043b\u044c\u0444\u043e. \u0422\u0443\u0442-\u0442\u043e \u043f\u0440\u043e\u0434\u0430\u0432\u0435\u0446 \u041c\u0438\u0445\u0430\u0438\u043b \u0438 \u0432\u044b\u043f\u0438\u0441\u0430\u043b \u043c\u043d\u0435 STM32VLDiscovery \u0437\u0430 579 \u0440\u0443\u0431\u043b\u0435\u0439. \u041e \u043d\u0451\u043c <a href=\"http:\/\/habrahabr.ru\/post\/123791\/\">\u0437\u0434\u0435\u0441\u044c<\/a> \u0438 <a href=\"http:\/\/cxem.net\/mc\/mc131.php\">\u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0434\u0435\u0441\u044c<\/a> \u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u043b\u0438, \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043c\u043e\u0433\u0430\u043b\u043e \u043c\u043d\u0435 \u0432 \u0435\u0433\u043e \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438.<\/p>\n<p>  \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0442\u043a\u043d\u0443\u0442\u044c \u0432 \u043c\u0430\u043a\u0435\u0442\u043d\u0443\u044e \u043f\u043b\u0430\u0442\u0443, \u043d\u043e \u043d\u0435 \u0432 \u043b\u044e\u0431\u0443\u044e. 6 \u043d\u043e\u0436\u0435\u043a \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0441\u0442\u0430\u043d\u0443\u0442\u0441\u044f \u0432\u0438\u0441\u0435\u0442\u044c \u2014 \u0431\u0435\u0437 \u043d\u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c, \u0431\u043b\u0430\u0433\u043e \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0435\u0449\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043b\u0438\u0442\u043e\u0439 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u043d\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u044f \u043f\u043b\u0430\u0442\u0443 \u043e\u0442 mini-USB \u0448\u043d\u0443\u0440\u0430, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u043e\u043f\u0430\u043b\u0430 \u0432 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e. \u0418 \u043f\u0438\u0442\u0430\u0442\u044c\u0441\u044f \u043c\u043e\u0436\u043d\u043e \u043e\u0442 \u043d\u0435\u0433\u043e \u0436\u0435.<\/p>\n<p>  \u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0441\u0440\u0435\u0434\u0430 <a href=\"http:\/\/www.coocox.org\/CooCox_CoIDE.htm\">CoIDE<\/a> \u043e\u0442 CooCox, \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0432\u0448\u0430\u044f \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0430\u043d\u0446\u0430 \u0441 \u0431\u0443\u0431\u043d\u0430\u043c\u0438 \u2014 \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443. \u041f\u0440\u0430\u0432\u0434\u0430, \u0437\u0430\u043b\u0438\u0432\u0430\u0442\u044c \u0438\u0437 \u043d\u0435\u0451 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 \u0432 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0443 \u043c\u0435\u043d\u044f \u0442\u0430\u043a \u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u2014 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f ST-LINK Utility \u043e\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u043f\u043b\u0430\u0442\u044b. <a href=\"http:\/\/we.easyelectronics.ru\/STM32\/sublime-text-2-kak-ide-dlya-stm32.html\">\u0413\u043e\u0432\u043e\u0440\u044f\u0442<\/a>, \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u044f\u043c\u043e \u0438\u0437 \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e Sublime Text 2, \u043d\u043e \u0434\u043b\u0438\u043d\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e\u0441\u0435\u043b\u0438\u043b\u0430 \u0432 \u043c\u0435\u043d\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0441\u043a\u0435\u043f\u0441\u0438\u0441\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f, \u0447\u0442\u043e \u043d\u0430 \u0421\u0438 \u044f \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0438\u0441\u0430\u043b, \u0434\u0430\u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0435 \u043c\u0438\u0433\u0430\u043d\u0438\u044f \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430\u043c\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u0438 \u0443 \u043c\u0435\u043d\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0435\u043d\u0438\u044f. \u0412\u0434\u043e\u0431\u0430\u0432\u043e\u043a, \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b, 16-\u0440\u0438\u0447\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430, \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u0435\u0436\u0438\u043c\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u044b\u0445\u043e\u0434\u043e\u0432 \u0438 \u0432\u0445\u043e\u0434\u043e\u0432 \u0434\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u043f\u043b\u043e\u0445\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u044e\u0449\u0435\u0433\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u0430\u2026 \u041d\u043e \u043c\u0435\u0442\u043e\u0434 \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0430 \u0447\u044c\u0438\u0445-\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0434\u0435\u043b\u0430\u043b \u0441\u0432\u043e\u0451 \u0434\u0435\u043b\u043e. \u0412 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0446\u0435\u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0437\u0430\u043c\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u044f \u0442\u0430\u043a \u0438 \u043d\u0435 \u043f\u043e\u043d\u044f\u043b, \u043d\u0430\u0434\u043e \u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u0443\u044e \u043d\u043e\u0436\u043a\u0443 GND \u043a \u0437\u0435\u043c\u043b\u0435 \u0438 \u043d\u0435 \u0432\u0440\u0435\u0434\u043d\u043e \u043b\u0438 \u043f\u0438\u0442\u0430\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043e\u0442 4-\u0445 \u043f\u0430\u043b\u044c\u0447\u0438\u043a\u043e\u0432\u044b\u0445 \u0431\u0430\u0442\u0430\u0440\u0435\u0435\u043a \u2014 \u043f\u043e\u043a\u0430 \u0432\u0441\u0451 \u0436\u0438\u0432\u043e \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>  \u0411\u043b\u0438\u0436\u0435 \u043a \u043a\u043e\u0434\u0443. \u041f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0437\u0434\u0435\u0441\u044c \u0447\u0443\u0436\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0435 \u0431\u0443\u0434\u0443, \u043d\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043d\u0430 \u0432\u0430\u0448 \u0441\u0443\u0434 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u0438\u0445 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043e\u043a. \u041e\u043d\u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u043b\u0438\u0441\u044c \u0432 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u0432 \u0421\u0435\u0442\u0438 \u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u043e\u0435 \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<h6>\u0417\u0430\u0434\u0430\u0447\u0430 6: \u0417\u0430\u0434\u0435\u0440\u0436\u043a\u0430<\/h6>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u043c \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434, \u0430 \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0435\u0433\u043e \u043f\u043e\u0433\u0430\u0441\u0438\u0442\u044c. \u0417\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043f\u0443\u0441\u0442\u044b\u043c \u0446\u0438\u043a\u043b\u043e\u043c, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u043c\u0441\u044f \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437. \u0421\u043f\u043e\u0441\u043e\u0431 \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e \u043f\u0440\u043e\u0441\u0442, \u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043c, \u0433\u0434\u0435 \u043a\u0440\u043e\u043c\u0435 \u043c\u0438\u0433\u0430\u043d\u0438\u044f \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430 \u043e\u0442 \u043f\u043b\u0430\u0442\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0435\u0440\u0432\u0430\u0442\u044c \u0446\u0438\u043a\u043b \u0442\u043e\u043b\u044c\u043a\u043e, \u043f\u0440\u043e\u0441\u0442\u0438\u0442\u0435, \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435\u043c (\u043e \u043d\u0438\u0445 \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435) \u0438\u043b\u0438 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u0446\u0438\u043a\u043b\u0430. \u0418\u043d\u0430\u0447\u0435 \u043f\u043b\u0430\u0442\u0430 \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0438 \u043d\u0438 \u043d\u0430 \u0447\u0442\u043e \u043d\u0435 \u0440\u0435\u0430\u0433\u0438\u0440\u0443\u0435\u0442, \u043f\u043e\u043a\u0430 \u0434\u043b\u0438\u0442\u0441\u044f \u044d\u0442\u043e\u0442 \u0446\u0438\u043a\u043b. <\/p>\n<p>  \u0427\u0442\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u044f: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0430\u0448 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0441\u0440\u0430\u0437\u0443 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0437\u0430\u0434\u0435\u0440\u0436\u0435\u043a, \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u043e\u0445\u043e\u0434 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 (\u043d\u0430\u0437\u043e\u0432\u0451\u043c \u0435\u0451 \u00abx\u00bb). \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0432\u0435\u043b\u0438\u0447\u0438\u043d, \u0432 \u0442\u0435\u043b\u0435 \u0446\u0438\u043a\u043b\u0430 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f (\u0438\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u0434\u043d\u043e). \u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u2014 \u043c\u044b \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043d\u0435 \u0437\u043d\u0430\u0435\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u043b\u0438\u0442\u044c\u0441\u044f \u0442\u0430\u043a\u0430\u044f \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u0438 \u043d\u0435\u0432\u0430\u0436\u043d\u043e \u2014 \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u0435\u043c \u044d\u043c\u043f\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0443\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f. <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">int main(void) { \tunsigned int x=0; \tchar something;  \twhile(1) \t{ \t\tif (x&gt;5000) \t\t{ \t\t\t\/\/ \u043a\u043e\u0434 \t\t}; \t\tif (x==10000) \t\t{ \t\t\t\/\/ \u0414\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u0434. \u0421\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043e\u0431\u043d\u0443\u043b\u0438\u043c x. \t\t}; \t\tif (something==1)\/\/ \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \t\t{ \t\t\tx=0; \/\/ \u041d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0446\u0438\u043a\u043b\u0430 \u0432\u0441\u0451 \u043d\u0430\u0447\u043d\u0451\u0442\u0441\u044f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \t\t} \t\tif (x&lt;15000) \t\t{ \t\t\tx++;  \t\t}; \/\/ \u0427\u0442\u043e\u0431\u044b x \u043d\u0435 \u043f\u0440\u043e\u0448\u0451\u043b \u0440\u0430\u043d\u043e \u0438\u043b\u0438 \u043f\u043e\u0437\u0434\u043d\u043e \u0447\u0435\u0440\u0435\u0437 0, \u043f\u0440\u0435\u043a\u0440\u0430\u0449\u0430\u0435\u043c \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e x \u043f\u043e\u0441\u043b\u0435 15000. \t}; }; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<h6>\u0417\u0430\u0434\u0430\u0447\u0430 7: \u041f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c<\/h6>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u043c\u044b \u043d\u0435 \u043c\u0435\u043d\u044f\u043b\u0438 \u043a\u0432\u0430\u0440\u0446\u0435\u0432\u044b\u0439 \u0440\u0435\u0437\u043e\u043d\u0430\u0442\u043e\u0440, \u0438 \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u043e\u0441\u0442\u0430\u043b\u0430\u0441\u044c 24 \u041c\u0413\u0446. \u0421\u043e\u0437\u0434\u0430\u0432 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 2400-\u0433\u043e \u043e\u0442\u0441\u0447\u0451\u0442\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 TIM6_DAC_IRQHandler (\u044d\u0442\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f) \u0441 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 100 \u0413\u0446 \u2014 \u043a\u0430\u0436\u0434\u044b\u0435 10 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434. \u041f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435 \u043a\u043e\u0434 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0433\u0434\u0435-\u0442\u043e \u0432\u0437\u044f\u0442.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">unsigned int ti=0; int main(void) {   \/\/\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u043e\u0440\u0442 \u0421 \u0438 \u0442\u0430\u0439\u043c\u0435\u0440 6 \tRCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM6,ENABLE); \tTIM6-&gt;PSC = 24000 - 1; \/\/ \u0422\u0430\u0439\u043c\u0435\u0440 \u0442\u0438\u043a\u0430\u0435\u0442 1000 \u0440\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \tTIM6-&gt;ARR = 10 - 1; \/\/ \u041f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 10-\u0439 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u0435 \tTIM6-&gt;DIER |= TIM_DIER_UIE; \/\/ \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u043e\u0442 \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \tTIM6-&gt;CR1 |= TIM_CR1_CEN; \/\/ \u041d\u0430\u0447\u0430\u0442\u044c \u043e\u0442\u0441\u0447\u0451\u0442! \tNVIC_EnableIRQ(TIM6_DAC_IRQn); \/\/ \u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 TIM6_DAC_IRQn \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f };  \/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f TIM6_DAC void TIM6_DAC_IRQHandler(void) { \tti++; \tTIM6-&gt;SR &= ~TIM_SR_UIF; \/\/\u0421\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u0444\u043b\u0430\u0433 \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0446\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e ti, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u0447\u043d\u043e \u043a\u0430\u0436\u0434\u044b\u0435 10 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434. \u0412\u0441\u043a\u043e\u0440\u0435 \u044f \u0432\u044b\u044f\u0441\u043d\u0438\u043b, \u0447\u0442\u043e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u00ab\u0432\u043a\u043b\u0438\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f\u00bb \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043a\u0430\u0437\u0438\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 ti, \u0442. \u043a. \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043e\u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f. \u041c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u043d\u043d\u043e\u0439 ti, \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u0440\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u0447\u0430\u0441\u0442\u044c \u043d\u043e\u0432\u043e\u0433\u043e. \u0421\u0440\u0435\u0434\u0438 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0432 \u0421\u0435\u0442\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u044f \u0432\u044b\u0434\u0435\u043b\u0438\u043b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435:  <\/p>\n<ul>\n<li>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 (\u043e\u043d\u0438 \u043d\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u044e\u0442\u0441\u044f) \u2014 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 int \u0442\u0430\u043a\u043e\u0432\u043e\u0439 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f, \u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u00ab\u0434\u043b\u0438\u043d\u043d\u044b\u0439\u00bb \u0442\u0438\u043f;<\/li>\n<li><a href=\"http:\/\/we.easyelectronics.ru\/STM32\/atomarnye-operacii-v-cortex-m3.html\">\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435<\/a> \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u0432\u044b\u044f\u0441\u043d\u0435\u043d\u0438\u044f, \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u043e \u043b\u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u0437\u0430 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u2014 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u043e \u0438 \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043f\u043e\u043d\u044f\u0442\u043d\u043e (\u0434\u043b\u044f \u043c\u0435\u043d\u044f); <\/li>\n<li>\u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b&#8230;<\/li>\n<\/ul>\n<p>  \u042f \u0440\u0435\u0448\u0438\u043b \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0442\u0430\u043a. \u041f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 sti \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0449\u0443\u044e\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e ti \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u043e\u043d\u0430 \u043d\u0435 \u00ab\u043f\u0440\u0438\u0441\u0432\u043e\u0438\u043b\u0430\u0441\u044c\u00bb. \u041c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u00ab\u043b\u044e\u0444\u0442\u00bb, \u0435\u0441\u043b\u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043d\u0435\u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u0430.<\/p>\n<pre><code class=\"cpp\">do  { \tsti=ti; } while (ti&gt;1+sti); <\/code><\/pre>\n<p>  \u0421\u0430\u043c\u0430 \u043f\u043e \u0441\u0435\u0431\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f sti \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0438\u0448\u044c \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0446\u0438\u043a\u043b\u044b \u0432\u0435\u0437\u0434\u0435, \u0433\u0434\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 ti.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0437\u0431\u043e\u044f\u0437\u043d\u0435\u043d\u043d\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 sti \u0438 \u0434\u0430\u0436\u0435 \u043e\u0431\u043d\u0443\u043b\u044f\u0442\u044c \u0435\u0451. \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0432\u0441\u0451 \u044d\u0442\u043e \u0434\u043b\u044f \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u0430\u0448\u0438\u043d\u043a\u0435 \u043f\u043e\u0434\u0430\u0451\u0442\u0441\u044f \u0442\u0430 \u0438\u043b\u0438 \u0438\u043d\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u043c\u0430\u0448\u0438\u043d\u043a\u0430 \u043c\u043e\u0433\u043b\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u043c\u0430\u0440\u0448\u0440\u0443\u0442. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e\u0431\u043d\u0443\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043d\u0435 \u043f\u0440\u043e\u043f\u0430\u0441\u0442\u044c \u0434\u0430\u0440\u043e\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043a\u043e\u043d\u0446\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043d\u0435\u0445\u0438\u0442\u0440\u044b\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cpp\">if (sti==0) { \tdo  \t{ \t\tti=0; \t} while (ti&gt;1); } <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0432\u044b\u0445\u043e\u0434\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f ti \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u0438 \u0431\u0443\u0434\u0435\u0442 \u00ab\u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430\u00bb \u0432 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u043c \u0432\u0438\u0434\u0435, \u0446\u0438\u043a\u043b \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0441\u044f. \u0427\u0435\u043c \u0432\u044b\u0448\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439, \u0442\u0435\u043c \u0447\u0430\u0449\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u0446\u0438\u043a\u043b\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u043e \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0440\u0430\u0437\u0430. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0435\u0441\u043b\u0438 \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0432\u044b\u0441\u043e\u043a\u0430, \u0437\u0430\u0446\u0438\u043a\u043b\u0438\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u0437\u0430\u0441\u0442\u0430\u0432\u044f\u0442 \u0441\u0435\u0431\u044f \u0436\u0434\u0430\u0442\u044c. \u0414\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043d\u0435\u0443\u0434\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u044f \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u044b.<\/p>\n<h6>\u0417\u0430\u0434\u0430\u0447\u0430 8: \u0421\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u044b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0438\u0441\u043f\u043b\u0435\u044f<\/h6>\n<p>  \u0418\u043d\u043e\u0433\u0434\u0430 \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u044f \u0438\u043b\u0438 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u043f\u043e\u0434 \u0440\u0443\u043a\u043e\u0439 \u043d\u0435\u0442 \u0438\u043b\u0438 \u0438\u0445 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c. \u0422\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u044b \u043f\u043e\u043c\u0438\u0433\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0430\u0443\u0437\u0443, \u043f\u043e\u043c\u0438\u0433\u0430\u0442\u044c \u0435\u0449\u0451 \u0440\u0430\u0437 \u0438 \u0442. \u0434. \u0414\u043b\u044f \u044d\u0442\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0432 \u0442\u0435\u043b\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cpp\">\/\/ \u0421\u0447\u0451\u0442\u043e-\u043c\u0438\u0433\u0430\u043b\u043a\u0430 if ((todisp&gt;0) && (sti%10==0)) { \tif ((sti%(todisp*20+100)&lt;todisp*20) && (sti%20&lt;10)) \t{ \t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS8; \t} \telse \t{ \t\tGPIOC-&gt;BRR=GPIO_BRR_BR8; \t}; }; <\/code><\/pre>\n<p>  \u0412 \u043b\u044e\u0431\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043c\u044b \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 todisp, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 3, \u0438 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u21168 \u043d\u0430 \u043f\u043b\u0430\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 \u043c\u0438\u0433\u0430\u0442\u044c \u043f\u043e \u0442\u0440\u0438 \u0440\u0430\u0437\u0430, \u0434\u0435\u043b\u0430\u044f \u0441\u0435\u043a\u0443\u043d\u0434\u043d\u0443\u044e \u043f\u0430\u0443\u0437\u0443 \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0438\u044f\u043c\u0438. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f sti \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0435 10 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434 (\u0447\u0435\u0440\u0435\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e ti), \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e x, \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u044e\u0449\u0443\u044e\u0441\u044f \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u043f\u0440\u043e\u0445\u043e\u0434\u043e\u043c \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">while (1) { \tdo  \t{ \t\tsti=ti; \t\ttodisp++; \t} while (ti&gt;1+sti); \ttodisp--;      if ((todisp&gt;0) && (sti%10==0))     {     \tif ((sti%(todisp*20+100)&lt;todisp*20) && (sti%20&lt;10)) \t\t{ \t\t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS8; \t\t} \t\telse \t\t{ \t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR8; \t\t}; \t}; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0438\u0437-\u0437\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u044f sti=ti \u043f\u0440\u043e\u0448\u043b\u0430 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0438, \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f ti&gt;1+sti \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 true (\u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0442\u0438, \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f), \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u043c\u0438\u0433\u0430\u0442\u044c \u043d\u0430 \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0431\u043e\u043b\u044c\u0448\u0435. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u0437\u0430\u043c\u0435\u0440\u0438\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043c\u0438\u0433\u0430\u0435\u0442 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 n \u043c\u0438\u043d\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043b\u0430\u0442\u044b \u0438 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0446\u0438\u043a\u043b\u0430 (\u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439), \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u044d\u0442\u0438 \u043c\u0435\u0440\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439 \u043e\u0442\u043d\u044e\u0434\u044c \u043d\u0435 \u043b\u0438\u0448\u043d\u0438\u0435. <\/p>\n<h6>\u0417\u0430\u0434\u0430\u0447\u0430 9: \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u043a \u043c\u0430\u0448\u0438\u043d\u043a\u0435<\/h6>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0434\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430\u0445, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0445 \u043d\u0430 \u043a\u043e\u043b\u0451\u0441\u0430. \u0411\u0435\u0440\u0451\u043c \u043e\u0442 \u0441\u0442\u0430\u0440\u043e\u0439 \u0441\u0445\u0435\u043c\u044b \u043d\u0430 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u043c\u043e\u0435 \u043d\u0443\u0436\u043d\u043e\u0435: DTMF-\u0434\u0435\u043a\u043e\u0434\u0435\u0440, \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u0441 \u0434\u0435\u0448\u0438\u0444\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u0434\u043b\u044f \u043a\u0440\u0430\u0441\u043e\u0442\u044b, \u0440\u0435\u043b\u0435 \u0441 \u0442\u0440\u0430\u043d\u0437\u0438\u0441\u0442\u043e\u0440\u0430\u043c\u0438. \u041e \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u043c \u0434\u0435\u0448\u0438\u0444\u0440\u0430\u0442\u043e\u0440\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u0437\u0430\u0431\u044b\u0442\u044c!<\/p>\n<p>  \u0412\u044b\u0445\u043e\u0434\u044b \u0441 DTMF-\u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u0441 \u0432\u0445\u043e\u0434\u0430\u043c\u0438 \u043d\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0446\u0435\u043b\u0435\u0439. \u0412\u044b\u0445\u043e\u0434\u044b \u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 (\u043e\u043f\u044f\u0442\u044c-\u0442\u0430\u043a\u0438, \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435) \u0447\u0435\u0440\u0435\u0437 \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 3 \u043a\u041e\u043c) \u043d\u0430 \u0431\u0430\u0437\u0443 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e NPN \u0442\u0440\u0430\u043d\u0437\u0438\u0441\u0442\u043e\u0440\u0430 (\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b BC547). \u042d\u043c\u0438\u0442\u0442\u0435\u0440\u044b \u2014 \u043a \u00ab\u043f\u043b\u044e\u0441\u0443\u00bb, \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440\u044b \u2014 \u043d\u0430 \u043a\u0430\u0442\u0443\u0448\u043a\u0443 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0440\u0435\u043b\u0435. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u044f\u0442\u043e\u0435 \u0440\u0435\u043b\u0435, \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0435\u0435 \u0437\u0430\u043a\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 (\u0440\u0435\u0436\u0438\u043c \u00ab\u0442\u043e\u0440\u043c\u043e\u0437\u0430\u00bb) \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043c\u043e\u0442\u043e\u0440\u0430, \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u043d\u0438\u043a\u0438\/\u0433\u0430\u0431\u0430\u0440\u0438\u0442\u044b \u043f\u043e \u0432\u043a\u0443\u0441\u0443. \u00ab\u041f\u043b\u044e\u0441\u00bb \u0434\u043b\u044f \u043c\u043e\u0442\u043e\u0440\u043e\u0432 \u043f\u043e\u0434\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u0440\u0435\u043b\u0435 \u043e\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u0431\u0430\u0442\u0430\u0440\u0435\u0435\u043a. \u0414\u043b\u044f \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u043a\u0430\u043a \u0441\u0445\u0435\u043c\u044b, \u0442\u0430\u043a \u0438 \u043c\u043e\u0442\u043e\u0440\u043e\u0432, \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043f\u043b\u0430\u0441\u0442\u0438\u043a\u043e\u0432\u044b\u0435 \u043a\u043e\u0440\u043f\u0443\u0441\u0430 (2 \u0448\u0442\u0443\u043a\u0438) \u0434\u043b\u044f 4-\u0445 \u043f\u0430\u043b\u044c\u0447\u0438\u043a\u043e\u0432\u044b\u0445 \u0431\u0430\u0442\u0430\u0440\u0435\u0435\u043a\/\u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u043a\u0430\u0436\u0434\u044b\u0439. \u041e\u043d\u0438 \u0441\u0442\u043e\u044f\u0442 \u0432\u0441\u0435\u0433\u043e \u043f\u043e 40 \u0440\u0443\u0431\u043b\u0435\u0439, \u0430 \u044f \u0432 \u0434\u0435\u0442\u0441\u0442\u0432\u0435 \u0432\u0435\u0447\u043d\u043e \u043c\u0443\u0447\u0430\u043b\u0441\u044f \u0441\u043e \u0441\u043a\u043e\u0442\u0447\u0435\u043c \u0438 \u0444\u043e\u043b\u044c\u0433\u043e\u0439\u2026<\/p>\n<p>  \u0423 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0430 \u043e\u0442 DTMF-\u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 \u0430\u043a\u043a\u0443\u0440\u0430\u0442 \u043d\u0430\u0434 \u0440\u0435\u043b\u0435, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u043c\u0438 \u0437\u0430 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0432\u043f\u0435\u0440\u0451\u0434\/\u043d\u0430\u0437\u0430\u0434. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044d\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u043c\u0435\u0445 \u043a \u0443\u0436\u0435 \u0438\u043c\u0435\u044e\u0449\u0438\u043c\u0441\u044f \u0441\u043a\u0430\u0447\u043a\u0430\u043c \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0440\u0435\u043b\u0435. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0434 \u043e\u0434\u043d\u043e\u043a\u0443\u0440\u0441\u043d\u0438\u043a\u0430\u043c\u0438 \u0440\u0435\u043b\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u0438 \u043f\u0435\u0440\u0435\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u0440\u0435\u0449\u0430\u0442\u044c, \u0430 \u043d\u0430\u0437\u0430\u0434 \u043c\u0430\u0448\u0438\u043d\u043a\u0430 \u0432\u043e\u0432\u0441\u0435 \u043e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0430\u0441\u044c \u0435\u0445\u0430\u0442\u044c \u2014 \u0440\u0435\u043b\u0435 \u0431\u0435\u0437\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u043b\u043e\u0441\u044c, \u0438\u0437\u0434\u0430\u0432\u0430\u044f \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u044b\u0439 \u0442\u0440\u0435\u0441\u043a. \u0414\u0438\u043e\u0434\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u043a\u0430\u0442\u0443\u0448\u043a\u0430\u043c \u0440\u0435\u043b\u0435 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u00ab\u043f\u043b\u044e\u0441\u0430\u00bb, \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0432\u043b\u0438\u044f\u043b\u0438 \u043d\u0430 \u044d\u0442\u0443 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e. \u0414\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u2014 \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u0436\u0434\u044b\u0435 10 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0445\u043e\u0434\u043e\u0432 \u0438 \u0440\u0435\u0430\u0433\u0438\u0440\u0443\u0435\u043c \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 6 \u0440\u0430\u0437 \u043f\u043e\u0434\u0440\u044f\u0434 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u043f\u044f\u0442\u0438 \u0432\u0445\u043e\u0434\u043e\u0432 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0430. \u0417\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u043d\u0430 \u0433\u043b\u0430\u0437 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u0430, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u043f\u043e\u043c\u0435\u0445\u0430\u043c\u0438 \u0440\u0435\u0448\u0435\u043d\u0430. \u0412\u043e\u0442 \u043e\u043d\u0438, \u0433\u043b\u0430\u0432\u043d\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432!<\/p>\n<h4>4. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0443\u0433\u043e\u043b \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u043f\u0435\u0440\u0435\u0434\u043d\u0438\u0445 \u043a\u043e\u043b\u0451\u0441 \u2014 \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0432\u044f\u0437\u044c \u0447\u0435\u0440\u0435\u0437 \u0410\u0426\u041f (\u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e-\u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c)<\/h4>\n<p>  \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u044f \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u043b, \u0447\u0442\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u0440\u0430\u0432\u043d\u044f\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u043d\u0438\u0435 \u043a\u043e\u043b\u0451\u0441\u0430 \u043d\u0430 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0443 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f. \u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u0442. \u043a. \u043c\u0430\u0448\u0438\u043d\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0443\u043c\u0435\u0442\u044c \u0435\u0437\u0434\u0438\u0442\u044c \u043f\u043e \u043f\u0440\u044f\u043c\u043e\u0439!<\/p>\n<h6>\u0417\u0430\u0434\u0430\u0447\u0430 10: \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u043e\u0441\u0442\u0430\u0442\u0430<\/h6>\n<p>  \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e \u0441\u043e\u0431\u043e\u0439 \u2014 \u0435\u0441\u043b\u0438 \u043d\u0435 \u043f\u0440\u0443\u0436\u0438\u043d\u0430, \u0442\u043e \u043f\u0443\u0441\u0442\u044c \u0441\u0430\u043c \u043c\u043e\u0442\u043e\u0440 \u043a\u0440\u0443\u0442\u0438\u0442\u0441\u044f \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0432\u044b\u0440\u043e\u0432\u043d\u044f\u0435\u0442 \u043a\u043e\u043b\u0451\u0441\u0430. \u0426\u0438\u0444\u0440\u043e\u0432\u044b\u0445 <a href=\"http:\/\/ru.wikipedia.org\/wiki\/%D0%94%D0%B0%D1%82%D1%87%D0%B8%D0%BA_%D1%83%D0%B3%D0%BB%D0%B0_%D0%BF%D0%BE%D0%B2%D0%BE%D1%80%D0%BE%D1%82%D0%B0\">\u044d\u043d\u043a\u043e\u0434\u0435\u0440\u043e\u0432<\/a> \u043f\u043e\u0434 \u0440\u0443\u043a\u043e\u0439 \u043d\u0435\u0442, \u043d\u043e \u0435\u0441\u0442\u044c \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043e\u0441\u0442\u0430\u0442 \u043d\u0430 10 \u043a\u041e\u043c, \u0432 \u043f\u043b\u0430\u0442\u0435 \u0435\u0441\u0442\u044c 12-\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u044b\u0439 \u0410\u0426\u041f (\u0434\u0430\u0436\u0435 2), \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430\u0445 \u0435\u0441\u0442\u044c \u0441\u0445\u0435\u043c\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438 \u043a\u043e\u0434. \u041a\u043e\u043d\u0446\u044b \u0440\u0435\u043e\u0441\u0442\u0430\u0442\u0430 \u043a \u00ab\u043f\u043b\u044e\u0441\u0443\u00bb \u0438 \u00ab\u043c\u0438\u043d\u0443\u0441\u0443\u00bb, \u043f\u043e\u043b\u0437\u0443\u043d\u043e\u043a \u2014 \u0447\u0435\u0440\u0435\u0437 \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440 1 \u043a\u041e\u043c \u043d\u0430 \u0432\u0445\u043e\u0434. \u041a\u0441\u0442\u0430\u0442\u0438, \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0439 \u0410\u0426\u041f \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u043b\u044e\u0431\u043e\u0439 \u0432\u0445\u043e\u0434. \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0442\u043e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0443\u043a\u0430\u0437\u0430\u043d \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435. \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u044f\u043c\u043e \u0432 CoIDE \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 ADC (\u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0432 CoIDE \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 ADC). \u041a\u043e\u0434 \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u043e\u043c \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u043e\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0438, \u0447\u0442\u043e \u0433\u043b\u0430\u0432\u043d\u043e\u0435, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0440\u0435\u043e\u0441\u0442\u0430\u0442 \u0432 \u043c\u0430\u0448\u0438\u043d\u043a\u0443, \u0432\u0430\u043b \u0440\u0435\u043e\u0441\u0442\u0430\u0442\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u0441\u043e\u043e\u0441\u043d\u043e \u0441 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c \u0432\u0430\u043b\u043e\u043c \u00ab\u0440\u0435\u0434\u0443\u043a\u0442\u043e\u0440\u0430\u00bb \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u2014 \u043e\u043d \u0442\u0440\u0435\u0442\u0438\u0439 \u043e\u0442 \u043c\u043e\u0442\u043e\u0440\u0430. \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u043d\u0435LEGO\u0432\u0441\u043a\u0438\u0445 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0441 LEGO\u0432\u0441\u043a\u0438\u043c\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442, \u043d\u043e \u043c\u043e\u0442\u043e\u0440-\u0442\u0430\u043a\u0438 \u0443\u043c\u0443\u0434\u0440\u044f\u0435\u0442\u0441\u044f \u0438 \u0440\u0435\u043e\u0441\u0442\u0430\u0442 \u0432\u0440\u0430\u0449\u0430\u0442\u044c, \u0438 \u043a\u043e\u043b\u0451\u0441\u0430 \u043f\u043e\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c. \u0421 \u0442\u0440\u0443\u0434\u043e\u043c, \u043d\u0430\u0434\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c. \u041e\u0442 \u0440\u0435\u043e\u0441\u0442\u0430\u0442\u0430 \u043a \u043f\u043b\u0430\u0442\u0435 \u0442\u044f\u043d\u0435\u0442\u0441\u044f \u0442\u0440\u0438 \u043f\u0440\u043e\u0432\u043e\u0434\u0430, \u0435\u0449\u0451 \u0447\u0435\u0442\u044b\u0440\u0435 \u0442\u044f\u043d\u0443\u0442\u0441\u044f \u043e\u0442 \u043c\u043e\u0442\u043e\u0440\u043e\u0432.<\/p>\n<h6>\u0417\u0430\u0434\u0430\u0447\u0430 11: \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0440\u0435\u043e\u0441\u0442\u0430\u0442\u0430<\/h6>\n<p>  \u042d\u043c\u043f\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0442 0 \u0434\u043e 4095, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u043e\u0439 \u043b\u0435\u0432\u043e\u0439 \u0438 \u043f\u0440\u0430\u0432\u043e\u0439 \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u043c \u0443\u0433\u043b\u0430 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u043f\u0435\u0440\u0435\u0434\u043d\u0438\u0445 \u043a\u043e\u043b\u0451\u0441 \u043f\u0440\u0438 \u0438\u0445 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043f\u0440\u044f\u043c\u043e. \u0412\u0440\u043e\u0434\u0435, \u044d\u0442\u043e\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0451\u0440\u0442\u0432\u043e\u0439 \u0437\u043e\u043d\u043e\u0439 \u2014 \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043d\u0435\u0433\u043e \u043a\u043e\u043b\u0451\u0441\u0430 \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0432\u044b\u0440\u043e\u0432\u043d\u0435\u043d\u043d\u044b\u043c\u0438 \u043d\u0430 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0443. \u0422\u0430\u043a\u0436\u0435 \u044f \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0442\u043e\u0440\u0430 \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0433\u043b\u0430 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430. <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">js= 2500; \/\/ \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0446\u0435\u043d\u0442\u0440\u0430 j \u2014 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u043e\u0442 0 \u0434\u043e 4095 (\u0410\u0426\u041f) gist=150; \/\/ \u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043c\u0451\u0440\u0442\u0432\u043e\u0439 \u0437\u043e\u043d\u044b full=500; \/\/ \u0413\u0440\u0430\u043d\u0438\u0446\u0430 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0433\u043b\u0430 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430  while (1) { \/\/...  if ((x&gt;=max*7) && (inpok))  \/\/ inpok \u0440\u0430\u0432\u0435\u043d 0, \u0435\u0441\u043b\u0438 \u043d\u0438 \u043e\u0434\u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0430 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0435 \u043d\u0430\u0436\u0430\u0442\u0430. \u041d\u0435\u0441\u0442\u0440\u043e\u0433\u043e\u0435 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430. \tif ((num==1) || (num==4) || (num==7)) \/\/\u0412\u043b\u0435\u0432\u043e \t{ \t\tGPIOC-&gt;BRR=GPIO_BRR_BR7; \t\tif (j&gt;0+full) \t\t{ \t\t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS6; \t\t} \t\telse \t\t{ \t\t\tif (j&lt;0+full-gist) \t\t\t{ \t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR6; \t\t\t} \t\t} \t} \telse \t{ \t\tGPIOC-&gt;BRR=GPIO_BRR_BR1; \t}  \tif ((num==3) || (num==6) || (num==9)) \/\/\u0412\u043f\u0440\u0430\u0432\u043e \t{ \t\tGPIOC-&gt;BRR=GPIO_BRR_BR6; \t\tif (j&lt;4250-full) \t\t{ \t\t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS7; \/\/ \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0440\u0435\u043b\u0435 \u00ab\u043c\u043e\u0442\u043e\u0440 \u0432\u043f\u0440\u0430\u0432\u043e\u00bb \t\t} \t\telse \t\t{ \t\t\tif (j&gt;4250-full+gist) \t\t\t{ \t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR7; \/\/ \u0412\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0440\u0435\u043b\u0435 \u00ab\u043c\u043e\u0442\u043e\u0440 \u0432\u043f\u0440\u0430\u0432\u043e\u00bb \t\t\t} \t\t} \t} \telse \t{ \t\tGPIOC-&gt;BRR=GPIO_BRR_BR3; \t}  \t\/\/ \u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043b\u0451\u0441\u0430 \u043d\u0430 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0443 \tif ((num==2) || (num==5) || (num==8)) \t{ \t\tif (j&lt;js-gist*3) \/\/ \u0415\u0441\u043b\u0438 \u043a\u043e\u043b\u0451\u0441\u0430 \u0441\u043c\u0435\u0449\u0435\u043d\u044b \u043e\u0442 \u0446\u0435\u043d\u0442\u0440\u0430 \u0432\u043b\u0435\u0432\u043e \t\t{ \t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR6; \/\/ \u0412\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0440\u0435\u043b\u0435 \u00ab\u043c\u043e\u0442\u043e\u0440 \u0432\u043b\u0435\u0432\u043e\u00bb (\u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0440\u0435\u043b\u0435 \u0435\u0449\u0451 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e) \t\t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS7; \/\/ \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0440\u0435\u043b\u0435 \u00ab\u043c\u043e\u0442\u043e\u0440 \u0432\u043f\u0440\u0430\u0432\u043e\u00bb \t\t} \t\telse \t\t{ \t\t\tif (j&gt;js-gist*2) \t\t\t{ \t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR7; \u0412\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0440\u0435\u043b\u0435 \u00ab\u043c\u043e\u0442\u043e\u0440 \u0432\u043f\u0440\u0430\u0432\u043e\u00bb \t\t\t} \t\t}; \t\tif (j&gt;js+gist*3) \t\t{ \t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR7; \t\t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS6; \t\t} \t\telse \t\t{ \t\t\tif (j&lt;js+gist*2) \t\t\t{ \t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR6; \t\t\t} \t\t}; \t}; }; \/\/.. } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0415\u0441\u043b\u0438 \u043c\u0430\u0448\u0438\u043d\u043a\u0430 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0436\u0438\u043c\u0430\u0445, \u0438 \u043f\u043e\u0434 \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u043c \u0447\u0443\u0434\u043e\u0432\u0438\u0449\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043e\u043a \u043a\u043e\u043b\u0451\u0441\u0430 \u0432\u0434\u0440\u0443\u0433 \u0438\u0437\u043c\u0435\u043d\u044f\u0442 \u0443\u0433\u043e\u043b \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u0431\u0435\u0437 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u044d\u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434 \u0432\u0435\u0440\u043d\u0451\u0442 \u0438\u0445 \u0432 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0415\u0441\u043b\u0438 \u0436\u0435 \u043c\u044b \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 4, \u0430 \u043a\u043e\u043b\u0451\u0441\u0430 \u0443\u0436\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043a\u0440\u0430\u0439\u043d\u0435\u043c \u043b\u0435\u0432\u043e\u043c \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u0440\u0435\u043b\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n<p>  \u041d\u0430\u043f\u043e\u043c\u043d\u044e, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043e\u0434 \u0431\u0440\u0430\u043b\u0441\u044f \u0438\u0437 \u0447\u044c\u0438\u0445-\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432. <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0430\u0448\u0438\u043d\u043a\u043e\u0439<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\"> \/**   *****************************************************************************   * @title   ADC_simple.c   * @author  Claude   * @date    2010 Dec 29   * @brief   ADC Example, Blink a LED according to ADC value   *******************************************************************************   *\/  #include&lt;stm32f10x_rcc.h&gt; #include&lt;stm32f10x_gpio.h&gt; #include&lt;stm32f10x_adc.h&gt;  #include &quot;stm32f10x.h&quot; #include &quot;stm32f10x_conf.h&quot;  GPIO_InitTypeDef GPIO_InitStructure; ADC_InitTypeDef ADC_InitStructure; unsigned int i,j,js,gist,full,ti=0;  \/* Blink a LED, blink speed is set by ADC value *\/ int main(void) { \tunsigned int x,max; \tunsigned int move[10]; \tunsigned int oldsti=0,sti=0,time[10],tit=0; \tunsigned short recheck=5; \tunsigned char todisp=0,todisp2=0; \tx=0; \tunsigned char ji,ju,inp0,inp1,inp2,inp3,inpok,ink,in0,in1,in2,in3,inok,num,oldnum,back; \tmax=250; \tinp0=0; \tinp1=0; \tinp2=0; \tinp3=0; \tinpok=0; \tink=0; \tback=0; \tnum=0;       void backreset(void)     {     \tback=0;     \tfor (ju=0;ju&lt;10;ju++)     \t{     \t\ttime[ju]=0;     \t\tmove[ju]=0;     \t}     \tGPIOC-&gt;BRR=GPIO_BRR_BR9;     }     GPIO_InitTypeDef PORT,GPIO_InitStructure;     RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE);     PORT.GPIO_Pin = (GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3  | GPIO_Pin_6 | GPIO_Pin_7 | GPIO_Pin_10 | GPIO_Pin_11 | GPIO_Pin_12| GPIO_Pin_8 | GPIO_Pin_9);     PORT.GPIO_Mode = GPIO_Mode_Out_PP;     PORT.GPIO_Speed = GPIO_Speed_2MHz;     GPIO_Init( GPIOC , &PORT);      RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE); \/\/\u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0442\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0440\u0442\u0430 A     GPIO_InitStructure.GPIO_Pin   = (GPIO_Pin_9 | GPIO_Pin_4 | GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7);           \/\/\u0437\u0430\u0434\u0430\u0435\u043c \u043d\u043e\u043c\u0435\u0440 \u0432\u044b\u0432\u043e\u0434\u0430     GPIO_InitStructure.GPIO_Mode  = GPIO_Mode_IPU;            GPIO_Init(GPIOB, &GPIO_InitStructure);      RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA , ENABLE);     PORT.GPIO_Pin = (GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_5);     PORT.GPIO_Mode = GPIO_Mode_Out_PP;     PORT.GPIO_Speed = GPIO_Speed_2MHz;     GPIO_Init( GPIOA , &PORT);  \/\/ input of ADC (it doesn't seem to be needed, as default GPIO state is floating input) \tGPIO_InitStructure.GPIO_Mode  = GPIO_Mode_AIN; \tGPIO_InitStructure.GPIO_Pin   = GPIO_Pin_1 ;\t\t\/\/ that's ADC1 (PA1 on STM32) \tGPIO_Init(GPIOA, &GPIO_InitStructure);  \/\/clock for ADC (max 14MHz --&gt; 72\/6=12MHz) \tRCC_ADCCLKConfig (RCC_PCLK2_Div6); \/\/ enable ADC system clock \tRCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1, ENABLE);  \/\/ define ADC config \tADC_InitStructure.ADC_Mode = ADC_Mode_Independent; \tADC_InitStructure.ADC_ScanConvMode = DISABLE; \tADC_InitStructure.ADC_ContinuousConvMode = ENABLE;\t\/\/ we work in continuous sampling mode \tADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_None; \tADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right; \tADC_InitStructure.ADC_NbrOfChannel = 1;  \tADC_RegularChannelConfig(ADC1,ADC_Channel_1, 1,ADC_SampleTime_28Cycles5); \/\/ define regular conversion config \tADC_Init ( ADC1, &ADC_InitStructure);\t\/\/set config of ADC1  \/\/ enable ADC \tADC_Cmd (ADC1,ENABLE);\t\/\/enable ADC1  \/\/\tADC calibration (optional, but recommended at power on) \tADC_ResetCalibration(ADC1);\t\/\/ Reset previous calibration \twhile(ADC_GetResetCalibrationStatus(ADC1)); \tADC_StartCalibration(ADC1);\t\/\/ Start new calibration (ADC must be off at that time) \twhile(ADC_GetCalibrationStatus(ADC1));  \/\/ start conversion \tADC_Cmd (ADC1,ENABLE);\t\/\/enable ADC1 \tADC_SoftwareStartConvCmd(ADC1, ENABLE);\t\/\/ start conversion (will be endless as we are in continuous mode)  \/\/ debug information \tRCC_ClocksTypeDef forTestOnly; \tRCC_GetClocksFreq(&forTestOnly);\t\/\/this could be used with debug to check to real speed of ADC clock     \/\/\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u043e\u0440\u0442 \u0421 \u0438 \u0442\u0430\u0439\u043c\u0435\u0440 6   RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM6,ENABLE);   TIM6-&gt;PSC = 24000 - 1; \/\/ \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u0447\u0442\u043e \u0442\u0430\u0439\u043c\u0435\u0440 \u0442\u0438\u043a\u0430\u043b 1000 \u0440\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443  \/\/ TIM6-&gt;ARR = 1000 ; \/\/ \u0427\u0442\u043e\u0431 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \tTIM6-&gt;ARR =4; \tTIM6-&gt;DIER |= TIM_DIER_UIE; \/\/\u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u043e\u0442 \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \tTIM6-&gt;CR1 |= TIM_CR1_CEN; \/\/ \u041d\u0430\u0447\u0430\u0442\u044c \u043e\u0442\u0441\u0447\u0451\u0442! \tNVIC_EnableIRQ(TIM6_DAC_IRQn); \/\/\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 TIM6_DAC_IRQn \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f      \tj= 2500; \tjs=j; \tgist=150; \tfull=500; \tif (back==0) \t{ \t\tfor (ju=0;ju&lt;10;ju++) \t\t{ \t\t\ttime[ju]=0; \t\t\tmove[ju]=0; \t\t} \t}     while (1) \t{ \t\t\/\/ adc is in free run, and we get the value asynchronously, this is not a really nice way of doing, but it work! \t\tj = ADC_GetConversionValue(ADC1) ; \/\/ value from 0 to 4095        \/* possible change :      * ADC_ContinuousConvMode = DISABLE      * then on the infinite loop, something like :      *      *  ADC_SoftwareStartConvCmd(ADC1, ENABLE);\t\t\t\t\t\/\/ start ONE conversion      *  while(ADC_GetFlagStatus(ADC1, ADC_FLAG_EOC) == RESET);\t\/\/ wait end of conversion      *  j = ADC_GetConversionValue(ADC1) * 500;\t\t\t\t\t\/\/ get value      *      *\/  \t\tdo { \t\t\tsti=ti; \t\t\t} while (ti&gt;1+sti);       \t\/\/if ((back!=2) || GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_9)) \t\tif (oldsti!=sti) \t\t{ \t\t\toldsti=sti; \t\t\tif (ink&lt;recheck) \t\t\t{ \t\t\t\tin0+=GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_5); \t\t\t\tin1+=GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_6); \t\t\t\tin2+=GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_7); \t\t\t\tin3+=GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_8); \t\t\t\tinok+=GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_9); \t\t\t\tink++; \t\t\t\tif (ink==recheck) \t\t\t\t{ \t\t\t\t\tink=0; \t\t\t\t\tif ((in0==0 || in0==recheck) && (in1==0 || in1==recheck) && (in2==0 || in2==recheck) && (in3==0 || in3==recheck) && (inok==0 || inok==recheck)) \t\t\t\t\t{ \t\t\t\t\t\tif (in0==recheck) \t\t\t\t\t\t{ \t\t\t\t\t\t\tin0=1; \t\t\t\t\t\t} \t\t\t\t\t\tif (in1==recheck) \t\t\t\t\t\t{ \t\t\t\t\t\t\tin1=1; \t\t\t\t\t\t} \t\t\t\t\t\tif (in2==recheck) \t\t\t\t\t\t{ \t\t\t\t\t\t\tin2=1; \t\t\t\t\t\t} \t\t\t\t\t\tif (in3==recheck) \t\t\t\t\t\t{ \t\t\t\t\t\t\tin3=1; \t\t\t\t\t\t} \t\t\t\t\t\tif (inok==recheck) \t\t\t\t\t\t{ \t\t\t\t\t\t\tinok=1; \t\t\t\t\t\t} \t\t\t\t\t\tif ((back==2) && (inok==1)) \t\t\t\t\t\t{ \t\t\t\t\t\t\tbackreset(); \t\t\t\t\t\t} \t\t\t\t\t\tif ( (back!=2) && (back!=4) && ((inp0!=in0) || (inp1!=in1) || (inp2!=in2) || (inp3!=in3) || (inpok!=inok)) ) \t\t\t\t\t\t{ \t\t\t\t\t\t\tx=0; \t\t\t\t\t\t    inp0=in0; \t\t\t\t\t\t    inp1=in1; \t\t\t\t\t\t    inp2=in2; \t\t\t\t\t\t\tinp3=in3; \t\t\t\t\t\t\tinpok=inok; \t\t\t\t\t\t\toldnum=num; \t\t\t\t\t\t\tif (inp0) \/\/ \u0414\u0432\u043e\u0438\u0447\u043d\u043e-\u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0439 \u0434\u0435\u0448\u0438\u0444\u0440\u0430\u0442\u043e\u0440 \t\t\t\t\t\t\t{ \t\t\t\t\t\t\t  if (inp1) \t\t\t\t\t\t\t  { \t\t\t\t\t\t\t\tif (inp2) \t\t\t\t\t\t\t\t{ \t\t\t\t\t\t\t\t  if (inp3) \t\t\t\t\t\t\t\t  { \t\t\t\t\t\t\t\t\tnum=15; \t\t\t\t\t\t\t\t  } \t\t\t\t\t\t\t\t  else \t\t\t\t\t\t\t\t  { \t\t\t\t\t\t\t\t\tnum=7; \t\t\t\t\t\t\t\t  }; \t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\telse \t\t\t\t\t\t\t\t{ \t\t\t\t\t\t\t\t  if (inp3) \t\t\t\t\t\t\t\t  { \t\t\t\t\t\t\t\t\tnum=11; \t\t\t\t\t\t\t\t  } \t\t\t\t\t\t\t\t  else \t\t\t\t\t\t\t\t  { \t\t\t\t\t\t\t\t\tnum=3; \t\t\t\t\t\t\t\t  }; \t\t\t\t\t\t\t\t}; \t\t\t\t\t\t\t  } \t\t\t\t\t\t\t  else \t\t\t\t\t\t\t  { \t\t\t\t\t\t\t\tif (inp2) \t\t\t\t\t\t\t\t{ \t\t\t\t\t\t\t\t  if (inp3) \t\t\t\t\t\t\t\t  { \t\t\t\t\t\t\t\t\tnum=13; \t\t\t\t\t\t\t\t  } \t\t\t\t\t\t\t\t  else \t\t\t\t\t\t\t\t  { \t\t\t\t\t\t\t\t\tnum=5; \t\t\t\t\t\t\t\t  }; \t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\telse \t\t\t\t\t\t\t\t{ \t\t\t\t\t\t\t\t  if (inp3) \t\t\t\t\t\t\t\t  { \t\t\t\t\t\t\t\t\tnum=9; \t\t\t\t\t\t\t\t  } \t\t\t\t\t\t\t\t  else \t\t\t\t\t\t\t\t  { \t\t\t\t\t\t\t\t\tnum=1; \t\t\t\t\t\t\t\t  }; \t\t\t\t\t\t\t\t}; \t\t\t\t\t\t\t  }; \t\t\t\t\t\t\t} \t\t\t\t\t\t\telse \t\t\t\t\t\t\t{ \t\t\t\t\t\t\t  if (inp1) \t\t\t\t\t\t\t  { \t\t\t\t\t\t\t\tif (inp2) \t\t\t\t\t\t\t\t{ \t\t\t\t\t\t\t\t  if (inp3) \t\t\t\t\t\t\t\t  { \t\t\t\t\t\t\t\t\tnum=14; \t\t\t\t\t\t\t\t  } \t\t\t\t\t\t\t\t  else \t\t\t\t\t\t\t\t  { \t\t\t\t\t\t\t\t\tnum=6; \t\t\t\t\t\t\t\t  }; \t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\telse \t\t\t\t\t\t\t\t{ \t\t\t\t\t\t\t\t  if (inp3) \t\t\t\t\t\t\t\t  { \t\t\t\t\t\t\t\t\tnum=10; \t\t\t\t\t\t\t\t  } \t\t\t\t\t\t\t\t  else \t\t\t\t\t\t\t\t  { \t\t\t\t\t\t\t\t\tnum=2; \t\t\t\t\t\t\t\t  }; \t\t\t\t\t\t\t\t}; \t\t\t\t\t\t\t  } \t\t\t\t\t\t\t  else \t\t\t\t\t\t\t  { \t\t\t\t\t\t\t\tif (inp2) \t\t\t\t\t\t\t\t{ \t\t\t\t\t\t\t\t  if (inp3) \t\t\t\t\t\t\t\t  { \t\t\t\t\t\t\t\t\tnum=12; \t\t\t\t\t\t\t\t  } \t\t\t\t\t\t\t\t  else \t\t\t\t\t\t\t\t  { \t\t\t\t\t\t\t\t\tnum=4; \t\t\t\t\t\t\t\t  }; \t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\telse \t\t\t\t\t\t\t\t{ \t\t\t\t\t\t\t\t  if (inp3) \t\t\t\t\t\t\t\t  { \t\t\t\t\t\t\t\t\tnum=8; \t\t\t\t\t\t\t\t  } \t\t\t\t\t\t\t\t  else \t\t\t\t\t\t\t\t  { \t\t\t\t\t\t\t\t\tnum=0; \t\t\t\t\t\t\t\t  }; \t\t\t\t\t\t\t\t}; \t\t\t\t\t\t\t  }; \t\t\t\t\t\t\t}; \t\t\t\t\t\t}; \t\t\t\t\t} \t\t\t\t\tin0=0; \t\t\t\t\tin1=0; \t\t\t\t\tin2=0; \t\t\t\t\tin3=0; \t\t\t\t\tinok=0; \t\t\t\t} \t\t\t}      \t};  \t\t\/\/ \u0421\u0447\u0451\u0442\u0447\u0438\u043a\u0438         if ((todisp&gt;0) && (sti%10==0))         {         \tif ((sti%(todisp*20+100)&lt;todisp*20) && (sti%20&lt;10)) \t\t\t{ \t\t\t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS8; \t\t\t} \t\t\telse \t\t\t{ \t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR8; \t\t\t}; \t\t};         if ((todisp2&gt;0) && (sti%10==2))         {         \tif ((sti%(todisp2*20+100)&lt;todisp2*20) && (sti%20&lt;10)) \t\t\t{ \t\t\t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS9; \t\t\t} \t\t\telse \t\t\t{ \t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR9; \t\t\t}; \t\t};          \/\/ \u041f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 \t\tif ((num==12)) \t\t{ \t\t\tswitch (back) \t\t\t{ \t\t\t\tcase 0: if (inpok) \t\t\t\t\t{ \t\t\t\t\t\tback=3; \t\t\t\t\t}; \t\t\t\t\tbreak; \t\t\t\tcase 3: \t\t\t\t\tif (!inpok) \t\t\t\t\t{ \t\t\t\t\t\tback=4;ji=0;inpok=0;x=0; \t\t\t\t\t\tsti=0; \t\t\t\t\t}; \t\t\t\t\tbreak; \t\t\t\tdefault: ; \t\t\t} \t\t}; \t\tif (back==4) \t\t{ \t\t\tif (inpok==0) \t\t\t{ \t\t\t\twhile ((move[ji]&lt;1) && (ji&lt;10)) \t\t\t\t{ \t\t\t\t\tji++; \t\t\t\t}; \t\t\t\tif ((ji&lt;10)) \t\t\t\t{ \t\t\t\t\tif ((sti&gt;100)) \t\t\t\t\t{ \t\t\t\t\t\tx=0; \t\t\t\t\t\tsti=0; \t\t\t\t\t\tnum=move[ji]; \t\t\t\t\t\ttit=time[ji]; \t\t\t\t\t\tinpok=1; \t\t\t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR8; \t\t\t\t\t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS9; \t\t\t\t\t} \t\t\t\t} \t\t\t\telse \t\t\t\t{ \t\t\t\t\tbackreset(); \t\t\t\t} \t\t\t} \t\t\telse \t\t\t{ \t\t\t\tif (sti&gt;tit) \t\t\t\t{ \t\t\t\t\tinpok=0; \t\t\t\t\tsti=0; \t\t\t\t\tx=0; \t\t\t\t\tji++; \t\t\t\t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS8; \t\t\t\t} \t\t\t} \t\t};          \/\/ \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043d\u0430\u0437\u0430\u0434 \t\tif ((num==10)) \t\t{ \t\t\tswitch (back) \t\t\t{ \t\t\t\tcase 0: if (inpok) \t\t\t\t\t{ \t\t\t\t\t\tback=1; \t\t\t\t\t}; \t\t\t\t\tbreak; \t\t\t\tcase 1: \t\t\t\t\tif (!inpok) \t\t\t\t\t{ \t\t\t\t\t\tback=2;ji=9;inpok=0;x=0; \t\t\t\t\t\tsti=0; \t\t\t\t\t}; \t\t\t\t\tbreak; \t\t\t\tdefault: ; \t\t\t} \t\t}; \t\tif (back==2) \t\t{ \t\t\tif (inpok==0) \t\t\t{ \t\t\t\tif ((ji&gt;0) && (move[ji]&gt;0)) \t\t\t\t{ \t\t\t\t\tif ((sti&gt;100)) \t\t\t\t\t{ \t\t\t\t\t\tx=0; \t\t\t\t\t\tsti=0; \t\t\t\t\t\tnum=move[ji]; \t\t\t\t\t\tif (num&lt;4) \t\t\t\t\t\t{ \t\t\t\t\t\t\tnum+=6; \t\t\t\t\t\t} \t\t\t\t\t\telse \t\t\t\t\t\t{ \t\t\t\t\t\t\tif (num&gt;6) \t\t\t\t\t\t\t{ \t\t\t\t\t\t\t\tnum-=6; \t\t\t\t\t\t\t} \t\t\t\t\t\t} \t\t\t\t\t\ttit=time[ji]; \t\t\t\t\t\tinpok=1; \t\t\t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR8; \t\t\t\t\t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS9; \t\t\t\t\t} \t\t\t\t} \t\t\t\telse \t\t\t\t{ \t\t\t\t\tbackreset(); \t\t\t\t} \t\t\t} \t\t\telse \t\t\t{ \t\t\t\tif (sti&gt;tit) \t\t\t\t{ \t\t\t\t\tinpok=0; \t\t\t\t\tx=0; \t\t\t\t\tsti=0; \t\t\t\t\tji--; \t\t\t\t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS8; \t\t\t\t} \t\t\t} \t\t};  \t\t\/\/ \u0421\u0442\u0438\u0440\u0430\u0435\u043c \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0439 \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 &quot;*&quot; \t\tif (num==11) \t\t{ \t\t\tbackreset(); \t\t}      \tif ((x==3*max)) \t\t{ \t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR12; \t\t\tif  ((!inpok) || (num&lt;1) || (num&gt;9)) \t\t\t{ \t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR6; \t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR7; \t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR10; \t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR11; \t\t\t}     \t\tif ((back!=2)&&(back!=4))     \t\t{ \t\t\t    in0=inp0; \t\t\t    in1=inp1; \t\t\t    in2=inp2; \t\t\t\tin3=inp3; \t\t\t\tinok=inpok;     \t\t} \t\t\tif ((move[9]&gt;0)&&(move[9]&lt;10)&&(!inpok)&&(back!=2)&&(back!=4)) \t\t\t{ \t\t\t\tfor (ju=0;ju&lt;9;ju++) \t\t\t\t{ \t\t\t\t\ttime[ju]=time[ju+1]; \t\t\t\t} \t\t\t\ttime[9]=sti; \t\t\t}; \t\t};     \tif ((x==5*max) && (inpok))     \t{ \t\t\tif ((1&lt;=num) && (num&lt;=9)&&(back!=2)&&(back!=4)) \t\t\t{ \t\t\t\tfor (ju=0;ju&lt;9;ju++) \/\/\u0421\u0434\u0432\u0438\u0433 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0439 \t\t\t\t{ \t\t\t\t\tmove[ju]=move[ju+1]; \t\t\t\t} \t\t\t\tmove[9]=num; \t\t\t\tsti=0; \/\/\u0417\u0430\u0441\u0435\u043a\u0430\u0435\u043c \u0432\u0440\u0435\u043c\u044f, \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0436\u0430\u0442\u0430 \u043a\u043d\u043e\u043f\u043a\u0430 \t\t\t}; \t\t\tif ((num==1) || (num==2) || (num==3)) \t\t\t{ \t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR10; \t\t\t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS11; \t\t\t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS2; \t\t\t} \t\t\telse \t\t\t{ \t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR11; \t\t\t}; \t\t\tif ((num==7) || (num==8) || (num==9)) \/\/\u0415\u0434\u0435\u043c \u043d\u0430\u0437\u0430\u0434 \t\t\t{ \t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR11; \t\t\t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS10; \t\t\t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS2; \t\t\t} \t\t\telse \t\t\t{ \t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR10; \t\t\t}; \t\t};     \tif ((x&gt;=max*7) && (inpok)) \/\/ inpok \u0440\u0430\u0432\u0435\u043d 0, \u0435\u0441\u043b\u0438 \u043d\u0438 \u043e\u0434\u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0430 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0435 \u043d\u0430\u0436\u0430\u0442\u0430. \u041d\u0435\u0441\u0442\u0440\u043e\u0433\u043e\u0435 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430.     \t{ \t\t\tif ((num==1) || (num==4) || (num==7)) \/\/\u0412\u043b\u0435\u0432\u043e \t\t\t{ \t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR7; \t\t\t\tif (j&gt;0+full) \t\t\t\t{ \t\t\t\t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS6; \t\t\t\t} \t\t\t\telse \t\t\t\t{ \t\t\t\t\tif (j&lt;0+full-gist) \t\t\t\t\t{ \t\t\t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR6; \t\t\t\t\t} \t\t\t\t} \t\t\t} \t\t\telse \t\t\t{ \t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR1; \t\t\t}  \t\t\tif ((num==3) || (num==6) || (num==9)) \/\/\u0412\u043f\u0440\u0430\u0432\u043e \t\t\t{ \t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR6; \t\t\t\tif (j&lt;4250-full) \t\t\t\t{ \t\t\t\t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS7; \t\t\t\t} \t\t\t\telse \t\t\t\t{ \t\t\t\t\tif (j&gt;4250-full+gist) \t\t\t\t\t{ \t\t\t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR7; \t\t\t\t\t} \t\t\t\t} \t\t\t} \t\t\telse \t\t\t{ \t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR3; \t\t\t}  \t\t\t\/\/ \u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043b\u0451\u0441\u0430 \u043d\u0430 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0443 \t\t\tif ((num==2) || (num==5) || (num==8)) \t\t\t{ \t\t\t\tif (j&lt;js-gist*3) \/\/ \u0415\u0441\u043b\u0438 \u043a\u043e\u043b\u0451\u0441\u0430 \u0441\u043c\u0435\u0449\u0435\u043d\u044b \u043e\u0442 \u0446\u0435\u043d\u0442\u0440\u0430 \u0432\u043b\u0435\u0432\u043e \t\t\t\t{ \t\t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR6; \/\/ \u0412\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0440\u0435\u043b\u0435 \u00ab\u043c\u043e\u0442\u043e\u0440 \u0432\u043b\u0435\u0432\u043e\u00bb (\u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0440\u0435\u043b\u0435 \u0435\u0449\u0451 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e) \t\t\t\t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS7; \/\/ \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0440\u0435\u043b\u0435 \u00ab\u043c\u043e\u0442\u043e\u0440 \u0432\u043f\u0440\u0430\u0432\u043e\u00bb \t\t\t\t} \t\t\t\telse \t\t\t\t{ \t\t\t\t\tif (j&gt;js-gist*2) \t\t\t\t\t{ \t\t\t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR7; \u0412\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0440\u0435\u043b\u0435 \u00ab\u043c\u043e\u0442\u043e\u0440 \u0432\u043f\u0440\u0430\u0432\u043e\u00bb \t\t\t\t\t} \t\t\t\t}; \t\t\t\tif (j&gt;js+gist*3) \t\t\t\t{ \t\t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR7; \t\t\t\t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS6; \t\t\t\t} \t\t\t\telse \t\t\t\t{ \t\t\t\t\tif (j&lt;js+gist*2) \t\t\t\t\t{ \t\t\t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR6; \t\t\t\t\t} \t\t\t\t}; \t\t\t};     \t};  \t\tif ((x==max*15)) \t\t{ \t\t\tif (((num==1) || (num==2) || (num==3) || (num==5) || (num==7) || (num==8) || (num==9))&&(inpok)) \/\/\u0417\u0430\u043c\u044b\u043a\u0430\u0435\u043c \u0440\u0435\u043b\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043c\u043e\u0442\u043e\u0440\u0430 \t\t\t{ \t\t\t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS12; \t\t\t} \t\t\telse \t\t\t{ \t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR12; \t\t\t} \t\t\tx++; \t\t} \t\telse \t\t{ \t\t\tx++; \t\t\tif (x&gt;max*20+300000) \t\t\t{ \t\t\t\tif (!inpok) \t\t\t\t{ \t\t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR2;\/\/ \u0413\u0430\u0441\u0438\u043c \u0433\u0430\u0431\u0430\u0440\u0438\u0442\u044b \t\t\t\t} \t\t\t\tx=max*20+1; \t\t\t} \t\t}  \t\t\/\/ \u041c\u0438\u0433\u0430\u043d\u0438\u0435 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u043d\u0438\u043a\u043e\u0432 \t\tif (x%80000&lt;40000) \t\t{ \t\t\tif ((num%3==1) && (inpok) && (num&lt;10)) \t\t\t{ \t\t\t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS1; \t\t\t} \t\t\telse \t\t\t{ \t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR1; \t\t\t} \t\t\tif ((num%3==0) && (inpok) && (num&lt;10)) \t\t\t{ \t\t\t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS3; \t\t\t} \t\t\telse \t\t\t{ \t\t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR3; \t\t\t} \t\t} \t\telse \t\t{ \t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR1; \t\t\tGPIOC-&gt;BRR=GPIO_BRR_BR3; \t\t}    \t\tif (sti==0) \t\t{ \t\t\tdo { \t\t\t\tti=0; \t\t\t\t} while (ti&gt;1); \t\t}     };     return 0; };   \/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f TIM6_DAC void TIM6_DAC_IRQHandler(void) { \tti++; \tTIM6-&gt;SR &= ~TIM_SR_UIF; \/\/\u0421\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u0444\u043b\u0430\u0433 UIF } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/-IqR1r5EIyx4\/UMIKBRMUSwI\/AAAAAAAADXU\/ULgIK7rXf5Q\/s625\/DSC00345.JPG\" alt=\"image\"\/><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/-Nmn82ykFaTQ\/UMIKCYkzPEI\/AAAAAAAADXk\/kHicdRwg-Io\/s625\/DSC00356.JPG\" alt=\"image\"\/><\/p>\n<p>  \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u044d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<p>  <iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"http:\/\/www.youtube.com\/embed\/CN3lW_b-Rcs\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<h4>5. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0426\u0410\u041f (\u0446\u0438\u0444\u0440\u043e-\u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f) \u0434\u043b\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0437\u0432\u0443\u043a\u043e\u0432<\/h4>\n<p>  \u0420\u0430\u0437 \u0443\u0436 \u0431\u044b\u043b \u043e\u0441\u0432\u043e\u0435\u043d \u0410\u0426\u041f, \u0442\u043e \u0438 \u0426\u0410\u041f \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0441\u0442\u0430\u0442\u044c\u0441\u044f \u0431\u0435\u0437 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0443\u0447\u0435\u0431\u043d\u043e-\u0440\u0430\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445 \u043c\u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0437\u0432\u0443\u043a\u043e\u0432. \u041f\u043e\u0440\u044f\u0434\u043e\u043a \u043e\u0441\u0432\u043e\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439: \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u0421\u0435\u0442\u0438 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c, \u00ab\u0432\u0430\u0443!\u00bb, \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u0434. <br \/>  \u0414\u0438\u043d\u0430\u043c\u0438\u043a \u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b \u043a \u043f\u043b\u044e\u0441\u0443 \u0438 \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440\u0443 NPN \u0442\u0440\u0430\u043d\u0437\u0438\u0441\u0442\u043e\u0440\u0430, \u043d\u0430 \u0431\u0430\u0437\u0443 \u0442\u0440\u0430\u043d\u0437\u0438\u0441\u0442\u043e\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0441\u0438\u0433\u043d\u0430\u043b \u0441 \u043d\u043e\u0433\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b\u0432\u0435\u0434\u0435\u043d \u0426\u0410\u041f. \u041f\u043e \u0438\u0434\u0435\u0435, \u0434\u0438\u043d\u0430\u043c\u0438\u043a \u043f\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u044d\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u0441 \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0449\u0435\u0439\u0441\u044f \u043f\u043e\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c\u044e, \u044f \u0436\u0435 \u043f\u043e\u0434\u0430\u044e \u0442\u043e\u043a \u043d\u0430 \u0434\u0438\u043d\u0430\u043c\u0438\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0434\u043d\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438. \u041f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0445\u0435\u043c\u044b \u043e \u0434\u0432\u0443\u0445 \u0442\u0440\u0430\u043d\u0437\u0438\u0441\u0442\u043e\u0440\u0430\u0445, \u043d\u043e \u0443\u0441\u043b\u044b\u0448\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u0432 \u0437\u0432\u0443\u0447\u0430\u043d\u0438\u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043d\u0430\u0448\u0451\u043b \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0439 \u0441\u0445\u0435\u043c\u044b. <\/p>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0435 \u0437\u0432\u0443\u043a\u0438 \u0431\u044b\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"http:\/\/easystm32.ru\/for-beginners\/37-dac-stm32\">\u044d\u0442\u043e\u0433\u043e<\/a> \u043f\u0440\u0438\u043c\u0435\u0440\u0430. <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0440\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">#include &quot;stm32f10x.h&quot; #include &quot;stm32f10x_rcc.h&quot; #include &quot;stm32f10x_gpio.h&quot;   \/* \u041c\u0430\u0441\u0441\u0438\u0432, \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0437\u0430\u043f\u0438\u0445\u0438\u0432\u0430\u0442\u044c \u0432 DAC \u0447\u0442\u043e\u0431 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0438\u043d\u0443\u0441 *\/ const uint16_t sin[32] = {  2047, 2447, 2831, 3185, 3498, 3750, 3939, 4056, 4095, 4056,  3939, 3750, 3495, 3185, 2831, 2447, 2047, 1647, 1263, 909,  599, 344, 155, 38, 0, 38, 155, 344, 599, 909, 1263, 1647}; unsigned char i=0;   int main(void) {   \/* \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u043e\u0440\u0442 \u0410 *\/   RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);   \/* \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0426\u0410\u041f *\/   RCC_APB1PeriphClockCmd(RCC_APB1Periph_DAC, ENABLE);   \/* \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0442\u0430\u0439\u043c\u0435\u0440 6 *\/   RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM6,ENABLE);     \/* \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043d\u043e\u0433\u0443 \u0426\u0410\u041f\u0430 *\/   GPIO_InitTypeDef GPIO_InitStructure;   GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4;   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;   GPIO_Init(GPIOA, &GPIO_InitStructure);     \/* \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0442\u0430\u0439\u043c\u0435\u0440 \u0442\u0430\u043a \u0447\u0442\u043e\u0431 \u043e\u043d \u0442\u0438\u043a\u0430\u043b \u043f\u043e\u0447\u0430\u0449\u0435 *\/   TIM6-&gt;PSC = 0;   TIM6-&gt;ARR = 500;   TIM6-&gt;DIER |= TIM_DIER_UIE; \/\/\u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u043e\u0442 \u0442\u0430\u0439\u043c\u0435\u0440\u0430   TIM6-&gt;CR1 |= TIM_CR1_CEN; \/\/ \u041d\u0430\u0447\u0430\u0442\u044c \u043e\u0442\u0441\u0447\u0451\u0442!   NVIC_EnableIRQ(TIM6_DAC_IRQn); \/\/\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 TIM6_DAC_IRQn \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f     \/* \u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c DAC1 *\/   DAC-&gt;CR |= DAC_CR_EN1;     \/* \u0411\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b *\/   while (1)   {   } }   \/*\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043e\u0442 \u0442\u0430\u0439\u043c\u0435\u0440\u0430 6 *\/ void TIM6_DAC_IRQHandler(void) {   TIM6-&gt;SR &= ~TIM_SR_UIF; \/\/\u0421\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u0444\u043b\u0430\u0433 UIF   DAC-&gt;DHR12R1=sin[i++]; \/\/\u0417\u0430\u043f\u0438\u0445\u0438\u0432\u0430\u0435\u043c \u0432 \u0426\u0410\u041f \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430   if (i==32) i=0; \/\/\u0415\u0441\u043b\u0438 \u0432\u044b\u0432\u0435\u043b\u0438 \u0432 \u0426\u0410\u041f \u0432\u0441\u0435 32 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0437\u0430\u043d\u043e\u0432\u043e } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041d\u0435\u043f\u043b\u043e\u0445\u043e \u0431\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u043f\u0438\u0449\u0430\u043d\u0438\u0435, \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u044f\u043c\u0438 \u0442\u044e\u043d\u0435\u0440\u0430. \u0427\u0430\u0441\u0442\u043e\u0442\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430: 24 000 000 \u0413\u0446. \u0422\u0430\u0439\u043c\u0435\u0440 TIM6-&gt;PSC \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 \u043d\u0443\u043b\u044f, \u0442.\u0435. \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0430\u043a\u0442. \u0422\u0430\u0439\u043c\u0435\u0440 TIM6-&gt;ARR \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u0434\u043e 500, \u0442.\u0435. \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 501-\u0439 \u0441\u0431\u0440\u043e\u0441 TIM6-&gt;PSC \u2014 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e (24 000 000 \u0413\u0446 \/ 1) \/ 501 \u2248 47 904 \u0413\u0446. \u042d\u0442\u043e <a href=\"http:\/\/ru.wikipedia.org\/wiki\/%D0%A7%D0%B0%D1%81%D1%82%D0%BE%D1%82%D0%B0_%D0%B4%D0%B8%D1%81%D0%BA%D1%80%D0%B5%D1%82%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D0%B8\">\u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438<\/a> \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u0437\u0432\u0443\u043a\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430. \u041d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u0432 \u043f\u043e\u0434\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u043e\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0430\u043a\u0442-\u0434\u0438\u0441\u043a\u043e\u0432 \u0438 \u043f\u0438\u0440\u0430\u0442\u0441\u043a\u0438\u0445 mp3 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 44 100 \u0413\u0446. \u041d\u043e, \u043f\u0440\u0438\u0437\u043d\u0430\u0442\u044c\u0441\u044f, \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0432 \u043d\u0438\u0445 \u043f\u043e\u0432\u044b\u0448\u0435 \u2014 16 \u0431\u0438\u0442 \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0430\u0448\u0438\u0445 12. \u0423\u0432\u0435\u0440\u0435\u043d, \u0432\u044b \u044d\u0442\u043e \u0437\u043d\u0430\u043b\u0438.<\/p>\n<p>  \u0417\u0432\u0443\u043a\u043e\u0432\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u2014 \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u0430, \u043e\u0434\u0438\u043d \u043f\u0435\u0440\u0438\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043f\u0438\u0441\u0430\u043d 32 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 sin. \u0414\u0435\u043b\u0438\u043c \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u044d\u0442\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430: 47 904 \u0413\u0446 \/ 32 \u2248 1 497 \u0413\u0446. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0442\u044e\u043d\u0435\u0440 \u043d\u0430 \u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d (\u0435\u0449\u0451 \u043b\u0435\u0442 5 \u043d\u0430\u0437\u0430\u0434 \u044f \u0431\u044b \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u0438\u0432\u0438\u043b\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u0444\u0440\u0430\u0437\u0435), \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 \u0438\u2026 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0435 \u00ab\u0432\u0430\u0443!\u00bb. \u0422\u044e\u043d\u0435\u0440 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u044c \u043a F#6, \u0447\u0442\u043e <a href=\"http:\/\/ru.wikipedia.org\/wiki\/%D0%9E%D0%BA%D1%82%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D0%B8%D1%81%D1%82%D0%B5%D0%BC%D0%B0\">\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442<\/a> \u0424\u0430 \u0434\u0438\u0435\u0437 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u043e\u043a\u0442\u0430\u0432\u044b, \u0430 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u0446\u0438\u0444\u0435\u0440\u043a\u0438 \u0443\u0442\u043e\u0447\u043d\u044f\u044e\u0442 \u0447\u0430\u0441\u0442\u043e\u0442\u0443: 1 497,1 \u0413\u0446.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/-V4snM8kpeQA\/UMIJwWwPoEI\/AAAAAAAADXM\/c2u4ODo2ZK8\/s625\/DSC00357.JPG\" alt=\"image\"\/><\/p>\n<h6>\u0417\u0430\u0434\u0430\u0447\u0430 12: \u041e\u0431\u0443\u0447\u0438\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043d\u043e\u0442\u043d\u043e\u0439 \u0433\u0440\u0430\u043c\u043e\u0442\u0435<\/h6>\n<p>  \u0422.\u043a. \u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u0443\u0447\u0438\u043b\u0441\u044f \u0432 \u043c\u0443\u0437\u044b\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0448\u043a\u043e\u043b\u0435, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0438\u0449\u0430\u043d\u0438\u0435 \u043d\u0430 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0447\u0430\u0441\u0442\u043e\u0442\u0435 \u043c\u0435\u043d\u044f \u043c\u0430\u043b\u043e \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u043a\u0440\u0443\u0433\u043b\u0443\u044e \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438. \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f, \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u0431\u043e\u043b\u0435\u0435 5 \u043a\u0413\u0446 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e, <a href=\"http:\/\/ru.wikipedia.org\/wiki\/%D0%A7%D0%B0%D1%81%D1%82%D0%BE%D1%82%D0%B0_%D0%9D%D0%B0%D0%B9%D0%BA%D0%B2%D0%B8%D1%81%D1%82%D0%B0\">\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e<\/a> \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 10 \u043a\u0413\u0446. \u0412\u043d\u043e\u0441\u0438\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432 \u0442\u0430\u0439\u043c\u0435\u0440\u044b: <br \/>  TIM6-&gt;PSC = 23; \/\/ \u042d\u0442\u043e 1 M\u0413\u0446<br \/>  TIM6-&gt;ARR = 99; \/\/ \u041f\u0440\u0438 PSC 23 \u0438 ARR 99 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u044b\u0435 100 \u043c\u043a\u0441 (10 \u043a\u0413\u0446)<br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u0431\u0435\u0440\u0451\u043c \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u043d\u043e\u0442\u044b \u041b\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0421\u0443\u0431\u043a\u043e\u043d\u0442\u0440\u043e\u043a\u0442\u0430\u0432\u044b \u2014 27,5 \u0413\u0446. \u041b\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u044d\u0442\u043e\u0439 \u043d\u043e\u0442\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0446\u0435\u043b\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u0430\u043b\u043e\u043d\u043e\u043c (440 \u0413\u0446 \u041f\u0435\u0440\u0432\u043e\u0439 \u043e\u043a\u0442\u0430\u0432\u044b, \u043e\u0431\u044b\u0447\u043d\u043e \u043a\u0430\u043c\u0435\u0440\u0442\u043e\u043d\u044b \u0432\u0438\u0431\u0440\u0438\u0440\u0443\u044e\u0442 \u0441 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439), \u043e\u0442 \u043d\u0435\u0451 \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435 <img decoding=\"async\" src=\"http:\/\/upload.wikimedia.org\/math\/b\/b\/1\/bb19571aab5b1e52ae5dfef58bc330b7.png\" alt=\"image\"\/> \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 11 \u043d\u043e\u0442 (\u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u0434\u0438\u0435\u0437\u043e\u0432). \u0427\u0430\u0441\u0442\u043e\u0442\u044b \u043d\u043e\u0442 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u043e\u043a\u0442\u0430\u0432 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430 \u0440\u043e\u0432\u043d\u043e \u0432 \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 (\u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0444\u043e\u0440\u043c\u0443\u043b\u0443 12 \u0432\u043c\u0435\u0441\u0442\u043e n \u0438 \u0443\u0431\u0435\u0436\u0434\u0430\u0435\u043c\u0441\u044f \u0432 \u044d\u0442\u043e\u043c). <\/p>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u0432\u044b\u0431\u043e\u0440: \u043b\u0438\u0431\u043e \u043d\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0440\u0430\u0441\u0447\u0451\u0442\u043e\u043c \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u044b, \u043b\u0438\u0431\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0435\u0433\u043e \u043f\u0430\u043c\u044f\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 Excel \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041f\u0435\u0440\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u044f \u043d\u0435 \u0441\u0442\u0430\u043b \u0434\u0430\u0436\u0435 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c, \u0442. \u043a. \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043b, \u0447\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u043d\u0435 \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0441 \u0440\u0430\u0441\u0447\u0451\u0442\u043e\u043c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043d\u043e\u0442 (\u0430\u043a\u043a\u043e\u0440\u0434\u043e\u0432), \u0438\u0445 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0438 \u043f\u0440. \u0437\u0430 2 400 \u0442\u0430\u043a\u0442\u043e\u0432. \u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Excel, \u0434\u0443\u043c\u0430\u044e, \u0434\u043b\u044f \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f \u0425\u0430\u0431\u0440\u0430 \u044d\u0442\u043e \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0442\u0440\u0443\u0434\u0430:   <\/p>\n<ol>\n<li>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043a\u0442\u0430\u0432, \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u043e 12 \u043d\u043e\u0442 (\u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0434\u0438\u0435\u0437\u0430\u043c\u0438).<\/li>\n<li>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0442\u044b \u0440\u0430\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435 \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 (\u041b\u044f \u2014 27,5 \u0413\u0446) \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u0442\u0443\u043f\u0435\u043d\u0435\u0439 \u0434\u043e \u043d\u0435\u0451 (\u041b\u044f# \u2014 \u044d\u0442\u043e +1 \u0441\u0442\u0443\u043f\u0435\u043d\u044c, \u0421\u0438 \u2014 +2 \u0441\u0442\u0443\u043f\u0435\u043d\u0438, \u041b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043e\u043a\u0442\u0430\u0432\u044b \u2014 +12 \u0441\u0442\u0443\u043f\u0435\u043d\u0435\u0439).<\/li>\n<li>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u043b\u0438\u043d\u044b \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445 \u043f\u0443\u0442\u0451\u043c \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u043d\u0430 \u0447\u0430\u0441\u0442\u043e\u0442\u0443, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u0435\u043b\u0438\u043c \u043d\u0430 10 000 \u0413\u0446, \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0435\u043c \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043d\u043e\u0442\u044b \u043f\u0440\u0438 \u0447\u0430\u0441\u0442\u043e\u0442\u0435 10 000 \u0413\u0446.<\/li>\n<li>\u0412\u044b\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0441\u0438\u043d\u0443\u0441\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043d\u043e\u0442\u044b \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u044d\u0442\u043e\u0439 \u043d\u043e\u0442\u044b.<\/li>\n<li>\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043e\u0442 0 \u0434\u043e 4095, \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0435\u043c.<\/li>\n<\/ol>\n<p>  \u041f\u0435\u0440\u0432\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043d\u0451\u043c \u0436\u0435. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"cpp\">\/\/\u041d\u043e\u0442\u0430 \u0414\u043e const uint16_t noteC[]={ 76,2216,2383,2547,2709,2865,3017,3162,3299,3428,3547,3657,3755,3842,3917, 3979,4028,4064,4086,4095,4090,4070,4038,3991,3932,3860,3775,3679,3572, 3455,3328,3193,3050,2900,2744,2584,2419,2253,2085,1917,1749,1584,1422, 1264,1111,965,826,695,574,462,361,271,194,129,76,38,12,1,3,19,49,92,149, 218,300,393,498,613,738,871,1013,1161,1316,1475,1639,1805,1973 }; <\/code><\/pre>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u043e\u0442\u044b<\/b><\/p>\n<div class=\"spoiler_text\">  <\/p>\n<pre><code class=\"cpp\">\/\/\u041d\u043e\u0442\u0430 \u0414\u043e \u0434\u0438\u0435\u0437 const uint16_t noteCd[]={ 72,2226,2402,2576,2746,2911,3069,3220,3361,3493,3614,3722,3818,3901,3970, 4024,4063,4087,4095,4088,4065,4027,3974,3907,3825,3730,3622,3503,3372, 3231,3081,2924,2759,2590,2416,2239,2061,1883,1706,1532,1362,1196,1038, 887,744,612,490,381,284,200,130,75,35,10,0,6,27,64,116,182,263,357,464, 583,713,853,1002,1159,1323,1492,1666,1842,2020 };  const uint16_t noteD[]={ 68,2236,2423,2607,2786,2959,3124,3280,3425,3559,3680,3787,3879,3955,4016, 4059,4086,4095,4087,4061,4018,3959,3883,3792,3686,3566,3432,3288,3132, 2968,2795,2617,2433,2246,2057,1869,1682,1498,1318,1145,980,823,677,543, 421,314,221,143,82,38,10,0,7,32,74,133,207,298,403,523,655,799,954,1118, 1291,1469,1652,1839,2028 }; const uint16_t noteDd[]={ 63,2247,2445,2639,2828,3009,3181,3342,3490,3625,3745,3849,3935,4003, 4053,4084,4095,4087,4059,4012,3946,3862,3761,3643,3510,3363,3204, 3034,2854,2666,2473,2275,2076,1876,1678,1483,1293,1111,938,775, 625,488,366,260,171,100,48,14,0,6,31,76,139,220,319,434,565,710, 868,1037,1215,1402,1594,1792,1991 };  \/\/\u041d\u043e\u0442\u0430 \u041c\u0438 const uint16_t noteE[]={ 60,2259,2469,2673,2872,3061,3239,3405,3556,3691,3809,3907,3986,4044,4080, 4095,4087,4058,4008,3936,3844,3733,3604,3458,3297,3122,2937,2741,2538, 2330,2119,1907,1697,1490,1289,1097,914,744,588,447,324,219,133,69,25, 3,3,24,68,133,218,323,446,586,742,912,1095,1287,1488,1694,1905 }; const uint16_t noteF[]={ 57,2272,2493,2709,2917,3115,3300,3470,3623,3756,3870,3961,4029,4074, 4094,4089,4060,4007,3930,3831,3710,3569,3410,3234,3044,2842,2631, 2413,2190,1965,1742,1522,1309,1104,911,731,567,421,295,189,106,47, 11,0,14,51,113,199,306,434,582,748,929,1123,1329,1543,1763,1987 }; const uint16_t noteFd[]={ 54,2285,2519,2747,2966,3172,3362,3536,3689,3820,3927,4008, 4063,4091,4092,4065,4010,3929,3823,3693,3540,3367,3177, 2971,2753,2526,2291,2054,1817,1582,1354,1135,929,738,564, 410,279,171,89,33,4,3,29,83,163,269,399,550,723,912,1118,1336,1563,1797,2034 };  const uint16_t noteG[]={ 51,2299,2547,2787,3016,3230,3426,3602,3754,3880,3978,4047,4086, 4094,4071,4017,3934,3822,3683,3519,3333,3127,2905,2670,2426,2176, 1924,1674,1430,1194,972,766,580,416,276,163,79,25,1,8,47,115,213, 338,490,665,861,1075,1303,1543,1791,2042 };  const uint16_t noteGd[]={ 48,2314,2576,2829,3068,3290,3492,3668,3817,3936,4023,4076, 4095,4079,4028,3944,3828,3681,3506,3307,3086,2848,2596, 2335,2069,1802,1540,1286,1045,821,618,440,288,167,78,22, 0,14,61,143,257,401,574,771,991,1228,1479,1739,2005 }; const uint16_t noteA[]={ 45,2330,2606,2872,3123,3353,3558,3734,3878,3987,4059,4092, 4087,4043,3961,3842,3689,3504,3292,3056,2801,2532,2253, 1970,1689,1415,1153,907,684,486,319,184,85,23,0,16,71, 163,292,454,646,865,1107,1366,1639,1919 }; const uint16_t noteAd[]={ 42,2346,2639,2918,3179,3416,3624,3798,3934,4030,4083,4093, 4059,3982,3864,3707,3514,3290,3039,2767,2480,2183,1883, 1587,1301,1031,782,561,371,218,103,30,1,15,72,172,313, 490,700,940,1203,1484,1777 }; const uint16_t noteH[]={ 40,2364,2673,2967,3238,3481,3690,3859,3985,4064,4095,4076, 4009,3894,3736,3536,3301,3036,2747,2441,2126,1809,1498,1199, 922,671,453,274,137,46,3,10,65,168,316,506,732,991,1274,1577,1890 }; const uint16_t noteP[]={ \/\/ \u041c\u0443\u0437\u044b\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0430\u0443\u0437\u0430 \t\t1,2048 }; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0432\u043e\u0437\u0440\u0430\u0449\u0430\u044e\u0449\u0430\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0439 \u0435\u0439 \u043d\u043e\u0442\u044b \u0441 \u043f\u043e\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u043d\u0430 \u043e\u043a\u0442\u0430\u0432\u0443 (\u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0434\u043e 1, 2, 4, 8 \u0438 \u0442.\u0434.):<\/p>\n<pre><code class=\"cpp\">uint16_t mnote(const uint16_t *pa,char octave) \/\/ \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u044b \u043d\u043e\u0442\u044b \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 { \tint  ii=0; \tdo {ii=i;} while (ii!=i); \tii=(octave*ii)%pa[0]; \tii=*(pa+ii); \treturn ii; } <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f i \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0435 100 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f:<\/p>\n<pre><code class=\"cpp\">\/*\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043e\u0442 \u0442\u0430\u0439\u043c\u0435\u0440\u0430 6 *\/ void TIM6_DAC_IRQHandler(void) { \ti++; \tTIM6-&gt;SR &= ~TIM_SR_UIF; \/\/\u0421\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u0444\u043b\u0430\u0433 UIF } <\/code><\/pre>\n<p>  \u0412 \u043e\u0431\u0449\u0435\u043c, \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043c\u0435\u043b\u043e\u0434\u0438\u044e. \u041f\u043e\u0447\u0442\u0438 \u043a\u0430\u043a \u0432 \u0441\u0442\u0430\u0440\u044b\u0435 \u0434\u043e\u0431\u0440\u044b\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0430, \u0432 \u0441\u0438\u043d\u0442\u0435\u0437\u0430\u0442\u043e\u0440\u0435 \u043c\u0435\u043b\u043e\u0434\u0438\u0439 \u043d\u0430 Nokia:<\/p>\n<pre><code class=\"cpp\">uint16_t *melody[]={ \t\tnoteE,noteP,noteG,noteP, \t\tnoteA,noteA,noteP,noteE, \t\tnoteP,noteG,noteP,noteAd, \t\tnoteA,noteA,noteP,noteP, \t\tnoteE,noteP,noteG,noteP, \t\tnoteA,noteA,noteP,noteG, \t\tnoteP,noteE,noteP,noteP, \t\tnoteP,noteP,noteP,noteP }; <\/code><\/pre>\n<p>  \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u0443\u043b\u044c\u0442\u043e\u0432\u043e\u0439 \u043f\u0435\u0441\u043d\u0438?..<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"http:\/\/ru.wikipedia.org\/wiki\/%CC%E0%E6%EE%F0%ED%EE%E5_%F2%F0%E5%E7%E2%F3%F7%E8%E5\">\u0442\u0440\u0435\u0437\u0432\u0443\u0447\u0438\u0435<\/a> (\u0430\u043a\u043a\u043e\u0440\u0434), \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0449\u0451 \u0434\u0432\u0435 \u043c\u0435\u043b\u043e\u0434\u0438\u0438, \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043d\u043e\u0442\u0430\u043c\u0438:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\"> uint16_t *melody2[]={ \t\tnoteH,noteP,noteD,noteP, \t\tnoteE,noteE,noteP,noteH, \t\tnoteP,noteD,noteP,noteF, \t\tnoteE,noteE,noteP,noteP, \t\tnoteH,noteP,noteD,noteP, \t\tnoteE,noteE,noteP,noteD, \t\tnoteP,noteH,noteP,noteP, \t\tnoteP,noteP,noteP,noteP }; uint16_t *melody3[]={ \t\tnoteGd,noteP,noteH,noteP, \t\tnoteCd,noteCd,noteP,noteGd, \t\tnoteP,noteH,noteP,noteD, \t\tnoteCd,noteCd,noteP,noteP, \t\tnoteGd,noteP,noteH,noteP, \t\tnoteCd,noteCd,noteP,noteH, \t\tnoteP,noteGd,noteP,noteP, \t\tnoteP,noteP,noteP,noteP }; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u043b\u044f \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043d\u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0445 \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u0430\u043c\u043b\u0438\u0442\u0443\u0434 (\u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432). \u041d\u043e! \u0426\u0410\u041f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0442 0 \u0434\u043e 4095, \u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0432 \u044d\u0442\u043e\u0442 \u0436\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d. \u0415\u0441\u043b\u0438 \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u0435\u043d \u044d\u0444\u0444\u0435\u043a\u0442 \u043e\u0432\u0435\u0440\u0434\u0440\u0430\u0439\u0432\u0430, \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u0435\u043b\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0443\u044e\u0441\u044f \u0441\u0443\u043c\u043c\u0443 \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0432\u0443\u0447\u0430\u0449\u0438\u0445 \u043d\u043e\u0442, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043a\u0430\u0440\u043c\u043b\u0438\u0432\u0430\u0435\u043c \u0426\u0410\u041f\u0443. \u0418 \u0442\u0430\u043a \u043a\u0430\u0436\u0434\u044b\u0435 100 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u2026<\/p>\n<p>  \u041f\u043e\u0440\u0430 \u0432\u0441\u0451 \u044d\u0442\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u0435\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">  #include &quot;stm32f10x.h&quot; #include &quot;stm32f10x_rcc.h&quot; #include &quot;stm32f10x_gpio.h&quot;  int  i=0; uint16_t current=0; int loccurrent=0; uint16_t mnote(const uint16_t *pa,char octave) \/\/ \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u044b \u043d\u043e\u0442\u044b \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 { \tint  ii=0; \tdo {ii=i;} while (ii!=i); \tii=(octave*ii)%pa[0]; \tii=*(pa+ii); \treturn ii; }   \/\/\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0438\u043d\u0443\u0441\u0430 \u0434\u043b\u044f \u043d\u043e\u0442 \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u0436\u0434\u044b\u0435 100 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434, \u043e\u0442 0 \u0434\u043e 4095  \/\/\u041d\u043e\u0442\u0430 \u0414\u043e const uint16_t noteC[]={ \t\t76,2216,2383,2547,2709,2865,3017,3162,3299,3428,3547,3657,3755,3842,3917,3979,4028,4064,4086,4095,4090,4070,4038,3991,3932,3860,3775,3679,3572,3455,3328,3193,3050,2900,2744,2584,2419,2253,2085,1917,1749,1584,1422,1264,1111,965,826,695,574,462,361,271,194,129,76,38,12,1,3,19,49,92,149,218,300,393,498,613,738,871,1013,1161,1316,1475,1639,1805,1973 };  \/\/\u041d\u043e\u0442\u0430 \u0414\u043e \u0434\u0438\u0435\u0437 const uint16_t noteCd[]={ \t\t72,2226,2402,2576,2746,2911,3069,3220,3361,3493,3614,3722,3818,3901,3970,4024,4063,4087,4095,4088,4065,4027,3974,3907,3825,3730,3622,3503,3372,3231,3081,2924,2759,2590,2416,2239,2061,1883,1706,1532,1362,1196,1038,887,744,612,490,381,284,200,130,75,35,10,0,6,27,64,116,182,263,357,464,583,713,853,1002,1159,1323,1492,1666,1842,2020 };  const uint16_t noteD[]={ \t\t68,2236,2423,2607,2786,2959,3124,3280,3425,3559,3680,3787,3879,3955,4016,4059,4086,4095,4087,4061,4018,3959,3883,3792,3686,3566,3432,3288,3132,2968,2795,2617,2433,2246,2057,1869,1682,1498,1318,1145,980,823,677,543,421,314,221,143,82,38,10,0,7,32,74,133,207,298,403,523,655,799,954,1118,1291,1469,1652,1839,2028 }; const uint16_t noteDd[]={ \t\t63,2247,2445,2639,2828,3009,3181,3342,3490,3625,3745,3849,3935,4003,4053,4084,4095,4087,4059,4012,3946,3862,3761,3643,3510,3363,3204,3034,2854,2666,2473,2275,2076,1876,1678,1483,1293,1111,938,775,625,488,366,260,171,100,48,14,0,6,31,76,139,220,319,434,565,710,868,1037,1215,1402,1594,1792,1991 };  \/\/\u041d\u043e\u0442\u0430 \u041c\u0438 const uint16_t noteE[]={ \t\t60,2259,2469,2673,2872,3061,3239,3405,3556,3691,3809,3907,3986,4044,4080,4095,4087,4058,4008,3936,3844,3733,3604,3458,3297,3122,2937,2741,2538,2330,2119,1907,1697,1490,1289,1097,914,744,588,447,324,219,133,69,25,3,3,24,68,133,218,323,446,586,742,912,1095,1287,1488,1694,1905 }; const uint16_t noteF[]={ \t\t57,2272,2493,2709,2917,3115,3300,3470,3623,3756,3870,3961,4029,4074,4094,4089,4060,4007,3930,3831,3710,3569,3410,3234,3044,2842,2631,2413,2190,1965,1742,1522,1309,1104,911,731,567,421,295,189,106,47,11,0,14,51,113,199,306,434,582,748,929,1123,1329,1543,1763,1987 }; const uint16_t noteFd[]={ \t\t54,2285,2519,2747,2966,3172,3362,3536,3689,3820,3927,4008,4063,4091,4092,4065,4010,3929,3823,3693,3540,3367,3177,2971,2753,2526,2291,2054,1817,1582,1354,1135,929,738,564,410,279,171,89,33,4,3,29,83,163,269,399,550,723,912,1118,1336,1563,1797,2034 };  const uint16_t noteG[]={ \t\t51,2299,2547,2787,3016,3230,3426,3602,3754,3880,3978,4047,4086,4094,4071,4017,3934,3822,3683,3519,3333,3127,2905,2670,2426,2176,1924,1674,1430,1194,972,766,580,416,276,163,79,25,1,8,47,115,213,338,490,665,861,1075,1303,1543,1791,2042 };  const uint16_t noteGd[]={ \t\t48,2314,2576,2829,3068,3290,3492,3668,3817,3936,4023,4076,4095,4079,4028,3944,3828,3681,3506,3307,3086,2848,2596,2335,2069,1802,1540,1286,1045,821,618,440,288,167,78,22,0,14,61,143,257,401,574,771,991,1228,1479,1739,2005 }; const uint16_t noteA[]={ \t\t45,2330,2606,2872,3123,3353,3558,3734,3878,3987,4059,4092,4087,4043,3961,3842,3689,3504,3292,3056,2801,2532,2253,1970,1689,1415,1153,907,684,486,319,184,85,23,0,16,71,163,292,454,646,865,1107,1366,1639,1919 }; const uint16_t noteAd[]={ \t\t42,2346,2639,2918,3179,3416,3624,3798,3934,4030,4083,4093,4059,3982,3864,3707,3514,3290,3039,2767,2480,2183,1883,1587,1301,1031,782,561,371,218,103,30,1,15,72,172,313,490,700,940,1203,1484,1777 }; const uint16_t noteH[]={ \t\t40,2364,2673,2967,3238,3481,3690,3859,3985,4064,4095,4076,4009,3894,3736,3536,3301,3036,2747,2441,2126,1809,1498,1199,922,671,453,274,137,46,3,10,65,168,316,506,732,991,1274,1577,1890 }; const uint16_t noteP[]={ \t\t1,2048 };    \/\/\u041c\u0435\u043b\u043e\u0434\u0438\u044f, \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0442\u043e\u043d uint16_t *melody[]={ \t\tnoteE,noteP,noteG,noteP, \t\tnoteA,noteA,noteP,noteE, \t\tnoteP,noteG,noteP,noteAd, \t\tnoteA,noteA,noteP,noteP, \t\tnoteE,noteP,noteG,noteP, \t\tnoteA,noteA,noteP,noteG, \t\tnoteP,noteE,noteP,noteP, \t\tnoteP,noteP,noteP,noteP };  \/\/\u0427\u0438\u0441\u0442\u0430\u044f \u043a\u0432\u0438\u043d\u0442\u0430 uint16_t *melody2[]={ \t\tnoteH,noteP,noteD,noteP, \t\tnoteE,noteE,noteP,noteH, \t\tnoteP,noteD,noteP,noteF, \t\tnoteE,noteE,noteP,noteP, \t\tnoteH,noteP,noteD,noteP, \t\tnoteE,noteE,noteP,noteD, \t\tnoteP,noteH,noteP,noteP, \t\tnoteP,noteP,noteP,noteP };  \/\/\u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0442\u0435\u0440\u0446\u0438\u044f uint16_t *melody3[]={ \t\tnoteGd,noteP,noteH,noteP, \t\tnoteCd,noteCd,noteP,noteGd, \t\tnoteP,noteH,noteP,noteD, \t\tnoteCd,noteCd,noteP,noteP, \t\tnoteGd,noteP,noteH,noteP, \t\tnoteCd,noteCd,noteP,noteH, \t\tnoteP,noteGd,noteP,noteP, \t\tnoteP,noteP,noteP,noteP };  int main(void) { \tGPIO_InitTypeDef PORT; \tRCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC , ENABLE); \tPORT.GPIO_Pin = (GPIO_Pin_9 | GPIO_Pin_8); \tPORT.GPIO_Mode = GPIO_Mode_Out_PP; \tPORT.GPIO_Speed = GPIO_Speed_2MHz; \tGPIO_Init(GPIOC, &PORT);    \/* \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u043e\u0440\u0442 \u0410 *\/   RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);   \/* \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0426\u0410\u041f *\/   RCC_APB1PeriphClockCmd(RCC_APB1Periph_DAC, ENABLE);   \/* \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0442\u0430\u0439\u043c\u0435\u0440 6 *\/   RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM6,ENABLE);    \/* \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043d\u043e\u0433\u0443 \u0426\u0410\u041f\u0430 *\/   GPIO_InitTypeDef GPIO_InitStructure;   GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4;   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;   GPIO_Init(GPIOA, &GPIO_InitStructure);      TIM6-&gt;PSC = 23; \/\/\u041f\u0440\u0438 24000-1 \u0431\u0443\u0434\u0435\u0442 1000\u0413\u0446   TIM6-&gt;ARR = 99; \/\/\u041f\u0440\u0438 PSC 23 \u0438 ARR 99 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u044b\u0435 100 \u043c\u043a\u0441   TIM6-&gt;DIER |= TIM_DIER_UIE; \/\/\u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u043e\u0442 \u0442\u0430\u0439\u043c\u0435\u0440\u0430   TIM6-&gt;CR1 |= TIM_CR1_CEN; \/\/ \u041d\u0430\u0447\u0430\u0442\u044c \u043e\u0442\u0441\u0447\u0451\u0442!   NVIC_EnableIRQ(TIM6_DAC_IRQn); \/\/\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 TIM6_DAC_IRQn \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f    \/* \u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c DAC1 *\/   DAC-&gt;CR |= DAC_CR_EN1;    \/* \u0411\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b *\/   while (1)   { \t\tGPIOC-&gt;BRR=GPIO_BRR_BR8; \t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS9; \t  do \t  { \t\t  loccurrent=i; \t  } while (i!=loccurrent); \/\/\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0432 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f\u0445 \t\tGPIOC-&gt;BRR=GPIO_BRR_BR9; \t\tGPIOC-&gt;BSRR=GPIO_BSRR_BS8; \t\tcurrent=(loccurrent\/(2000))%32; \/\/\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u043d\u043e\u0442\u0430 \u0438\u0437 \u043c\u0435\u043b\u043e\u0434\u0438\u0438, \u043e\u0442 0 \u0434\u043e 31. \t\tDAC-&gt;DHR12R1=(mnote(melody[current],1)+mnote(melody2[current],1)+mnote(melody[current],2)+mnote(melody2[current],2)+mnote(melody[current],4)+mnote(melody3[current],2))\/6;   } }  \/*\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043e\u0442 \u0442\u0430\u0439\u043c\u0435\u0440\u0430 6 *\/ void TIM6_DAC_IRQHandler(void) { \ti++; \tTIM6-&gt;SR &= ~TIM_SR_UIF; \/\/\u0421\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u0444\u043b\u0430\u0433 UIF } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441, \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u044b \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u0432\u0443\u043a? \u0414\u0430. <\/p>\n<h6>\u0417\u0430\u0434\u0430\u0447\u0430 13: \u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0437\u0432\u0443\u043a\u043e\u0432 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430<\/h6>\n<p>  \u0421\u0440\u0430\u0437\u0443 \u0433\u043e\u0432\u043e\u0440\u044e, \u0435\u0441\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435, \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0437\u0443\u043c\u043d\u044b\u0435 <a href=\"http:\/\/we.easyelectronics.ru\/STM32\/vosproizvedenie-zvuka-na-stm32-discovery-pri-pomoschi-speex.html\">\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b<\/a> \u043e\u0437\u0432\u0443\u0447\u043a\u0438 STM32VLDiscovery, \u043d\u043e \u043c\u043d\u0435 \u043d\u0435 \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0438\u0445 \u043e\u0441\u0432\u0430\u0438\u0432\u0430\u0442\u044c. \u041c\u043e\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c:<br \/>  1. \u0418\u0449\u0435\u043c \u043d\u0430 Youtube \u0437\u0432\u0443\u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044f Aston Martin.<br \/>  2. \u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c (\u0438\u043b\u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c) \u044d\u0442\u043e\u0442 \u0437\u0432\u0443\u043a.<br \/>  3. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0432 \u0430\u0443\u0434\u0438\u043e\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 (\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 <a href=\"http:\/\/audacity.sourceforge.net\/\">Audacity<\/a>).<br \/>  4. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u0443\u044e \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438. \u042f \u0432\u044b\u0431\u0440\u0430\u043b 24 \u043a\u0413\u0446. \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u044d\u043c\u043f\u043b \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 2 \u0431\u0430\u0439\u0442\u0430, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u0435\u0433\u043e 2-3 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u043c\u043e\u043d\u043e-\u0437\u0432\u0443\u043a\u0430. \u0412 \u0441\u0430\u043c\u044b\u0439 \u0440\u0430\u0437.<br \/>  5. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043a\u043e\u0440\u043e\u0442\u0435\u043d\u044c\u043a\u0438\u0439 \u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0439 WAV-\u0444\u0430\u0439\u043b.<br \/>  6. \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b (\u0432\u0440\u043e\u0434\u0435 WAV 2 TEXT) \u2014 \u0434\u0430-\u0434\u0430, \u0437\u0432\u0443\u043a \u0432 \u0442\u0435\u043a\u0441\u0442. \u0412\u0435\u0440\u043d\u0435\u0435, \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0430\u043c\u043b\u0438\u0442\u0443\u0434.<br \/>  7. \u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0442 0 \u0434\u043e 4095 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Excel. \u0412\u0441\u0435 60 000 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0432 Notepad++ \u0438\u043b\u0438 Sublime Text, \u043c\u0430\u0441\u0441\u043e\u0432\u043e \u043c\u0435\u043d\u044f\u0435\u043c \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0438 \u043d\u0430 \u0437\u0430\u043f\u044f\u0442\u044b\u0435. \u0422\u0430\u043a\u0436\u0435 \u0432 Excel \u044f \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u043b \u043a\u0430\u0436\u0434\u044b\u0435 30 \u0441\u0442\u0440\u043e\u043a \u0431\u0443\u043a\u0432\u0443, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u0432\u0441\u0435 \u0438\u0445 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0441\u0442\u0440\u043e\u043a\u0438 \u2014 CoIDE \u043d\u0435 \u043b\u044e\u0431\u0438\u0442 \u0434\u043b\u0438\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438\u2026<br \/>  8. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043c\u0430\u0441\u0441\u0438\u0432. <\/p>\n<p>  \u041f\u043e\u0436\u0430\u043b\u0443\u0439, over 9000 \u0447\u0438\u0441\u0435\u043b \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u0438\u0434\u0435\u043e:<\/p>\n<p>  <iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"http:\/\/www.youtube.com\/embed\/NIDG6INFt7w\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p>  \u0412 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u043e\u0442\u0430\u043b\u0438 \u0442\u043e\u043f\u0438\u043a \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u0438 \u043d\u0435 \u0432\u0438\u0434\u0435\u043b\u0438, \u043a\u0430\u043a, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043c\u0430\u0448\u0438\u043d\u043a\u0430 \u0435\u0437\u0434\u0438\u0442, \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e \u0432\u0438\u0434\u0435\u043e:<\/p>\n<p>  <iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"http:\/\/www.youtube.com\/embed\/CN3lW_b-Rcs\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p>  \u041a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a. \t\t\t \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/161993\/\"> http:\/\/habrahabr.ru\/post\/161993\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u041d\u0438\u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043d \u043c\u043e\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u043e\u043f\u044b\u0442 \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c \u0432 \u043b\u0438\u0446\u0435 <a href=\"http:\/\/www.st.com\/internet\/evalboard\/product\/250863.jsp\">STM32VLDiscovery<\/a>, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043c\u0430\u0448\u0438\u043d\u043a\u0430 \u0438\u0437 LEGO, \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u0430\u044f \u0441 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430, \u0438 \u0435\u0449\u0451 \u043a\u043e\u0435-\u0447\u0442\u043e. \u042f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u0438\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u0443\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044e, \u043d\u043e, \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u044e \u0441\u0440\u0430\u0437\u0443, \u043d\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u00ab\u043a\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u00bb. \u041f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0430 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435\u043c \u0438 \u043d\u0435 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0443. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/-IWRVoqjjs5s\/UMIKBJxzZCI\/AAAAAAAADXY\/6hVu8wRWsuE\/s625\/DSC00350.JPG\" alt=\"image\"\/><\/p>\n<h4>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435:<\/h4>\n<p>  <\/p>\n<ol>\n<li>\u041f\u0435\u0440\u0432\u044b\u0439 \u043a\u043e\u043d\u0442\u0430\u043a\u0442 \u0441 \u043c\u0438\u043a\u0440\u043e\u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u0438\u043a\u043e\u0439. <\/li>\n<li>\u0421\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u043c\u0430\u0448\u0438\u043d\u043a\u0438 \u043d\u0430 \u043d\u0435\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0445.<\/li>\n<li>\u041d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u0441 STM32. \u0421\u0440\u0435\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u043a \u043c\u0430\u0448\u0438\u043d\u043a\u0435.<\/li>\n<li>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0443\u0433\u043e\u043b \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u043f\u0435\u0440\u0435\u0434\u043d\u0438\u0445 \u043a\u043e\u043b\u0451\u0441 \u2014 \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0432\u044f\u0437\u044c \u0447\u0435\u0440\u0435\u0437 \u0410\u0426\u041f.<\/li>\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0426\u0410\u041f \u0434\u043b\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0437\u0432\u0443\u043a\u043e\u0432.<\/li>\n<\/ol>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-161993","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/161993","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=161993"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/161993\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=161993"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=161993"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=161993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}