{"id":98961,"date":"2021-05-15T12:04:30","date_gmt":"2021-05-15T06:04:30","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=98961"},"modified":"2022-01-08T01:48:35","modified_gmt":"2022-01-07T19:48:35","slug":"atmega328-eeprom","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=98961","title":{"rendered":"ATmega328 EEPROM"},"content":{"rendered":"<p style=\"text-align: center;\"><strong>ATmega328<\/strong><\/p>\n<hr \/>\n<p>ATmega328 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 1024 \u0411\u0430\u0439\u0442 EEPROM (\u041f\u041f\u0417\u0423)-\u043f\u0430\u043c\u044f\u0442\u0438. \u042d\u0442\u0430 \u043f\u0430\u043c\u044f\u0442\u044c \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0434\u0438\u043d \u0431\u0430\u0439\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d \u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u043d. EEPROM (\u041f\u041f\u0417\u0423) \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0438 \u0441\u0442\u0435\u0440\u0442\u0430 \u0432 \u0441\u0443\u043c\u043c\u0435 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c 100 000 \u0440\u0430\u0437.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/03\/328Pinout.jpg\" \/><\/p>\n<p>\u0417\u0430\u043f\u0438\u0441\u044c \u0438 \u0447\u0442\u0435\u043d\u0438\u0435 EEPROM \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432:<\/p>\n<p>&nbsp;<\/p>\n<p><strong>EEARL <\/strong>\u0438<strong> EEARH <\/strong>&#8212; \u043c\u043b\u0430\u0434\u0448\u0438\u0439 \u0438 \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0430\u0434\u0440\u0435\u0441\u0430 EEPROM<\/p>\n<p>\u0422\u0430\u043a \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e EEPROM \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 1024 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 (0&#8230;1023), \u0442\u043e \u0437\u0430 \u0430\u0434\u0440\u0435\u0441\u0430 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0434\u0432\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0430\u0434\u0440\u0435\u0441\u0430 (10 \u0431\u0438\u0442)<\/p>\n<p><strong>EEARL\u00a0<\/strong><\/p>\n<table style=\"width: 700px;\" border=\"1\" width=\"700\">\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;\">EEAR7<\/td>\n<td style=\"width: 70px; text-align: center;\">EEAR6<\/td>\n<td style=\"width: 70px; text-align: center;\">EEAR5<\/td>\n<td style=\"width: 70px; text-align: center;\">EEAR4<\/td>\n<td style=\"width: 70px; text-align: center;\">EEAR3<\/td>\n<td style=\"width: 70px; text-align: center;\">EEAR2<\/td>\n<td style=\"width: 70px; text-align: center;\">EEAR1<\/td>\n<td style=\"width: 70px; text-align: center;\">EEAR0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>EEARH<\/strong><\/p>\n<table style=\"width: 700px;\" border=\"1\" width=\"700\">\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;\"><\/td>\n<td style=\"width: 70px; text-align: center;\">EEAR9<\/td>\n<td style=\"width: 70px; text-align: center;\">EEAR8<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0435\u0441\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441 EEPROM \u043f\u043e\u0434 \u043d\u043e\u043c\u0435\u0440\u043e\u043c 836 (0B1101000100), \u0442\u043e \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0430\u0434\u0440\u0435\u0441\u0430 \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/p>\n<p><strong>EEARH = 11<\/strong><\/p>\n<p><strong>EEARL = 01000100<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>EEDR<\/strong> &#8212; \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 EEPROM<\/p>\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;\" colspan=\"8\"><strong>EEDR[7:0]<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u0420\u0435\u0433\u0438\u0441\u0442\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 EEDR \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 EEPROM, \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 EEAR.<\/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>EEDR = 123;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>EE\u0421R<\/strong> &#8212; \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f EEPROM<\/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;\">&#8212;<\/td>\n<td style=\"width: 70px; text-align: center;\">&#8212;<\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>EEPM1<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>EEPM0<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>EERIE<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>EEMPE<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>EEPE<\/strong><\/td>\n<td style=\"width: 70px; text-align: center;\"><strong>EERE<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u0411\u0438\u0442\u044b \u00a0EEPM1 \u0438 EEPM0 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u043a\u0430\u043a\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0433\u0434\u0430 \u0432 \u0431\u0438\u0442 EEPE \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u0430 1. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 (\u0441\u0442\u0438\u0440\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u0440\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445) \u0438\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043e\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<table style=\"border-collapse: collapse; width: 100%;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"width: 25%; text-align: center;\"><strong>EEPM[1:0]<\/strong><\/td>\n<td style=\"width: 25%; text-align: center;\"><strong>\u0412\u0440\u0435\u043c\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/strong><\/td>\n<td style=\"width: 25%; text-align: center;\"><strong>\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 25%; text-align: center;\"><strong>00<\/strong><\/td>\n<td style=\"width: 25%; text-align: center;\"><strong>3,4 \u043c\u0441<\/strong><\/td>\n<td style=\"width: 25%; text-align: center;\"><strong>\u0441\u0442\u0438\u0440\u0430\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0437\u0430 \u043e\u0434\u043d\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f (\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u044b\u0431\u043e\u0440)<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 25%; text-align: center;\"><strong>01<\/strong><\/td>\n<td style=\"width: 25%; text-align: center;\"><strong>1,8 \u043c\u0441<\/strong><\/td>\n<td style=\"width: 25%; text-align: center;\"><strong>\u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u0435<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 25%; text-align: center;\"><strong>10<\/strong><\/td>\n<td style=\"width: 25%; text-align: center;\"><strong>1,8 \u043c\u0441<\/strong><\/td>\n<td style=\"width: 25%; text-align: center;\"><strong>\u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0438\u0441\u044c<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 25%; text-align: center;\"><strong>11<\/strong><\/td>\n<td style=\"width: 25%; text-align: center;\"><strong>&#8212;<\/strong><\/td>\n<td style=\"width: 25%; text-align: center;\"><strong>&#8212;<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u0411\u0438\u0442 EERIE &#8212; \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 EEPROM \u043f\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e &#171;\u0433\u043e\u0442\u043e\u0432\u043e \u043a \u0437\u0430\u043f\u0438\u0441\u0438&#187; .\u00a0 \u0412 \u0431\u0438\u0442 EERIE \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c 1, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u00a0 \u043a \u0432\u0435\u043a\u0442\u043e\u0440\u0443 EE READY (EE_READY_vect &#8212; \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u0433\u043e\u0442\u043e\u0432\u043d\u043e\u0441\u0442\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 EEPROM).<\/p>\n<p>\u0411\u0438\u0442\u00a0 EEMPE &#8212; \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 EEPROM \u043f\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443.<\/p>\n<p>\u0411\u0438\u0442 EEPE\u00a0 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 EEPROM. \u0411\u0438\u0442 EEMPE\u00a0 \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u0436\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0435\u0449\u0435 \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0435\u0434\u0438\u043d\u0438\u0446\u0430 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u0431\u0438\u0442 EEPE, \u0438\u043d\u0430\u0447\u0435 \u0437\u0430\u043f\u0438\u0441\u044c EEPROM \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u0430.<\/p>\n<p>\u0411\u0438\u0442 EERE \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0447\u0442\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 EEPROM \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443.<\/p>\n<div id=\"marketWidget\"><\/div>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u0447\u0442\u0435\u043d\u0438\u044f EEPROM<\/p>\n<pre><span style=\"color: #00979c;\">unsigned<\/span> <span style=\"color: #00979c;\">char<\/span> <span style=\"color: #000000;\">EEPROM_read<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #00979c;\">unsigned<\/span> <span style=\"color: #00979c;\">int<\/span> <span style=\"color: #000000;\">uiAddress<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">{<\/span>\r\n \u00a0<span style=\"color: #5e6d03;\">while<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">EECR<\/span> <span style=\"color: #434f54;\">&amp;<\/span> <span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">1<\/span><span style=\"color: #434f54;\">&lt;&lt;<\/span><span style=\"color: #000000;\">EEPE<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span> \u00a0<span style=\"color: #434f54;\">\/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0433\u043e\u0442\u043e\u0432\u043d\u043e\u0441\u0442\u0438 EEPROM <\/span>\r\n \u00a0\u00a0\u00a0<span style=\"color: #000000;\">EEARH<\/span> <span style=\"color: #434f54;\">=<\/span> <span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">uiAddress<\/span> <span style=\"color: #434f54;\">&amp;<\/span> <span style=\"color: #000000;\">0xF0<\/span><span style=\"color: #000000;\">)<\/span> <span style=\"color: #434f54;\">&lt;&lt;<\/span> <span style=\"color: #000000;\">2<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0430\u0434\u0440\u0435\u0441\u0430 H<\/span>\r\n \u00a0\u00a0\u00a0<span style=\"color: #000000;\">EEARL<\/span> <span style=\"color: #434f54;\">=<\/span> <span style=\"color: #000000;\">uiAddress<\/span> <span style=\"color: #434f54;\">&amp;<\/span> <span style=\"color: #000000;\">0x0F<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0430\u0434\u0440\u0435\u0441\u0430 L<\/span>\r\n \u00a0\u00a0\u00a0<span style=\"color: #000000;\">EECR<\/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;\">EERE<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span><span style=\"color: #434f54;\">\/\/ \u0447\u0442\u0435\u043d\u0438\u0435 EEPROM<\/span>\r\n \u00a0\u00a0\u00a0<span style=\"color: #5e6d03;\">return<\/span> <span style=\"color: #000000;\">EEDR<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ \u0432\u044b\u0432\u043e\u0434 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f<\/span>\r\n<span style=\"color: #000000;\">}<\/span>\r\n \r\n<span style=\"color: #00979c;\">void<\/span> <span style=\"color: #000000;\">EEPROM_write<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #00979c;\">unsigned<\/span> <span style=\"color: #00979c;\">int<\/span> <span style=\"color: #000000;\">uiAddress<\/span><span style=\"color: #434f54;\">,<\/span> <span style=\"color: #00979c;\">unsigned<\/span> <span style=\"color: #00979c;\">char<\/span> <span style=\"color: #000000;\">ucData<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">{<\/span>\r\n \u00a0<span style=\"color: #5e6d03;\">while<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">EECR<\/span> <span style=\"color: #434f54;\">&amp;<\/span> <span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">1<\/span><span style=\"color: #434f54;\">&lt;&lt;<\/span><span style=\"color: #000000;\">EEPE<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0433\u043e\u0442\u043e\u0432\u043d\u043e\u0441\u0442\u0438 EEPROM <\/span>\r\n \u00a0\u00a0\u00a0<span style=\"color: #000000;\">EEARH<\/span> <span style=\"color: #434f54;\">=<\/span> <span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">uiAddress<\/span> <span style=\"color: #434f54;\">&amp;<\/span> <span style=\"color: #000000;\">0xF0<\/span><span style=\"color: #000000;\">)<\/span> <span style=\"color: #434f54;\">&lt;&lt;<\/span> <span style=\"color: #000000;\">2<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0430\u0434\u0440\u0435\u0441\u0430 H<\/span>\r\n \u00a0\u00a0\u00a0<span style=\"color: #000000;\">EEARL<\/span> <span style=\"color: #434f54;\">=<\/span> <span style=\"color: #000000;\">uiAddress<\/span> <span style=\"color: #434f54;\">&amp;<\/span> <span style=\"color: #000000;\">0x0F<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0430\u0434\u0440\u0435\u0441\u0430 L<\/span>\r\n \u00a0\u00a0\u00a0<span style=\"color: #000000;\">EEDR<\/span> <span style=\"color: #434f54;\">=<\/span> <span style=\"color: #000000;\">ucData<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 <\/span>\r\n \u00a0\u00a0\u00a0<span style=\"color: #000000;\">EECR<\/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;\">EEMPE<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span><span style=\"color: #434f54;\">\/\/ \u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 EEPROM<\/span>\r\n \u00a0\u00a0\u00a0<span style=\"color: #000000;\">EECR<\/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;\">EEPE<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ \u0417\u0430\u043f\u0438\u0441\u044c \u0432 EEPROM<\/span>\r\n<span style=\"color: #000000;\">}<\/span> \r\n<\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><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<b><span style=\"color: #d35400;\">Serial<\/span><\/b><span style=\"color: #434f54;\">.<\/span><span style=\"color: #d35400;\">begin<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">9600<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\r\n\r\n \u00a0<span style=\"color: #000000;\">EEPROM_write<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">812<\/span><span style=\"color: #434f54;\">,<\/span><span style=\"color: #000000;\">123<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span><span style=\"color: #434f54;\">\/\/ \u0437\u0430\u043f\u0438\u0441\u044c \u0447\u0438\u0441\u043b\u043e 123 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 812 \u0432 EEPROM<\/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<b><span style=\"color: #d35400;\">Serial<\/span><\/b><span style=\"color: #434f54;\">.<\/span><span style=\"color: #d35400;\">println<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">EEPROM_read<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">812<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<span style=\"color: #333333;\">\/\/ \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 EEPROM 812 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0432 \u043c\u043e\u043d\u0438\u0442\u043e\u0440 \u043f\u043e\u0440\u0442\u0430<\/span><\/span>\r\n \u00a0<span style=\"color: #d35400;\">delay<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">1000<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\r\n<span style=\"color: #000000;\">}<\/span>\r\n\r\n<span style=\"color: #00979c;\">unsigned<\/span> <span style=\"color: #00979c;\">char<\/span> <span style=\"color: #000000;\">EEPROM_read<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #00979c;\">unsigned<\/span> <span style=\"color: #00979c;\">int<\/span> <span style=\"color: #000000;\">uiAddress<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">{<\/span>\r\n \u00a0<span style=\"color: #5e6d03;\">while<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">EECR<\/span> <span style=\"color: #434f54;\">&amp;<\/span> <span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">1<\/span><span style=\"color: #434f54;\">&lt;&lt;<\/span><span style=\"color: #000000;\">EEPE<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span> \u00a0<span style=\"color: #434f54;\">\/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0433\u043e\u0442\u043e\u0432\u043d\u043e\u0441\u0442\u0438 EEPROM <\/span>\r\n \u00a0\u00a0\u00a0<span style=\"color: #000000;\">EEARH<\/span> <span style=\"color: #434f54;\">=<\/span> <span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">uiAddress<\/span> <span style=\"color: #434f54;\">&amp;<\/span> <span style=\"color: #000000;\">0xF0<\/span><span style=\"color: #000000;\">)<\/span> <span style=\"color: #434f54;\">&lt;&lt;<\/span> <span style=\"color: #000000;\">2<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0430\u0434\u0440\u0435\u0441\u0430 H<\/span>\r\n \u00a0\u00a0\u00a0<span style=\"color: #000000;\">EEARL<\/span> <span style=\"color: #434f54;\">=<\/span> <span style=\"color: #000000;\">uiAddress<\/span> <span style=\"color: #434f54;\">&amp;<\/span> <span style=\"color: #000000;\">0x0F<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0430\u0434\u0440\u0435\u0441\u0430 L<\/span>\r\n \u00a0\u00a0\u00a0<span style=\"color: #000000;\">EECR<\/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;\">EERE<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span><span style=\"color: #434f54;\">\/\/ \u0447\u0442\u0435\u043d\u0438\u0435 EEPROM<\/span>\r\n \u00a0\u00a0\u00a0<span style=\"color: #5e6d03;\">return<\/span> <span style=\"color: #000000;\">EEDR<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ \u0432\u044b\u0432\u043e\u0434 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f<\/span>\r\n<span style=\"color: #000000;\">}<\/span>\r\n \r\n<span style=\"color: #00979c;\">void<\/span> <span style=\"color: #000000;\">EEPROM_write<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #00979c;\">unsigned<\/span> <span style=\"color: #00979c;\">int<\/span> <span style=\"color: #000000;\">uiAddress<\/span><span style=\"color: #434f54;\">,<\/span> <span style=\"color: #00979c;\">unsigned<\/span> <span style=\"color: #00979c;\">char<\/span> <span style=\"color: #000000;\">ucData<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">{<\/span>\r\n \u00a0<span style=\"color: #5e6d03;\">while<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">EECR<\/span> <span style=\"color: #434f54;\">&amp;<\/span> <span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">1<\/span><span style=\"color: #434f54;\">&lt;&lt;<\/span><span style=\"color: #000000;\">EEPE<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0433\u043e\u0442\u043e\u0432\u043d\u043e\u0441\u0442\u0438 EEPROM <\/span>\r\n \u00a0\u00a0\u00a0<span style=\"color: #000000;\">EEARH<\/span> <span style=\"color: #434f54;\">=<\/span> <span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">uiAddress<\/span> <span style=\"color: #434f54;\">&amp;<\/span> <span style=\"color: #000000;\">0xF0<\/span><span style=\"color: #000000;\">)<\/span> <span style=\"color: #434f54;\">&lt;&lt;<\/span> <span style=\"color: #000000;\">2<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0430\u0434\u0440\u0435\u0441\u0430 H<\/span>\r\n \u00a0\u00a0\u00a0<span style=\"color: #000000;\">EEARL<\/span> <span style=\"color: #434f54;\">=<\/span> <span style=\"color: #000000;\">uiAddress<\/span> <span style=\"color: #434f54;\">&amp;<\/span> <span style=\"color: #000000;\">0x0F<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0430\u0434\u0440\u0435\u0441\u0430 L<\/span>\r\n \u00a0\u00a0\u00a0<span style=\"color: #000000;\">EEDR<\/span> <span style=\"color: #434f54;\">=<\/span> <span style=\"color: #000000;\">ucData<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 <\/span>\r\n \u00a0\u00a0\u00a0<span style=\"color: #000000;\">EECR<\/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;\">EEMPE<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span><span style=\"color: #434f54;\">\/\/ \u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 EEPROM<\/span>\r\n \u00a0\u00a0\u00a0<span style=\"color: #000000;\">EECR<\/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;\">EEPE<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ \u0417\u0430\u043f\u0438\u0441\u044c \u0432 EEPROM<\/span>\r\n<span style=\"color: #000000;\">}<\/span> \r\n<\/pre>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/05\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-05-15-120213.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-98962\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/05\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-05-15-120213.png\" alt=\"\" width=\"284\" height=\"329\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/05\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-05-15-120213.png 284w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2021\/05\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2021-05-15-120213-200x232.png 200w\" sizes=\"auto, (max-width: 284px) 100vw, 284px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ATmega328 ATmega328 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 1024 \u0411\u0430\u0439\u0442 EEPROM (\u041f\u041f\u0417\u0423)-\u043f\u0430\u043c\u044f\u0442\u0438. \u042d\u0442\u0430 \u043f\u0430\u043c\u044f\u0442\u044c \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0434\u0438\u043d \u0431\u0430\u0439\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d \u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u043d. EEPROM (\u041f\u041f\u0417\u0423) \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0438 \u0441\u0442\u0435\u0440\u0442\u0430 \u0432 \u0441\u0443\u043c\u043c\u0435 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c 100 000 \u0440\u0430\u0437. \u0417\u0430\u043f\u0438\u0441\u044c \u0438 \u0447\u0442\u0435\u043d\u0438\u0435 EEPROM \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432: &nbsp; EEARL \u0438 EEARH &#8212; \u043c\u043b\u0430\u0434\u0448\u0438\u0439 \u0438 \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0430\u0434\u0440\u0435\u0441\u0430 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":98962,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[239,285],"tags":[],"class_list":["post-98961","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","category-atmega328-arduino-ide"],"views":4865,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/98961","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=98961"}],"version-history":[{"count":2,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/98961\/revisions"}],"predecessor-version":[{"id":111132,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/98961\/revisions\/111132"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/98962"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=98961"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=98961"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=98961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}