{"id":94292,"date":"2021-03-14T10:12:55","date_gmt":"2021-03-14T04:12:55","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=94292"},"modified":"2022-01-08T11:48:15","modified_gmt":"2022-01-08T05:48:15","slug":"%d1%80%d0%b0%d0%b1%d0%be%d1%82%d0%b0-%d1%81-%d0%bf%d1%80%d0%b5%d1%80%d1%8b%d0%b2%d0%b0%d0%bd%d0%b8%d1%8f%d0%bc%d0%b8-pcint023","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=94292","title":{"rendered":"\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f\u043c\u0438 PCINT0\u202623"},"content":{"rendered":"<p style=\"text-align: center;\"><strong>Atmega328<\/strong><\/p>\n<hr \/>\n<p style=\"text-align: left;\"><strong>PCINT0\u202623 <\/strong>\u2014 \u044d\u0442\u043e \u0432\u0445\u043e\u0434\u044b \u0434\u043b\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043d\u0430 \u0432\u0445\u043e\u0434\u0430\u0445 PCINT0..23.<\/p>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/03\/328Pinout.jpg\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-94295\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/03\/328Pinout.jpg\" alt=\"\" width=\"1193\" height=\"583\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/03\/328Pinout.jpg 1193w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/03\/328Pinout-200x98.jpg 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/03\/328Pinout-500x244.jpg 500w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/03\/328Pinout-768x375.jpg 768w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/03\/328Pinout-1024x500.jpg 1024w\" sizes=\"auto, (max-width: 1193px) 100vw, 1193px\" \/><\/a><\/p>\n<p>\u0417\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432:<\/p>\n<p>&nbsp;<\/p>\n<p>\u0420\u0435\u0433\u0438\u0441\u0442\u0440 <strong>PCICR<\/strong> &#8212; \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u0430\u043a\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443 \u0432\u0445\u043e\u0434\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f:<\/p>\n<table style=\"width: 700px;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"width: 70px; text-align: center;\"><strong>7<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>6<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>5<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>4<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>3<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>2<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>1<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>0<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 70px; text-align: center;\"><\/td>\n<td style=\"width: 70px; text-align: center;\"><\/td>\n<td style=\"width: 70px; text-align: center;\"><\/td>\n<td style=\"width: 70px; text-align: center;\"><\/td>\n<td style=\"width: 70px; text-align: center;\"><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>PCIE2<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>PCIE1<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>PCIE0<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u0413\u0440\u0443\u043f\u043f\u0430 PCIE2 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0432\u0445\u043e\u0434\u044b PCINT[23:16], PCIE1 \u0437\u0430 PCINT[14:8], \u0430 \u0433\u0440\u0443\u043f\u043f\u0430 PCIE0 \u0437\u0430 \u0432\u0445\u043e\u0434\u044b PCINT[7:0].<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<p><strong>PCICR |= (1 &lt;&lt; PCIE0);<\/strong> \/\/ \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0433\u0440\u0443\u043f\u043f\u0443 \u0432\u0445\u043e\u0434\u043e\u0432 PCIE0 PCINT0&#8230;7<\/p>\n<p>&nbsp;<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0442\u0440\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430, \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0432\u044b\u0445\u043e\u0434 PCINT\u0445 \u0432 \u0441\u0432\u043e\u0435\u0439 \u0433\u0440\u0443\u043f\u043f\u0435:<\/p>\n<ul>\n<li>\u0420\u0435\u0433\u0438\u0441\u0442\u0440 <strong>PCMSK2<\/strong> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0432\u044b\u0445\u043e\u0434\u044b PCINT[23:16]<\/li>\n<\/ul>\n<table style=\"width: 700px;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"width: 70px; text-align: center;\"><strong>7<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>6<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>5<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>4<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>3<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>2<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>1<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>0<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 70px; text-align: center;\"><strong>PCINT23<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>PCINT22<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>PCINT21<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>PCINT20<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>PCINT19<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>PCINT18<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>PCINT17<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>PCINT16<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li>\u0420\u0435\u0433\u0438\u0441\u0442\u0440 <strong>PCMSK1<\/strong> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0432\u044b\u0445\u043e\u0434\u044b PCINT[14:8]<\/li>\n<\/ul>\n<table style=\"width: 700px;\" border=\"1\">\n<tbody>\n<tr style=\"height: 21px;\">\n<td style=\"width: 70px; text-align: center; height: 21px;\"><strong>7<\/strong><\/td>\n<td style=\"width: 70px; text-align: center; height: 21px;\"><strong>6<\/strong><\/td>\n<td style=\"width: 70px; text-align: center; height: 21px;\"><strong>5<\/strong><\/td>\n<td style=\"width: 70px; text-align: center; height: 21px;\"><strong>4<\/strong><\/td>\n<td style=\"width: 70px; text-align: center; height: 21px;\"><strong>3<\/strong><\/td>\n<td style=\"width: 70px; text-align: center; height: 21px;\"><strong>2<\/strong><\/td>\n<td style=\"width: 70px; text-align: center; height: 21px;\"><strong>1<\/strong><\/td>\n<td style=\"width: 70px; text-align: center; height: 21px;\"><strong>0<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 21px;\">\n<td style=\"width: 70px; text-align: center; height: 21px;\">&#8212;<\/td>\n<td style=\"width: 70px; text-align: center; height: 21px;\"><strong>PCINT14<\/strong><\/td>\n<td style=\"width: 70px; text-align: center; height: 21px;\"><strong>PCINT13<\/strong><\/td>\n<td style=\"width: 70px; text-align: center; height: 21px;\"><strong>PCINT12<\/strong><\/td>\n<td style=\"width: 70px; text-align: center; height: 21px;\"><strong>PCINT11<\/strong><\/td>\n<td style=\"width: 70px; text-align: center; height: 21px;\"><strong>PCINT10<\/strong><\/td>\n<td style=\"width: 70px; text-align: center; height: 21px;\"><strong>PCINT9<\/strong><\/td>\n<td style=\"width: 70px; text-align: center; height: 21px;\"><strong>PCINT8<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li>\u0420\u0435\u0433\u0438\u0441\u0442\u0440 <strong>PCMSK0<\/strong> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0432\u044b\u0445\u043e\u0434\u044b PCINT[7:0]<\/li>\n<\/ul>\n<table style=\"width: 700px;\" border=\"1\">\n<tbody>\n<tr style=\"height: 21px;\">\n<td style=\"width: 70px; height: 21px; text-align: center;\"><strong>7<\/strong><\/td>\n<td style=\"width: 70px; height: 21px; text-align: center;\"><strong>6<\/strong><\/td>\n<td style=\"width: 70px; height: 21px; text-align: center;\"><strong>5<\/strong><\/td>\n<td style=\"width: 70px; height: 21px; text-align: center;\"><strong>4<\/strong><\/td>\n<td style=\"width: 70px; height: 21px; text-align: center;\"><strong>3<\/strong><\/td>\n<td style=\"width: 70px; height: 21px; text-align: center;\"><strong>2<\/strong><\/td>\n<td style=\"width: 70px; height: 21px; text-align: center;\"><strong>1<\/strong><\/td>\n<td style=\"width: 70px; height: 21px; text-align: center;\"><strong>0<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 21px;\">\n<td style=\"width: 70px; height: 21px; text-align: center;\"><strong>PCINT7<\/strong><\/td>\n<td style=\"width: 70px; height: 21px; text-align: center;\"><strong>PCINT6<\/strong><\/td>\n<td style=\"width: 70px; height: 21px; text-align: center;\"><strong>PCINT5<\/strong><\/td>\n<td style=\"width: 70px; height: 21px; text-align: center;\"><strong>PCINT4<\/strong><\/td>\n<td style=\"width: 70px; height: 21px; text-align: center;\"><strong>PCINT3<\/strong><\/td>\n<td style=\"width: 70px; height: 21px; text-align: center;\"><strong>PCINT2<\/strong><\/td>\n<td style=\"width: 70px; height: 21px; text-align: center;\"><strong>PCINT1<\/strong><\/td>\n<td style=\"width: 70px; height: 21px; text-align: center;\"><strong>PCINT0<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043a\u0430\u043a\u043e\u0433\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0431\u0438\u0442\u0430 \u0438\u0437 PCINT0\u202623 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c\u0443 \u0432\u044b\u0432\u043e\u0434\u0443 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430.<\/p>\n<p>\u041e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0445\u043e\u0434\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<p><strong>PCMSK0 |= (1 &lt;&lt; PCINT0);<\/strong> \/\/ \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c PCINT0 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 PCIE0<\/p>\n<p>&nbsp;<\/p>\n<p><strong>PCIFR<\/strong> &#8212; \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0444\u043b\u0430\u0433\u043e\u0432<\/p>\n<table style=\"width: 700px;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"width: 70px; text-align: center;\"><strong>7<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>6<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>5<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>4<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>3<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>2<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>1<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>0<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 70px; text-align: center;\"><\/td>\n<td style=\"width: 70px; text-align: center;\"><\/td>\n<td style=\"width: 70px; text-align: center;\"><\/td>\n<td style=\"width: 70px; text-align: center;\"><\/td>\n<td style=\"width: 70px; text-align: center;\"><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>PCIF2<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>PCIF1<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>PCIF0<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u041f\u0440\u0438 \u0441\u043c\u0435\u043d\u0435 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0438\u0437 \u0432\u044b\u0432\u043e\u0434\u043e\u0432 PCINT0\u202623 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u044b\u0437\u043e\u0432 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0444\u043b\u0430\u0433 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f PCIF0&#8230;3 (\u043d\u0430 \u043e\u0434\u043d\u0443 \u0433\u0440\u0443\u043f\u043f\u0443 \u043e\u0434\u0438\u043d \u0444\u043b\u0430\u0433). \u042d\u0442\u043e\u0442 \u0444\u043b\u0430\u0433 \u043e\u0447\u0438\u0449\u0430\u0435\u0442\u0441\u044f \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u043f\u043e\u0434\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f.<\/p>\n<div id=\"marketWidget\"><\/div>\n<p>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f\u00a0<strong>PCINTx_vect<\/strong>, \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0439 \u0433\u0440\u0443\u043f\u043f\u044b.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<p><strong>ISR(<b>PCINT0_vect<\/b>){ \/\/ \u2014 \u043a\u043e\u0434 \u2014 \/\/} <\/strong>\u2014 \u043f\u0440\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \/\/ \u2014 \u043a\u043e\u0434 \u2014 \/\/<\/p>\n<p><strong>ISR(<b>PCINT1_vect<\/b>){ \/\/ \u2014 \u043a\u043e\u0434 \u2014 \/\/} <\/strong>\u2014 \u043f\u0440\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \/\/ \u2014 \u043a\u043e\u0434 \u2014 \/\/<\/p>\n<p><strong>ISR(<b>PCINT2_vect<\/b>){ \/\/ \u2014 \u043a\u043e\u0434 \u2014 \/\/} <\/strong>\u2014 \u043f\u0440\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \/\/ \u2014 \u043a\u043e\u0434 \u2014 \/\/<\/p>\n<p>&nbsp;<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><span style=\"color: #00979c;\">int<\/span> <span style=\"color: #000000;\">i<\/span><span style=\"color: #000000;\">;<\/span>\r\n\r\n<span style=\"color: #00979c;\">void<\/span> <span style=\"color: #5e6d03;\">setup<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">)<\/span> <span style=\"color: #000000;\">{<\/span>\r\n \u00a0<span style=\"color: #000000;\">DDRB<\/span> <span style=\"color: #434f54;\">|=<\/span> <span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">1<\/span> <span style=\"color: #434f54;\">&lt;&lt;<\/span> <span style=\"color: #000000;\">PB5<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span><span style=\"color: #434f54;\">\/\/ \u0432\u044b\u0445\u043e\u0434 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430 D13 (PB5) \u043d\u0430 \u043f\u043b\u0430\u0442\u0435 Arduino<\/span>\r\n \u00a0<span style=\"color: #000000;\">DDRB<\/span> <span style=\"color: #434f54;\">&amp;=<\/span> <span style=\"color: #434f54;\">~<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">1<\/span> <span style=\"color: #434f54;\">&lt;&lt;<\/span> <span style=\"color: #000000;\">0<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #000000;\">PORTB<\/span> <span style=\"color: #434f54;\">|=<\/span> <span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">1<\/span> <span style=\"color: #434f54;\">&lt;&lt;<\/span> <span style=\"color: #000000;\">0<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ \u0432\u044b\u0445\u043e\u0434 PCINT0 (D8) \u043a\u0430\u043a \u0432\u044b\u0445\u043e\u0434, \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c<\/span>\r\n \u00a0<span style=\"color: #000000;\">PCICR<\/span> <span style=\"color: #434f54;\">|=<\/span> <span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">1<\/span> <span style=\"color: #434f54;\">&lt;&lt;<\/span> <span style=\"color: #000000;\">PCIE0<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0433\u0440\u0443\u043f\u043f\u0443 \u0432\u0445\u043e\u0434\u043e\u0432 PCIE0 PCINT0...7<\/span>\r\n \u00a0<span style=\"color: #000000;\">PCMSK0<\/span> <span style=\"color: #434f54;\">|=<\/span> <span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">1<\/span> <span style=\"color: #434f54;\">&lt;&lt;<\/span> <span style=\"color: #000000;\">PCINT0<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c PCINT0 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 PCIE0<\/span>\r\n<span style=\"color: #000000;\">}<\/span>\r\n\r\n<span style=\"color: #00979c;\">void<\/span> <span style=\"color: #5e6d03;\">loop<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">)<\/span> <span style=\"color: #000000;\">{<\/span>\r\n \u00a0<span style=\"color: #000000;\">PORTB<\/span> <span style=\"color: #434f54;\">|=<\/span> <span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">1<\/span> <span style=\"color: #434f54;\">&lt;&lt;<\/span> <span style=\"color: #000000;\">5<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ PB5 \u0432\u044b\u0445\u043e\u0434 1<\/span>\r\n \u00a0<span style=\"color: #5e6d03;\">if<\/span> <span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">i<\/span> <span style=\"color: #434f54;\">==<\/span> <span style=\"color: #000000;\">1<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #d35400;\">delay<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">5000<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #000000;\">i<\/span> <span style=\"color: #434f54;\">=<\/span> <span style=\"color: #000000;\">0<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ \u043a\u0430\u043a \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u043e\u0436\u0434\u0430\u0442\u044c 5 \u0441\u0435\u043a\u0443\u043d\u0434<\/span>\r\n<span style=\"color: #000000;\">}<\/span>\r\n\r\n<span style=\"color: #000000;\">ISR<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">PCINT0_vect<\/span><span style=\"color: #000000;\">)<\/span> <span style=\"color: #000000;\">{<\/span>\r\n \u00a0<span style=\"color: #000000;\">PORTB<\/span> <span style=\"color: #434f54;\">&amp;=<\/span> <span style=\"color: #434f54;\">~<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">1<\/span> <span style=\"color: #434f54;\">&lt;&lt;<\/span> <span style=\"color: #000000;\">5<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ \u043f\u043e\u0433\u0430\u0441\u0438\u0442\u044c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u043d\u0430 D13<\/span>\r\n \u00a0<span style=\"color: #000000;\">i<\/span> <span style=\"color: #434f54;\">=<\/span> <span style=\"color: #000000;\">1<\/span><span style=\"color: #000000;\">;<\/span>\r\n<span style=\"color: #000000;\">}<\/span>\r\n<\/pre>\n<p>\u0421\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u043d\u0430 \u043f\u043b\u0430\u0442\u0435 Arduino Uno \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u043a PB5 \u0433\u043e\u0440\u0438\u0442 \u0432\u0441\u0435\u0433\u0434\u0430, \u0435\u0441\u043b\u0438 \u043a\u0440\u0430\u0442\u043a\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u043c\u043a\u043d\u0443\u0442\u044c \u0432\u0445\u043e\u0434 PCINT0 \u043d\u0430 GND, \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u043f\u043e\u0433\u0430\u0441\u043d\u0435\u0442 \u043d\u0430 5 \u0441\u0435\u043a\u0443\u043d\u0434 \u0438 \u0437\u0430\u0433\u043e\u0440\u0438\u0442\u0441\u044f \u0432\u043d\u043e\u0432\u044c.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Atmega328 PCINT0\u202623 \u2014 \u044d\u0442\u043e \u0432\u0445\u043e\u0434\u044b \u0434\u043b\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043d\u0430 \u0432\u0445\u043e\u0434\u0430\u0445 PCINT0..23. \u0417\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432: &nbsp; \u0420\u0435\u0433\u0438\u0441\u0442\u0440 PCICR &#8212; \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u0430\u043a\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443 \u0432\u0445\u043e\u0434\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f: 7 6 5 4 3 2 1 0 PCIE2 PCIE1 PCIE0 \u0413\u0440\u0443\u043f\u043f\u0430 PCIE2 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0432\u0445\u043e\u0434\u044b PCINT[23:16], PCIE1 \u0437\u0430 PCINT[14:8], [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":94262,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[239,285],"tags":[],"class_list":["post-94292","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","category-atmega328-arduino-ide"],"views":7701,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/94292","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=94292"}],"version-history":[{"count":4,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/94292\/revisions"}],"predecessor-version":[{"id":111148,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/94292\/revisions\/111148"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/94262"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=94292"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=94292"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=94292"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}