{"id":275911,"date":"2016-03-11T11:07:10","date_gmt":"2016-03-11T08:07:10","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=275911"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=275911","title":{"rendered":"\u0417\u0430\u043c\u0435\u043d\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0439 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u0430 \u0446\u0438\u0444\u0440\u043e\u0432\u0443\u044e \u0432 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u043e\u043c \u0431\u043b\u043e\u043a\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f HY3005D"},"content":{"rendered":"<p>       \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u0439\u0434\u0435\u0442 \u0440\u0435\u0447\u044c \u043e \u0437\u0430\u043c\u0435\u043d\u0435 \u0448\u0442\u0430\u0442\u043d\u044b\u0445 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u043e\u043c\u0435\u0442\u0440\u043e\u0432 \u043d\u0430 \u043c\u0435\u0445\u0430\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u044d\u043d\u043a\u043e\u0434\u0435\u0440\u044b EC11 (\u043d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u0434\u0430\u0442\u0447\u0438\u043a\u0438 \u0443\u0433\u043b\u0430 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430) \u0432 \u0431\u043b\u043e\u043a\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f Mastech HY3005D \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 PIC16F1829 \u0438 \u0441\u0434\u0432\u0438\u0433\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 74HC595 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0435\u0439 \u0426\u0410\u041f \u043d\u0430 \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u0435 R2R<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435<\/h4>\n<p>  \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u043b \u0431\u043b\u043e\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f Mastech HY3005D. \u041d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u2014 \u0438\u0441\u0442\u0435\u0440\u043b\u043e\u0441\u044c \u0433\u0440\u0430\u0444\u0438\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435 \u0440\u0435\u043e\u0441\u0442\u0430\u0442\u043e\u0432 \u0438 \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u043b\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439. \u041f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0440\u0435\u043e\u0441\u0442\u0430\u0442\u043e\u0432 \u043d\u0435 \u043d\u0430\u0448\u043b\u043e\u0441\u044c \u0438 \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0435 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435, \u0430 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438.<\/p>\n<p>  \u0423\u0440\u043e\u0432\u0435\u043d\u044c \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u0438 \u0442\u043e\u043a\u0430 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u043f\u043e\u0440\u043d\u044b\u043c \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u043c \u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0443\u0441\u0438\u043b\u0438\u0442\u0435\u043b\u0438. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u043e\u043c\u0435\u0442\u0440\u043e\u0432 \u0437\u0430\u043c\u0435\u043d\u0438\u0432 \u0438\u0445 \u043d\u0430 \u0426\u0410\u041f \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0439 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435.<\/p>\n<p>  \u0412 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 microchip \u044f \u043d\u0435 \u0441\u043c\u043e\u0433 \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0438\u043c\u0435\u044e\u0449\u0435\u0433\u043e \u0434\u0432\u0430 \u0426\u0410\u041f \u043d\u0430 \u0431\u043e\u0440\u0442\u0443, \u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0426\u0410\u041f \u0438\u043c\u0435\u044e\u0442 \u043d\u0435 \u043c\u0430\u043b\u044b\u0439 \u0446\u0435\u043d\u043d\u0438\u043a \u0438 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u043b\u0438\u0448\u043d\u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u043b \u0441\u0434\u0432\u0438\u0433\u043e\u0432\u044b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b 74HC595 \u0438 \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u044b R2R. \u041c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 PIC16F1829 \u0443\u0436\u0435 \u0431\u044b\u043b \u0432 \u043d\u0430\u043b\u0438\u0447\u0438\u0438.<\/p>\n<p>  \u0414\u043b\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0445\u0435\u043c\u0435 \u0432\u0441\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0432\u0435\u0434\u0435\u043d\u044b \u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0443 \u2014 \u0437\u0430\u043c\u0435\u043d\u0435 \u0431\u043b\u043e\u043a\u0430 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0435.<\/p>\n<h4>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b<\/h4>\n<p>  \u0412 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0445\u0435\u043c\u044b \u043b\u0435\u0436\u0438\u0442 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 <a href=\"http:\/\/ww1.microchip.com\/downloads\/en\/DeviceDoc\/41440A.pdf\">PIC16F1829<\/a> \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043d\u0430 \u0447\u0430\u0441\u0442\u043e\u0442\u0435 32\u041c\u0413\u0446. \u0422\u0430\u043a\u0442\u043e\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u043e\u0441\u0442\u0430 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c \u0442\u0430\u043a\u0442\u043e\u0432\u044b\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c, \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0434\u0430\u0442\u0430\u0448\u0438\u0442\u0443 \u043e\u043d \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0442\u043e\u0447\u043d\u044b\u0439, \u043d\u043e \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0445\u0435\u043c\u044b \u044d\u0442\u043e \u043d\u0435 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e. \u041f\u043b\u044e\u0441\u043e\u043c \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u041c\u041a \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u043e\u0432 \u043d\u0430 \u0432\u0441\u0435\u0445 \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u0432\u0445\u043e\u0434\u0430\u0445 \u0438 \u0434\u0432\u0430 MSSP \u043c\u043e\u0434\u0443\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0445 SPI. \u0412\u0441\u0435 18 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0432\u044b\u0432\u043e\u0434\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b.<\/p>\n<p>  \u041d\u0430 \u0441\u0434\u0432\u0438\u0433\u043e\u0432\u043e\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435 <a href=\"https:\/\/www.nxp.com\/documents\/data_sheet\/74HC_HCT595.pdf\">74HC595<\/a> \u0438 R2R \u043c\u0430\u0442\u0440\u0438\u0446\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0426\u0410\u041f. \u041a \u043f\u043b\u044e\u0441\u0430\u043c \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0434\u0432\u0438\u0433\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u043d\u0435 \u0441\u0431\u0438\u0432\u0430\u044f \u0442\u0435\u043a\u0443\u0449\u0438\u0435 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041c\u0430\u0442\u0440\u0438\u0446\u0430 R2R \u0441\u043e\u0431\u0440\u0430\u043d\u0430 \u043d\u0430 \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u0430\u0445 \u0441 \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c\u044e 1% \u0432 \u043a\u043e\u0440\u043f\u0443\u0441\u0435 SMD 0402. \u0421\u0442\u043e\u0438\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0447\u0442\u043e \u0432\u044b\u0431\u043e\u0440\u043e\u0447\u043d\u044b\u0435 \u0437\u0430\u043c\u0435\u0440\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 10 \u041e\u043c.<\/p>\n<p>  \u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0432 \u041c\u041a \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u044b \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u0432\u0441\u0435\u0445 \u0432\u0445\u043e\u0434\u0430\u0445 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0441\u0445\u0435\u043c\u0443. \u0412\u0441\u0435 \u0432\u044b\u0445\u043e\u0434\u044b \u0441 \u044d\u043d\u043a\u043e\u0434\u0435\u0440\u043e\u0432 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a \u0432\u044b\u0432\u043e\u0434\u0430\u043c \u041c\u041a, \u0432\u0441\u0435\u0433\u043e 4 \u044d\u043d\u043a\u043e\u0434\u0435\u0440\u0430 \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e \u0434\u0432\u0430 \u0432\u044b\u0432\u043e\u0434\u0430 \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u0433\u043e \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u0438 \u043e\u0434\u0438\u043d \u0434\u043b\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0438. \u0418\u0442\u043e\u0433\u043e 12 \u0432\u044b\u0432\u043e\u0434\u043e\u0432 \u041c\u041a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u0440\u0435\u0431\u0435\u0437\u0433 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432 \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0435\u043c\u043a\u043e\u0441\u0442\u044c\u044e 100\u043d\u0424. \u041f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 16-\u0431\u0438\u0442\u043d\u044b\u0445 \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u0442\u043e\u043a\u0430 \u0438 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0432\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e\u0442 \u044d\u043d\u043a\u043e\u0434\u0435\u0440\u043e\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u0434\u0432\u0438\u0433\u043e\u0432\u044b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b 74HC595 \u043f\u043e SPI. \u0414\u043b\u044f \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0432\u0430 SPI-\u043c\u043e\u0434\u0443\u043b\u044f \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u043a\u0430 \u0438 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u044b \u043d\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u043f\u043e\u0434\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0441\u0434\u0432\u0438\u0433\u043e\u0432\u043e\u0433\u043e \u0431\u0443\u0444\u0435\u0440\u0430 \u0432 \u0431\u0443\u0444\u0435\u0440 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f. \u0412\u044b\u0445\u043e\u0434\u044b \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043a \u043c\u0430\u0442\u0440\u0438\u0446\u0435 R2R \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0443\u044e \u0440\u043e\u043b\u044c \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u0426\u0410\u041f. \u0412\u044b\u0445\u043e\u0434\u043d\u043e\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u0441 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u0445\u043e\u0434\u044b \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0443\u0441\u0438\u043b\u0438\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>  \u041a\u043d\u043e\u043f\u043a\u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0432 \u044d\u043d\u043a\u043e\u0434\u0435\u0440\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u043c\u0438\u043d\u0438\u043c\u0443\u043c (\u043a\u043d\u043e\u043f\u043a\u0430 \u044d\u043d\u043a\u043e\u0434\u0435\u0440\u0430 \u043f\u043b\u0430\u0432\u043d\u043e\u0439 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438) \u0438\u043b\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c (\u043a\u043d\u043e\u043f\u043a\u0430 \u044d\u043d\u043a\u043e\u0434\u0435\u0440\u0430 \u0433\u0440\u0443\u0431\u043e\u0439 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438) \u0441\u043e\u043e\u0442\u0432\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u043a\u0430 \u0438\u043b\u0438 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h4>\u0421\u0445\u0435\u043c\u0430<\/h4>\n<p>  \u0412 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u0441\u0445\u0435\u043c\u0443 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0449\u0443\u044e \u0441 \u043c\u043e\u0435\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0437\u044f\u043b \u043f\u043e \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435. \u0412\u043d\u0435\u0441 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f\u043c \u0438 \u0437\u0430\u0442\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0441\u0432\u043e\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u0421\u0445\u0435\u043c\u0443 \u0431\u043b\u043e\u043a\u0430 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u0447\u0435\u0440\u0442\u0438\u043b \u0432 TinyCAD \u2014 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0444\u0430\u0439\u043b <a href=\"https:\/\/docs.google.com\/uc?id=0B2AyAaX6M-XNUjd6NTU3dVJRV2s&amp;export=download\">HY3005D-regulator.dsn<\/a>.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c04\/fe1\/917\/c04fe19174fe4b469bd80b9a6c45139c.gif\" alt=\"image\"\/>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0435\u0439<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/484\/820\/123\/4848201239bc4dfd95b06a98798a6289.gif\" alt=\"image\"\/>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/b3e\/41c\/9f1\/b3e41c9f1ed941efb654903269157775.gif\" alt=\"image\"\/><\/p>\n<p>  \u0412\u044b\u043d\u043e\u0441\u043d\u043e\u0439 \u0431\u043b\u043e\u043a \u0441 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u043e\u0439 (\u0432\u044b\u0434\u0435\u043b\u0435\u043d \u043a\u0440\u0430\u0441\u043d\u044b\u043c) \u0432\u044b\u043d\u0435\u0441 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0445\u0435\u043c\u0443.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/1a3\/34e\/f48\/1a334ef485c24c6e94b4234b83dbeb04.png\" alt=\"image\"\/><\/p>\n<p>  \u041a \u0440\u0430\u0437\u044a\u0435\u043c\u0443 J3 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u0432\u043e\u043b\u044c\u0442\u043c\u0435\u0442\u0440 \u0441 \u0434\u0438\u0441\u043f\u043b\u0435\u0435\u043c \u043d\u0430 \u043b\u0438\u0446\u0435\u0432\u043e\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 (\u0435\u0433\u043e \u043d\u0435\u0442 \u043d\u0430 \u0441\u0445\u0435\u043c\u0430\u0445)  <\/div>\n<\/div>\n<p>  <\/p>\n<h4>\u041f\u043b\u0430\u0442\u0430<\/h4>\n<p>  \u041f\u043b\u0430\u0442\u0443 \u0440\u0430\u0437\u0432\u043e\u0434\u0438\u043b \u0432 Sprint Layout 6 \u2014 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0444\u0430\u0439\u043b <a href=\"https:\/\/docs.google.com\/uc?id=0B2AyAaX6M-XNZTZTNlpOYk5ET2s&amp;export=download\">HY3005D-regulator.lay6<\/a>. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0441\u0432\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0441\u044f, \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 lay6 \u0443\u0436\u0435 \u0441 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438, \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0432 \u0445\u043e\u0434\u0435 \u0441\u0431\u043e\u0440\u043a\u0438:<\/p>\n<ol>\n<li>\u0412 \u0440\u0430\u0437\u0432\u0440\u044b\u0432 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u044d\u043d\u043a\u043e\u0434\u0435\u0440\u0430 \u043f\u043b\u0430\u0432\u043d\u043e\u0439 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u0442\u043e\u043a\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043f\u0435\u0440\u0435\u043c\u044b\u0447\u043a\u0438 \u0440\u044f\u0434\u043e\u043c \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c \u0434\u043b\u044f \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438, \u0442.\u043a. \u0435\u043c\u043a\u043e\u0441\u0442\u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u044e\u0449\u0438\u0435 \u0434\u0440\u0435\u0431\u0435\u0437\u0433 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b\u0438 \u043f\u0440\u043e\u0448\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u0438\u043b \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u044b\u0447\u043a\u0438 \u0434\u043b\u044f \u0437\u0435\u043c\u043f\u043b\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u043c\u0438<\/li>\n<li>\u041f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u043b \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443 \u043d\u0430 5\u0412 \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0441\u043a\u0432\u043e\u0437\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u044b\u0447\u0435\u043a<\/li>\n<\/ol>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0424\u043e\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0442\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u0441\u0432\u0435\u0440\u043b\u0435\u043d\u0438\u044f (\u043f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f)<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/hsto.org\/files\/b56\/fbe\/f99\/b56fbef992864a719824721df632c0aa.jpg\" alt=\"image\"\/><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/hsto.org\/files\/7fd\/b22\/204\/7fdb222049df4ecfa7c7e2f2d2149b58.jpg\" alt=\"image\"\/>  <\/div>\n<\/div>\n<p>  \u0418\u0437\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u043b \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u043b\u0435\u043d\u043e\u0447\u043d\u043e\u0433\u043e \u0444\u043e\u0442\u043e\u0440\u0435\u0437\u0438\u0441\u0442\u0430. \u0414\u043e\u043b\u0433\u043e \u043c\u0443\u0447\u0430\u043b\u0441\u044f \u0441 \u043c\u0435\u043b\u043a\u043e\u0439 \u0440\u0430\u0437\u0432\u043e\u0434\u043a\u043e\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u0431\u044b\u043b\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043e\u0433\u0440\u0435\u0445\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0437\u0430\u0447\u0438\u0449\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0442\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u041d\u043e \u0432 \u0446\u0435\u043b\u043e\u043c \u043f\u043b\u0430\u0442\u0430 \u0443\u0434\u0430\u043b\u0430\u0441\u044c. \u0417\u0434\u0435\u0441\u044c \u0435\u0449\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0434\u0432\u0443\u0445 \u043f\u0435\u0440\u0435\u043c\u044b\u0447\u0435\u043a \u0434\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0437\u0435\u043c\u043b\u0438 \u043d\u0430 \u043b\u0438\u0446\u0435\u0432\u043e\u0439 \u0438 \u0442\u044b\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u0445.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u0441\u043b\u0435 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439 (\u0432\u0442\u043e\u0440\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f)<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/450\/175\/2fe\/4501752fed894a78be212939a76b2794.png\"\/><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/de5\/0e0\/b2c\/de50e0b2ca1c478692abefa68313ce9d.png\"\/>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0424\u043e\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0441\u043f\u0430\u0439\u043a\u0438 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043d\u0430 \u043c\u0435\u0441\u0442\u043e<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/hsto.org\/files\/401\/c45\/1ac\/401c451accad4c20a62c0021162c8a84.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0412 \u043b\u0435\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0430\u043c \u0431\u043b\u043e\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f. \u0412 \u043f\u0440\u0430\u0432\u043e\u0439 \u2014 \u043b\u0438\u0446\u0435\u0432\u0430\u044f \u043f\u0430\u043d\u0435\u043b\u044c \u043b\u0438\u0446\u043e\u043c \u0432 \u043d\u0438\u0437. \u0417\u0435\u043b\u0435\u043d\u044b\u0439 \u043f\u0440\u043e\u0432\u043e\u0434 \u0438\u0437 \u043b\u0435\u0432\u043e\u0433\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0433\u043b\u0430 \u0432 \u043f\u0440\u0430\u0432\u044b\u0439 \u043d\u0438\u0436\u043d\u0438\u0439 \u2014 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u0435 12\u0412.  <\/div>\n<\/div>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b, \u0432\u0441\u0435 \u0441\u0442\u0430\u0440\u044b\u0435 \u0440\u0430\u0437\u044a\u0435\u043c\u044b \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0438\u0442\u0430\u043d\u0438\u0435, \u0442.\u043a. \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u043d\u0430 \u043f\u043b\u0430\u0442\u0443 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 2.5\u0412 \u0434\u043b\u044f \u0440\u043e\u0434\u043d\u043e\u0433\u043e \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442. \u0415\u0441\u043b\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0435 \u0431\u043b\u043e\u043a\u0430 \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u0443\u0431\u0440\u0430\u0442\u044c \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0442\u0440\u043e\u043d \u043d\u0430 2.5\u0412 (V5A) \u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u044b\u0447\u043a\u0443 \u0432 \u043c\u0435\u0441\u0442\u043e \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u0430 (R1A) \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0438 \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0432\u0435\u0434\u0435\u043d\u0438\u044f 12\u0412 \u043f\u0438\u0442\u0430\u043d\u0438\u044f.<\/p>\n<h4>\u041f\u0440\u043e\u0448\u0438\u0432\u043a\u0430<\/h4>\n<p>  \u041a\u043e\u0434 \u043d\u0430 \u0421\u0438 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 XC8. \u041f\u0440\u043e\u0448\u0438\u0432\u0430\u043b \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u043c PICkit 3.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">config.h<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">\/\/ PIC16F1829 Configuration Bit Settings  \/\/ 'C' source line config statements  #include &lt;xc.h&gt;  \/\/ #pragma config statements should precede project file includes. \/\/ Use project enums instead of #define for ON and OFF.  \/\/ CONFIG1 #pragma config FOSC = INTOSC    \/\/ Oscillator Selection (INTOSC oscillator: I\/O function on CLKIN pin) #pragma config WDTE = OFF       \/\/ Watchdog Timer Enable (WDT disabled) #pragma config PWRTE = OFF      \/\/ Power-up Timer Enable (PWRT disabled) #pragma config MCLRE = OFF      \/\/ MCLR Pin Function Select (MCLR\/VPP pin function is digital input) #pragma config CP = OFF         \/\/ Flash Program Memory Code Protection (Program memory code protection is disabled) #pragma config CPD = OFF        \/\/ Data Memory Code Protection (Data memory code protection is disabled) #pragma config BOREN = OFF      \/\/ Brown-out Reset Enable (Brown-out Reset disabled) #pragma config CLKOUTEN = OFF   \/\/ Clock Out Enable (CLKOUT function is disabled. I\/O or oscillator function on the CLKOUT pin) #pragma config IESO = OFF       \/\/ Internal\/External Switchover (Internal\/External Switchover mode is disabled) #pragma config FCMEN = OFF      \/\/ Fail-Safe Clock Monitor Enable (Fail-Safe Clock Monitor is disabled)  \/\/ CONFIG2 #pragma config WRT = OFF        \/\/ Flash Memory Self-Write Protection (Write protection off) #pragma config PLLEN = OFF      \/\/ PLL Enable (4x PLL disabled) #pragma config STVREN = ON      \/\/ Stack Overflow\/Underflow Reset Enable (Stack Overflow or Underflow will cause a Reset) #pragma config BORV = LO        \/\/ Brown-out Reset Voltage Selection (Brown-out Reset Voltage (Vbor), low trip point selected.) #pragma config LVP = OFF        \/\/ Low-Voltage Programming Enable (High-voltage on MCLR\/VPP must be used for programming) <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">main.c<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">#include &quot;config.h&quot;  #define _XTAL_FREQ 32000000 #pragma intrinsic(_delay) extern void _delay(unsigned long); #define __delay_us(x) _delay((unsigned long)((x)*(_XTAL_FREQ\/4000000.0))) #define __delay_ms(x) _delay((unsigned long)((x)*(_XTAL_FREQ\/4000.0)))  #define TransferNotDone          !(SSP2STAT&0b00000001)  #define StoreAll                 LATA4 #define ResetAll                 LATC6  #define VoltageSharpCHA          RC1 #define VoltageSharpCHB          RC0 #define VoltageSharpBTN          RA2  #define VoltageSmoothCHA         RB5 #define VoltageSmoothCHB         RB4 #define VoltageSmoothBTN         RC2  #define CurrentSharpCHA          RC5 #define CurrentSharpCHB          RC4 #define CurrentSharpBTN          RC3  #define CurrentSmoothCHA         RA1 #define CurrentSmoothCHB         RA0 #define CurrentSmoothBTN         RA3  #define VoltageRateSharp         0x0100 #define VoltageRateSmooth        0x0010 #define CurrentRateSharp         0x0040 #define CurrentRateSmooth        0x0004  #define VoltageMax               0xC000 #define CurrentMax               0x5000 #define VoltageMin               0x0001 #define CurrentMin               0x0001  unsigned short VoltageBuff; unsigned short CurrentBuff;  void interrupt tc_int() { };  void SendData() {     SSP1BUF = VoltageBuff&gt;&gt;8;     SSP2BUF = CurrentBuff&gt;&gt;8;     while ( TransferNotDone );     SSP1BUF = VoltageBuff;     SSP2BUF = CurrentBuff;     while ( TransferNotDone );     StoreAll = 1;     StoreAll = 0; };  void main() {     \/\/ Configure oscillator for 32MHz     \/\/             76543210     OSCCON     = 0b11110000; \/\/B1      \/\/ Enable individual pull-ups     \/\/             76543210     OPTION_REG = 0b01111111; \/\/B1      \/\/ Configure analog port (1 - enable, 0 - disable)     \/\/             76543210     ANSELA     = 0b00000000; \/\/B3     ANSELB     = 0b00000000; \/\/B3     ANSELC     = 0b00000000; \/\/B3      \/\/ Reset latch     \/\/             76543210     LATA       = 0b00000000; \/\/B2     LATB       = 0b00000000; \/\/B2     LATC       = 0b00000000; \/\/B2      \/\/ Alternate pin function (set SDO2 on RA5)     \/\/             76543210     APFCON0    = 0b00000000; \/\/B2     APFCON1    = 0b00100000; \/\/B2      \/\/ Configure digital port (1 - input, 0 - output)     \/\/             76543210     TRISA      = 0b00001111; \/\/B1     TRISB      = 0b00110000; \/\/B1     TRISC      = 0b00111111; \/\/B1      \/\/ Configure input level (1 - CMOS, 0 - TTL)     INLVLA     = 0b11000000; \/\/B7     INLVLB     = 0b00001111; \/\/B7     INLVLC     = 0b00000000; \/\/B7      \/\/ Configure individual pull-ups (1 - enable, 0 - disable)     \/\/             76543210     WPUA       = 0b00111111; \/\/B4     WPUB       = 0b11110000; \/\/B4     WPUC       = 0b11111111; \/\/B4      ResetAll = 0;     ResetAll = 1;      \/\/ Configure SPI in master mode     \/\/             76543210   \/\/SSP1ADD     = 0b00000000; \/\/B4     SSP1STAT    = 0b01000000; \/\/B4     SSP1CON3    = 0b00000000; \/\/B4     SSP1CON1    = 0b00100000; \/\/B4   \/\/SSP1ADD     = 0b00000000; \/\/B4     SSP2STAT    = 0b01000000; \/\/B4     SSP2CON3    = 0b00000000; \/\/B4     SSP2CON1    = 0b00100000; \/\/B4      VoltageBuff = VoltageMin;     CurrentBuff = CurrentMax;     SendData();      while ( 1 ) {         if ( !VoltageSharpCHA ) {             if ( VoltageSharpCHB ) { VoltageBuff+=VoltageRateSharp; if ( VoltageBuff &gt; VoltageMax ) VoltageBuff = VoltageMax; }                               else { VoltageBuff-=VoltageRateSharp; if ( VoltageBuff &gt; VoltageMax ) VoltageBuff = VoltageMin; }             while ( !VoltageSharpCHA );             SendData();         }          if ( !VoltageSmoothCHA ) {             if ( VoltageSmoothCHB ) { VoltageBuff+=VoltageRateSmooth; if ( VoltageBuff &gt; VoltageMax ) VoltageBuff = VoltageMax; }                                else { VoltageBuff-=VoltageRateSmooth; if ( VoltageBuff &gt; VoltageMax ) VoltageBuff = VoltageMin; }             while ( !VoltageSmoothCHA );              SendData();         }          if ( !CurrentSharpCHA ) {             if ( CurrentSharpCHB ) { CurrentBuff+=CurrentRateSharp; if ( CurrentBuff &gt; CurrentMax ) CurrentBuff = CurrentMax; }                               else { CurrentBuff-=CurrentRateSharp; if ( CurrentBuff &gt; CurrentMax ) CurrentBuff = CurrentMin; }             while ( !CurrentSharpCHA );             SendData();         }          if ( !CurrentSmoothCHA ) {             if ( CurrentSmoothCHB ) { CurrentBuff+=CurrentRateSmooth; if ( CurrentBuff &gt; CurrentMax ) CurrentBuff = CurrentMax; }                                else { CurrentBuff-=CurrentRateSmooth; if ( CurrentBuff &gt; CurrentMax ) CurrentBuff = CurrentMin; }             while ( !CurrentSmoothCHA );             SendData();         }          if ( !VoltageSharpBTN  ) { VoltageBuff = VoltageMax; while ( !VoltageSharpBTN  ); SendData(); }         if ( !VoltageSmoothBTN ) { VoltageBuff = VoltageMin; while ( !VoltageSmoothBTN ); SendData(); }         if ( !CurrentSharpBTN  ) { CurrentBuff = CurrentMax; while ( !CurrentSharpBTN  ); SendData(); }         if ( !CurrentSmoothBTN ) { CurrentBuff = CurrentMin; while ( !CurrentSmoothBTN ); SendData(); }     }; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u043b\u044f \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 VoltageMin \u0438 CurrentMin \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 1, \u0442.\u043a. \u043f\u0440\u0438 0 \u0432 \u0431\u0443\u0444\u0435\u0440\u0435 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u043e\u043d\u044f\u043b \u0433\u0434\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u0420\u0435\u0439\u0442\u044b *Rate* \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u043b \u043a\u0440\u0430\u0442\u043d\u044b\u0435 \u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434. \u0414\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0430 SendData \u043d\u0435 \u0434\u0435\u043b\u0430\u043b \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u043f\u0430\u043c\u044f\u0442\u0438. \u0420\u0435\u0436\u0438\u043c \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0441 \u043d\u0438\u0437\u043a\u0438\u043c \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435\u043c (LVP) \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d, \u0438\u043d\u0430\u0447\u0435 RA3 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u0432\u0445\u043e\u0434. \u041f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f, \u043c\u0435\u0442\u043e\u0434 tc_int \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u043a\u043e\u0434\u0435 \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043b \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0431\u043b\u043e\u043a \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u041f\u041f\u0417\u0423.<\/p>\n<p>  \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043d\u044f\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u044b\u0447\u043a\u0438, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c PICkit 3 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443. \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u0435\u0440\u0435\u043c\u044b\u0447\u0435\u043a \u043d\u0430 CLK \u0438 DAT, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0432\u044b\u043f\u0430\u044f\u0442\u044c \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u043a\u043e\u043d\u0434\u0435\u043d\u0441\u0430\u0442\u043e\u0440\u044b, \u043f\u0440\u043e\u0448\u0438\u0442\u044c \u0438 \u043f\u043e\u0442\u043e\u043c \u0432\u043f\u0430\u044f\u0442\u044c \u0438\u0445 \u043e\u0431\u0440\u0430\u0442\u043d\u043e.       <\/p>\n<div class=\"clear\"><\/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=\"https:\/\/geektimes.ru\/post\/272456\/\"> https:\/\/geektimes.ru\/post\/272456\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u0439\u0434\u0435\u0442 \u0440\u0435\u0447\u044c \u043e \u0437\u0430\u043c\u0435\u043d\u0435 \u0448\u0442\u0430\u0442\u043d\u044b\u0445 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u043e\u043c\u0435\u0442\u0440\u043e\u0432 \u043d\u0430 \u043c\u0435\u0445\u0430\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u044d\u043d\u043a\u043e\u0434\u0435\u0440\u044b EC11 (\u043d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u0434\u0430\u0442\u0447\u0438\u043a\u0438 \u0443\u0433\u043b\u0430 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430) \u0432 \u0431\u043b\u043e\u043a\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f Mastech HY3005D \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 PIC16F1829 \u0438 \u0441\u0434\u0432\u0438\u0433\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 74HC595 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0435\u0439 \u0426\u0410\u041f \u043d\u0430 \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u0435 R2R  <\/p>\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-275911","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/275911","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=275911"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/275911\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=275911"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=275911"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=275911"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}