{"id":277735,"date":"2016-04-06T10:36:02","date_gmt":"2016-04-06T06:36:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=277735"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=277735","title":{"rendered":"\u0410\u0443\u0434\u0438\u043e \u043f\u043b\u0435\u0435\u0440 \u043d\u0430 AVR"},"content":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/6f7\/134\/c40\/6f7134c4060240dfa4f58827e840943c.jpg\"\/><\/p>\n<p>  \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0440\u0435\u0432\u0438\u0437\u0438\u0438 \u0440\u0430\u0434\u0438\u043e\u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0431\u0430\u0440\u0430\u0445\u043b\u0430 \u0438 \u0440\u0430\u0441\u043f\u0438\u0445\u0438\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u043a\u043e\u0440\u043e\u0431\u043e\u0447\u043a\u0430\u043c \u043c\u043d\u0435 \u043f\u043e\u043f\u0430\u043b\u0441\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 AVR atxmega256a3u. \u0414\u0430\u0431\u044b \u0440\u0430\u0437\u0432\u0435\u044f\u0442\u044c \u0441\u043a\u0443\u043a\u0443 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0435 \u043f\u043e\u0434\u043e\u0431\u0438\u0435 \u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b, \u0430 \u0442\u043e\u0447\u043d\u0435\u0435 \u0426\u0410\u041f, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u044b\u0439 \u043a \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0443. \u0427\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041b\u0438\u043d\u0435\u0439\u043a\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 XMEGA \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435\u043c \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0445 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0443 \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u0435\u0439 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u0438\u043a\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 MEGA, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u043f\u043b\u044e\u0448\u0435\u043a, \u043d\u043e \u0432\u0441\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u043d\u0438\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0440\u0438\u0438. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043b\u0438\u0448\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b, \u0433\u0434\u0435 \u043f\u043e\u0431\u043e\u043b\u044c\u0448\u0435 \u041e\u0417\u0423.<\/p>\n<p>  \u041e\u0442 \u0441\u043b\u043e\u0432 \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435, \u043f\u043e\u0440\u0430\u0437\u043c\u044b\u0441\u043b\u0438\u0432 \u043f\u0440\u0438\u0448\u0435\u043b \u043a \u0442\u0430\u043a\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/303\/ed8\/b4c\/303ed8b4cc994f0ca1a0cc10ded19309.png\"\/><\/p>\n<p>  \u0411\u0443\u0434\u0443 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u043c\u0443\u0437\u044b\u043a\u0443 \u0438\u0437 WAV-\u0444\u0430\u0439\u043b\u043e\u0432, \u043c\u043e\u043d\u043e, 8 \u0431\u0438\u0442 \u0441 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 44.1 \u043a\u0413\u0446. \u041f\u043e\u0441\u044b\u043b\u043a\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 10 \u0431\u043e\u0434 (\u0441\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0439 \u0438 \u0441\u0442\u043e\u043f\u043e\u0432\u044b\u0439 \u0431\u0438\u0442\u044b, 8 \u0431\u0438\u0442\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445), \u0437\u043d\u0430\u0447\u0438\u0442 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043d\u0435 \u043d\u0438\u0436\u0435 441 \u043a\u0411\u043e\u0434\/\u0441. \u0410\u043f\u043f\u0430\u0440\u0430\u0442\u0443\u0440\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0431\u0435\u0440\u0443 \u0441 \u0437\u0430\u043f\u0430\u0441\u043e\u043c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 2000 \u043a\u0411\u043e\u0434\/\u0441.<\/p>\n<p>  \u0412\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0431\u0443\u0444\u0435\u0440 FIFO, \u043e\u043d \u0436\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u00ab\u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u0438\u0448\u0435\u043b \u2014 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u044b\u0448\u0435\u043b\u00bb. \u041f\u043e \u0442\u0430\u0439\u043c\u0435\u0440\u0443 \u0441 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 44.1 \u043a\u0413\u0446 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u044e\u0449\u0435\u0435 \u0438\u0437 \u0431\u0443\u0444\u0435\u0440\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u043e\u0442\u0441\u0447\u0435\u0442 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0449\u0435\u0435 \u0435\u0433\u043e \u0446\u0438\u0444\u0440\u043e-\u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u043c\u0443 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0443 \u042d\u0412\u041c. \u0420\u0430\u0437\u043c\u044b\u0448\u043b\u044f\u044f \u043e\u0431\u043e \u0432\u0441\u0435\u043c \u044d\u0442\u043e\u043c \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u0443\u044e \u0438 \u0442\u0440\u0430\u0432\u043b\u044e \u00ab\u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u0443\u044e\u00bb \u043f\u043b\u0430\u0442\u0443 \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/7c7\/16d\/822\/7c716d8224154de4846c2ddb301eb96d.jpg\"\/><\/p>\n<p>  \u0421\u0430\u043c\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u0432 \u044d\u0442\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u043e\u0436\u0430\u043b\u0443\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0426\u0410\u041f. \u0412 \u043c\u043e\u0435\u043c \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 \u0435\u0441\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0426\u0410\u041f, \u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0435 \u0441\u043f\u043e\u0440\u0442\u0438\u0432\u043d\u043e, \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u0442\u0430\u043a\u043e\u0439 \u0440\u043e\u0441\u043a\u043e\u0448\u0438 \u043d\u0435\u0442. \u041d\u0438\u0447\u0435\u0433\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0433\u043e, \u0426\u0410\u041f \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u043c\u0443 \u0438\u0437 \u0433\u043e\u0440\u0441\u0442\u0438 \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u043e\u0432 \u043f\u043e \u0441\u0445\u0435\u043c\u0435 R-2R:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/a70\/46c\/2e4\/a7046c2e4378ecc407927959ed4cec9d.png\" alt=\"image\"\/><\/p>\n<p>  \u0422\u0430\u043a\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 0 \u0412 \u0434\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0435\u0434\u0438\u043d\u0438\u0446\u044b, \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e 3.3 \u0412. \u0421\u0434\u0435\u043b\u0430\u044e \u0432\u043e\u0441\u044c\u043c\u0438\u0431\u0438\u0442\u043d\u044b\u0439 \u0426\u0410\u041f, \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u0434 \u0440\u0443\u043a\u043e\u0439 \u043b\u0438\u0448\u044c \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u044b \u0441 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u043c \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435\u043c 5%, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u044f\u0442\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u044f\u0434\u0430 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 (1\/2^5)&lt;0.05. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u043c\u043b\u0430\u0434\u0448\u0438\u0435 \u0440\u0430\u0437\u0440\u044f\u0434\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u043e\u0437\u0432\u0443\u0447\u0438\u0442\u044c \u0441\u043b\u0430\u0431\u044b\u0435 \u0441\u043f\u0435\u043a\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0430. \u0421\u043e\u0431\u0438\u0440\u0430\u044e \u0438\u0437 \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u043e\u0432 \u043d\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u043c 5.1 \u043a\u041e\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0433\u043e \u043c\u043e\u043d\u0441\u0442\u0440\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/dfa\/1d1\/9f1\/dfa1d19f175042868eeb5d689dfb575c.jpg\"\/><\/p>\n<p>  \u0422\u0443\u0442 \u0436\u0435 \u0441\u0442\u0430\u0432\u043b\u044e \u0443\u0441\u0438\u043b\u0438\u0442\u0435\u043b\u044c TDA2822M, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e \u043f\u043e \u043c\u043e\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0445\u0435\u043c\u0435 \u0438\u0437 \u0434\u0430\u0442\u0430\u0448\u0438\u0442\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/2b1\/2a3\/40d\/2b12a340d7fb46708a44b8e4375386d9.JPG\"\/><\/p>\n<p>  \u0418 \u0434\u0435\u043b\u0430\u044e \u043a\u043e\u043b\u043e\u043d\u043a\u0443 \u0441 \u0444\u0430\u0437\u043e\u0438\u043d\u0432\u0435\u0440\u0442\u043e\u0440\u043e\u043c:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/916\/31d\/60f\/91631d60fcc24fd499d955c60a5d061e.jpg\"\/><\/p>\n<p>  \u041f\u043e\u0440\u0430 \u043f\u043e\u0441\u043b\u0443\u0448\u0430\u0442\u044c:<\/p>\n<p>  <iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/gR1DKfi2Js0?feature=oembed\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p>  \u0417\u0432\u0443\u0447\u0438\u0442 \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u0442\u0435\u0440\u043f\u0438\u043c\u043e, \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u043a \u043f\u043e\u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0448\u0435.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0434\u043b\u044f \u041c\u041a<\/b><\/p>\n<div class=\"spoiler_text\">\u041e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e, \u0434\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440. \u0415\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0426\u0410\u041f.<\/p>\n<pre><code class=\"cpp\">\/\/ I\/O Registers definitions #include &lt;io.h&gt;  \/\/ Declare your global variables here #define fSIZE 12000 int rAdr,wAdr,dn; char needdata; char fifo[fSIZE];  \/\/ System Clocks initialization void system_clocks_init(void) { unsigned char n,s;  \/\/ Optimize for speed #pragma optsize-  \/\/ Save interrupts enabled\/disabled state s=SREG; \/\/ Disable interrupts #asm(&quot;cli&quot;)  \/\/ External 16000,000 kHz oscillator initialization \/\/ External Clock Source - Startup Time: 0.4-16 MHz Quartz Crystal - 16k CLK OSC.XOSCCTRL=OSC_FRQRANGE_12TO16_gc | OSC_XOSCSEL_XTAL_16KCLK_gc; \/\/ Enable the external oscillator\/clock source OSC.CTRL|=OSC_XOSCEN_bm;  \/\/ System Clock prescaler A division factor: 1 \/\/ System Clock prescalers B & C division factors: B:1, C:1 \/\/ ClkPer4: 16000,000 kHz \/\/ ClkPer2: 16000,000 kHz \/\/ ClkPer:  16000,000 kHz \/\/ ClkCPU:  16000,000 kHz n=(CLK.PSCTRL & (~(CLK_PSADIV_gm | CLK_PSBCDIV1_bm | CLK_PSBCDIV0_bm))) | \tCLK_PSADIV_1_gc | CLK_PSBCDIV_1_1_gc; CCP=CCP_IOREG_gc; CLK.PSCTRL=n;  \/\/ Wait for the external oscillator to stabilize while ((OSC.STATUS & OSC_XOSCRDY_bm)==0);  \/\/ Select the system clock source: External Oscillator or Clock n=(CLK.CTRL & (~CLK_SCLKSEL_gm)) | CLK_SCLKSEL_XOSC_gc; CCP=CCP_IOREG_gc; CLK.CTRL=n;  \/\/ Disable the unused oscillators: 2 MHz, 32 MHz, internal 32 kHz, PLL OSC.CTRL&= ~(OSC_RC2MEN_bm | OSC_RC32MEN_bm | OSC_RC32KEN_bm | OSC_PLLEN_bm);  \/\/ ClkPer output disabled PORTCFG.CLKEVOUT&= ~(PORTCFG_CLKOUTSEL_gm | PORTCFG_CLKOUT_gm); \/\/ Restore interrupts enabled\/disabled state SREG=s; \/\/ Restore optimization for size if needed #pragma optsize_default }  \/\/ Ports initialization void ports_init(void) { \/\/ PORTA initialization \/\/ OUT register PORTA.OUT=0x00; \/\/ Pin0: Input \/\/ Pin1: Input \/\/ Pin2: Input \/\/ Pin3: Input \/\/ Pin4: Input \/\/ Pin5: Input \/\/ Pin6: Input \/\/ Pin7: Input PORTA.DIR=0x00; \/\/ Pin0 Output\/Pull configuration: Totempole\/No \/\/ Pin0 Input\/Sense configuration: Sense both edges \/\/ Pin0 Inverted: Off \/\/ Pin0 Slew Rate Limitation: Off PORTA.PIN0CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin1 Output\/Pull configuration: Totempole\/No \/\/ Pin1 Input\/Sense configuration: Sense both edges \/\/ Pin1 Inverted: Off \/\/ Pin1 Slew Rate Limitation: Off PORTA.PIN1CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin2 Output\/Pull configuration: Totempole\/No \/\/ Pin2 Input\/Sense configuration: Sense both edges \/\/ Pin2 Inverted: Off \/\/ Pin2 Slew Rate Limitation: Off PORTA.PIN2CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin3 Output\/Pull configuration: Totempole\/No \/\/ Pin3 Input\/Sense configuration: Sense both edges \/\/ Pin3 Inverted: Off \/\/ Pin3 Slew Rate Limitation: Off PORTA.PIN3CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin4 Output\/Pull configuration: Totempole\/No \/\/ Pin4 Input\/Sense configuration: Sense both edges \/\/ Pin4 Inverted: Off \/\/ Pin4 Slew Rate Limitation: Off PORTA.PIN4CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin5 Output\/Pull configuration: Totempole\/No \/\/ Pin5 Input\/Sense configuration: Sense both edges \/\/ Pin5 Inverted: Off \/\/ Pin5 Slew Rate Limitation: Off PORTA.PIN5CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin6 Output\/Pull configuration: Totempole\/No \/\/ Pin6 Input\/Sense configuration: Sense both edges \/\/ Pin6 Inverted: Off \/\/ Pin6 Slew Rate Limitation: Off PORTA.PIN6CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin7 Output\/Pull configuration: Totempole\/No \/\/ Pin7 Input\/Sense configuration: Sense both edges \/\/ Pin7 Inverted: Off \/\/ Pin7 Slew Rate Limitation: Off PORTA.PIN7CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Interrupt 0 level: Disabled \/\/ Interrupt 1 level: Disabled PORTA.INTCTRL=(PORTA.INTCTRL & (~(PORT_INT1LVL_gm | PORT_INT0LVL_gm))) | \tPORT_INT1LVL_OFF_gc | PORT_INT0LVL_OFF_gc; \/\/ Pin0 Pin Change interrupt 0: Off \/\/ Pin1 Pin Change interrupt 0: Off \/\/ Pin2 Pin Change interrupt 0: Off \/\/ Pin3 Pin Change interrupt 0: Off \/\/ Pin4 Pin Change interrupt 0: Off \/\/ Pin5 Pin Change interrupt 0: Off \/\/ Pin6 Pin Change interrupt 0: Off \/\/ Pin7 Pin Change interrupt 0: Off PORTA.INT0MASK=0x00; \/\/ Pin0 Pin Change interrupt 1: Off \/\/ Pin1 Pin Change interrupt 1: Off \/\/ Pin2 Pin Change interrupt 1: Off \/\/ Pin3 Pin Change interrupt 1: Off \/\/ Pin4 Pin Change interrupt 1: Off \/\/ Pin5 Pin Change interrupt 1: Off \/\/ Pin6 Pin Change interrupt 1: Off \/\/ Pin7 Pin Change interrupt 1: Off PORTA.INT1MASK=0x00;  \/\/ PORTB initialization \/\/ OUT register PORTB.OUT=0x00; \/\/ Pin0: Input \/\/ Pin1: Input \/\/ Pin2: Input \/\/ Pin3: Input \/\/ Pin4: Input \/\/ Pin5: Input \/\/ Pin6: Input \/\/ Pin7: Input PORTB.DIR=0x00; \/\/ Pin0 Output\/Pull configuration: Totempole\/No \/\/ Pin0 Input\/Sense configuration: Sense both edges \/\/ Pin0 Inverted: Off \/\/ Pin0 Slew Rate Limitation: Off PORTB.PIN0CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin1 Output\/Pull configuration: Totempole\/No \/\/ Pin1 Input\/Sense configuration: Sense both edges \/\/ Pin1 Inverted: Off \/\/ Pin1 Slew Rate Limitation: Off PORTB.PIN1CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin2 Output\/Pull configuration: Totempole\/No \/\/ Pin2 Input\/Sense configuration: Sense both edges \/\/ Pin2 Inverted: Off \/\/ Pin2 Slew Rate Limitation: Off PORTB.PIN2CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin3 Output\/Pull configuration: Totempole\/No \/\/ Pin3 Input\/Sense configuration: Sense both edges \/\/ Pin3 Inverted: Off \/\/ Pin3 Slew Rate Limitation: Off PORTB.PIN3CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin4 Output\/Pull configuration: Totempole\/No \/\/ Pin4 Input\/Sense configuration: Sense both edges \/\/ Pin4 Inverted: Off \/\/ Pin4 Slew Rate Limitation: Off PORTB.PIN4CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin5 Output\/Pull configuration: Totempole\/No \/\/ Pin5 Input\/Sense configuration: Sense both edges \/\/ Pin5 Inverted: Off \/\/ Pin5 Slew Rate Limitation: Off PORTB.PIN5CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin6 Output\/Pull configuration: Totempole\/No \/\/ Pin6 Input\/Sense configuration: Sense both edges \/\/ Pin6 Inverted: Off \/\/ Pin6 Slew Rate Limitation: Off PORTB.PIN6CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin7 Output\/Pull configuration: Totempole\/No \/\/ Pin7 Input\/Sense configuration: Sense both edges \/\/ Pin7 Inverted: Off \/\/ Pin7 Slew Rate Limitation: Off PORTB.PIN7CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Interrupt 0 level: Disabled \/\/ Interrupt 1 level: Disabled PORTB.INTCTRL=(PORTB.INTCTRL & (~(PORT_INT1LVL_gm | PORT_INT0LVL_gm))) | \tPORT_INT1LVL_OFF_gc | PORT_INT0LVL_OFF_gc; \/\/ Pin0 Pin Change interrupt 0: Off \/\/ Pin1 Pin Change interrupt 0: Off \/\/ Pin2 Pin Change interrupt 0: Off \/\/ Pin3 Pin Change interrupt 0: Off \/\/ Pin4 Pin Change interrupt 0: Off \/\/ Pin5 Pin Change interrupt 0: Off \/\/ Pin6 Pin Change interrupt 0: Off \/\/ Pin7 Pin Change interrupt 0: Off PORTB.INT0MASK=0x00; \/\/ Pin0 Pin Change interrupt 1: Off \/\/ Pin1 Pin Change interrupt 1: Off \/\/ Pin2 Pin Change interrupt 1: Off \/\/ Pin3 Pin Change interrupt 1: Off \/\/ Pin4 Pin Change interrupt 1: Off \/\/ Pin5 Pin Change interrupt 1: Off \/\/ Pin6 Pin Change interrupt 1: Off \/\/ Pin7 Pin Change interrupt 1: Off PORTB.INT1MASK=0x00;  \/\/ PORTC initialization \/\/ OUT register PORTC.OUT=0x00; \/\/ Pin0: Input \/\/ Pin1: Input \/\/ Pin2: Input \/\/ Pin3: Input \/\/ Pin4: Input \/\/ Pin5: Input \/\/ Pin6: Input \/\/ Pin7: Input PORTC.DIR=0x00; \/\/ Pin0 Output\/Pull configuration: Totempole\/No \/\/ Pin0 Input\/Sense configuration: Sense both edges \/\/ Pin0 Inverted: Off \/\/ Pin0 Slew Rate Limitation: Off PORTC.PIN0CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin1 Output\/Pull configuration: Totempole\/No \/\/ Pin1 Input\/Sense configuration: Sense both edges \/\/ Pin1 Inverted: Off \/\/ Pin1 Slew Rate Limitation: Off PORTC.PIN1CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin2 Output\/Pull configuration: Totempole\/No \/\/ Pin2 Input\/Sense configuration: Sense both edges \/\/ Pin2 Inverted: Off \/\/ Pin2 Slew Rate Limitation: Off PORTC.PIN2CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin3 Output\/Pull configuration: Totempole\/No \/\/ Pin3 Input\/Sense configuration: Sense both edges \/\/ Pin3 Inverted: Off \/\/ Pin3 Slew Rate Limitation: Off PORTC.PIN3CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin4 Output\/Pull configuration: Totempole\/No \/\/ Pin4 Input\/Sense configuration: Sense both edges \/\/ Pin4 Inverted: Off \/\/ Pin4 Slew Rate Limitation: Off PORTC.PIN4CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin5 Output\/Pull configuration: Totempole\/No \/\/ Pin5 Input\/Sense configuration: Sense both edges \/\/ Pin5 Inverted: Off \/\/ Pin5 Slew Rate Limitation: Off PORTC.PIN5CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin6 Output\/Pull configuration: Totempole\/No \/\/ Pin6 Input\/Sense configuration: Sense both edges \/\/ Pin6 Inverted: Off \/\/ Pin6 Slew Rate Limitation: Off PORTC.PIN6CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin7 Output\/Pull configuration: Totempole\/No \/\/ Pin7 Input\/Sense configuration: Sense both edges \/\/ Pin7 Inverted: Off \/\/ Pin7 Slew Rate Limitation: Off PORTC.PIN7CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ PORTC Peripheral Output Remapping \/\/ OC0A Output: Pin 0 \/\/ OC0B Output: Pin 1 \/\/ OC0C Output: Pin 2 \/\/ OC0D Output: Pin 3 \/\/ USART0 XCK: Pin 1 \/\/ USART0 RXD: Pin 2 \/\/ USART0 TXD: Pin 3 \/\/ SPI MOSI: Pin 5 \/\/ SPI SCK: Pin 7 PORTC.REMAP=(0&lt;&lt;PORT_SPI_bp) | (0&lt;&lt;PORT_USART0_bp) | (0&lt;&lt;PORT_TC0D_bp) | (0&lt;&lt;PORT_TC0C_bp) | (0&lt;&lt;PORT_TC0B_bp) | (0&lt;&lt;PORT_TC0A_bp); \/\/ Interrupt 0 level: Disabled \/\/ Interrupt 1 level: Disabled PORTC.INTCTRL=(PORTC.INTCTRL & (~(PORT_INT1LVL_gm | PORT_INT0LVL_gm))) | \tPORT_INT1LVL_OFF_gc | PORT_INT0LVL_OFF_gc; \/\/ Pin0 Pin Change interrupt 0: Off \/\/ Pin1 Pin Change interrupt 0: Off \/\/ Pin2 Pin Change interrupt 0: Off \/\/ Pin3 Pin Change interrupt 0: Off \/\/ Pin4 Pin Change interrupt 0: Off \/\/ Pin5 Pin Change interrupt 0: Off \/\/ Pin6 Pin Change interrupt 0: Off \/\/ Pin7 Pin Change interrupt 0: Off PORTC.INT0MASK=0x00; \/\/ Pin0 Pin Change interrupt 1: Off \/\/ Pin1 Pin Change interrupt 1: Off \/\/ Pin2 Pin Change interrupt 1: Off \/\/ Pin3 Pin Change interrupt 1: Off \/\/ Pin4 Pin Change interrupt 1: Off \/\/ Pin5 Pin Change interrupt 1: Off \/\/ Pin6 Pin Change interrupt 1: Off \/\/ Pin7 Pin Change interrupt 1: Off PORTC.INT1MASK=0x00;  \/\/ PORTD initialization \/\/ OUT register PORTD.OUT=0x00; \/\/ Pin0: Output \/\/ Pin1: Output \/\/ Pin2: Output \/\/ Pin3: Output \/\/ Pin4: Output \/\/ Pin5: Output \/\/ Pin6: Output \/\/ Pin7: Output PORTD.DIR=0xFF; \/\/ Pin0 Output\/Pull configuration: Totempole\/No \/\/ Pin0 Input\/Sense configuration: Sense both edges \/\/ Pin0 Inverted: Off \/\/ Pin0 Slew Rate Limitation: On PORTD.PIN0CTRL=PORT_SRLEN_bm | PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin1 Output\/Pull configuration: Totempole\/No \/\/ Pin1 Input\/Sense configuration: Sense both edges \/\/ Pin1 Inverted: Off \/\/ Pin1 Slew Rate Limitation: On PORTD.PIN1CTRL=PORT_SRLEN_bm | PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin2 Output\/Pull configuration: Totempole\/No \/\/ Pin2 Input\/Sense configuration: Sense both edges \/\/ Pin2 Inverted: Off \/\/ Pin2 Slew Rate Limitation: On PORTD.PIN2CTRL=PORT_SRLEN_bm | PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin3 Output\/Pull configuration: Totempole\/No \/\/ Pin3 Input\/Sense configuration: Sense both edges \/\/ Pin3 Inverted: Off \/\/ Pin3 Slew Rate Limitation: On PORTD.PIN3CTRL=PORT_SRLEN_bm | PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin4 Output\/Pull configuration: Totempole\/No \/\/ Pin4 Input\/Sense configuration: Sense both edges \/\/ Pin4 Inverted: Off \/\/ Pin4 Slew Rate Limitation: On PORTD.PIN4CTRL=PORT_SRLEN_bm | PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin5 Output\/Pull configuration: Totempole\/No \/\/ Pin5 Input\/Sense configuration: Sense both edges \/\/ Pin5 Inverted: Off \/\/ Pin5 Slew Rate Limitation: On PORTD.PIN5CTRL=PORT_SRLEN_bm | PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin6 Output\/Pull configuration: Totempole\/No \/\/ Pin6 Input\/Sense configuration: Sense both edges \/\/ Pin6 Inverted: Off \/\/ Pin6 Slew Rate Limitation: On PORTD.PIN6CTRL=PORT_SRLEN_bm | PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin7 Output\/Pull configuration: Totempole\/No \/\/ Pin7 Input\/Sense configuration: Sense both edges \/\/ Pin7 Inverted: Off \/\/ Pin7 Slew Rate Limitation: On PORTD.PIN7CTRL=PORT_SRLEN_bm | PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Interrupt 0 level: Disabled \/\/ Interrupt 1 level: Disabled PORTD.INTCTRL=(PORTD.INTCTRL & (~(PORT_INT1LVL_gm | PORT_INT0LVL_gm))) | \tPORT_INT1LVL_OFF_gc | PORT_INT0LVL_OFF_gc; \/\/ Pin0 Pin Change interrupt 0: Off \/\/ Pin1 Pin Change interrupt 0: Off \/\/ Pin2 Pin Change interrupt 0: Off \/\/ Pin3 Pin Change interrupt 0: Off \/\/ Pin4 Pin Change interrupt 0: Off \/\/ Pin5 Pin Change interrupt 0: Off \/\/ Pin6 Pin Change interrupt 0: Off \/\/ Pin7 Pin Change interrupt 0: Off PORTD.INT0MASK=0x00; \/\/ Pin0 Pin Change interrupt 1: Off \/\/ Pin1 Pin Change interrupt 1: Off \/\/ Pin2 Pin Change interrupt 1: Off \/\/ Pin3 Pin Change interrupt 1: Off \/\/ Pin4 Pin Change interrupt 1: Off \/\/ Pin5 Pin Change interrupt 1: Off \/\/ Pin6 Pin Change interrupt 1: Off \/\/ Pin7 Pin Change interrupt 1: Off PORTD.INT1MASK=0x00;  \/\/ PORTE initialization \/\/ OUT register PORTE.OUT=0x00; \/\/ Pin0: Input \/\/ Pin1: Input \/\/ Pin2: Input \/\/ Pin3: Input \/\/ Pin4: Input \/\/ Pin5: Input \/\/ Pin6: Input \/\/ Pin7: Input PORTE.DIR=0x00; \/\/ Pin0 Output\/Pull configuration: Totempole\/No \/\/ Pin0 Input\/Sense configuration: Sense both edges \/\/ Pin0 Inverted: Off \/\/ Pin0 Slew Rate Limitation: Off PORTE.PIN0CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin1 Output\/Pull configuration: Totempole\/No \/\/ Pin1 Input\/Sense configuration: Sense both edges \/\/ Pin1 Inverted: Off \/\/ Pin1 Slew Rate Limitation: Off PORTE.PIN1CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin2 Output\/Pull configuration: Totempole\/No \/\/ Pin2 Input\/Sense configuration: Sense both edges \/\/ Pin2 Inverted: Off \/\/ Pin2 Slew Rate Limitation: Off PORTE.PIN2CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin3 Output\/Pull configuration: Totempole\/No \/\/ Pin3 Input\/Sense configuration: Sense both edges \/\/ Pin3 Inverted: Off \/\/ Pin3 Slew Rate Limitation: Off PORTE.PIN3CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin4 Output\/Pull configuration: Totempole\/No \/\/ Pin4 Input\/Sense configuration: Sense both edges \/\/ Pin4 Inverted: Off \/\/ Pin4 Slew Rate Limitation: Off PORTE.PIN4CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin5 Output\/Pull configuration: Totempole\/No \/\/ Pin5 Input\/Sense configuration: Sense both edges \/\/ Pin5 Inverted: Off \/\/ Pin5 Slew Rate Limitation: Off PORTE.PIN5CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin6 Output\/Pull configuration: Totempole\/No \/\/ Pin6 Input\/Sense configuration: Sense both edges \/\/ Pin6 Inverted: Off \/\/ Pin6 Slew Rate Limitation: Off PORTE.PIN6CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin7 Output\/Pull configuration: Totempole\/No \/\/ Pin7 Input\/Sense configuration: Sense both edges \/\/ Pin7 Inverted: Off \/\/ Pin7 Slew Rate Limitation: Off PORTE.PIN7CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Interrupt 0 level: Disabled \/\/ Interrupt 1 level: Disabled PORTE.INTCTRL=(PORTE.INTCTRL & (~(PORT_INT1LVL_gm | PORT_INT0LVL_gm))) | \tPORT_INT1LVL_OFF_gc | PORT_INT0LVL_OFF_gc; \/\/ Pin0 Pin Change interrupt 0: Off \/\/ Pin1 Pin Change interrupt 0: Off \/\/ Pin2 Pin Change interrupt 0: Off \/\/ Pin3 Pin Change interrupt 0: Off \/\/ Pin4 Pin Change interrupt 0: Off \/\/ Pin5 Pin Change interrupt 0: Off \/\/ Pin6 Pin Change interrupt 0: Off \/\/ Pin7 Pin Change interrupt 0: Off PORTE.INT0MASK=0x00; \/\/ Pin0 Pin Change interrupt 1: Off \/\/ Pin1 Pin Change interrupt 1: Off \/\/ Pin2 Pin Change interrupt 1: Off \/\/ Pin3 Pin Change interrupt 1: Off \/\/ Pin4 Pin Change interrupt 1: Off \/\/ Pin5 Pin Change interrupt 1: Off \/\/ Pin6 Pin Change interrupt 1: Off \/\/ Pin7 Pin Change interrupt 1: Off PORTE.INT1MASK=0x00;  \/\/ PORTF initialization \/\/ OUT register PORTF.OUT=0x08; \/\/ Pin0: Input \/\/ Pin1: Input \/\/ Pin2: Input \/\/ Pin3: Output \/\/ Pin4: Input \/\/ Pin5: Input \/\/ Pin6: Input \/\/ Pin7: Input PORTF.DIR=0x08; \/\/ Pin0 Output\/Pull configuration: Totempole\/No \/\/ Pin0 Input\/Sense configuration: Sense both edges \/\/ Pin0 Inverted: Off \/\/ Pin0 Slew Rate Limitation: Off PORTF.PIN0CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin1 Output\/Pull configuration: Totempole\/No \/\/ Pin1 Input\/Sense configuration: Sense both edges \/\/ Pin1 Inverted: Off \/\/ Pin1 Slew Rate Limitation: Off PORTF.PIN1CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin2 Output\/Pull configuration: Totempole\/No \/\/ Pin2 Input\/Sense configuration: Sense both edges \/\/ Pin2 Inverted: Off \/\/ Pin2 Slew Rate Limitation: Off PORTF.PIN2CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin3 Output\/Pull configuration: Totempole\/No \/\/ Pin3 Input\/Sense configuration: Sense both edges \/\/ Pin3 Inverted: Off \/\/ Pin3 Slew Rate Limitation: Off PORTF.PIN3CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin4 Output\/Pull configuration: Totempole\/No \/\/ Pin4 Input\/Sense configuration: Sense both edges \/\/ Pin4 Inverted: Off \/\/ Pin4 Slew Rate Limitation: Off PORTF.PIN4CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin5 Output\/Pull configuration: Totempole\/No \/\/ Pin5 Input\/Sense configuration: Sense both edges \/\/ Pin5 Inverted: Off \/\/ Pin5 Slew Rate Limitation: Off PORTF.PIN5CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin6 Output\/Pull configuration: Totempole\/No \/\/ Pin6 Input\/Sense configuration: Sense both edges \/\/ Pin6 Inverted: Off \/\/ Pin6 Slew Rate Limitation: Off PORTF.PIN6CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin7 Output\/Pull configuration: Totempole\/No \/\/ Pin7 Input\/Sense configuration: Sense both edges \/\/ Pin7 Inverted: Off \/\/ Pin7 Slew Rate Limitation: Off PORTF.PIN7CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Interrupt 0 level: Disabled \/\/ Interrupt 1 level: Disabled PORTF.INTCTRL=(PORTF.INTCTRL & (~(PORT_INT1LVL_gm | PORT_INT0LVL_gm))) | \tPORT_INT1LVL_OFF_gc | PORT_INT0LVL_OFF_gc; \/\/ Pin0 Pin Change interrupt 0: Off \/\/ Pin1 Pin Change interrupt 0: Off \/\/ Pin2 Pin Change interrupt 0: Off \/\/ Pin3 Pin Change interrupt 0: Off \/\/ Pin4 Pin Change interrupt 0: Off \/\/ Pin5 Pin Change interrupt 0: Off \/\/ Pin6 Pin Change interrupt 0: Off \/\/ Pin7 Pin Change interrupt 0: Off PORTF.INT0MASK=0x00; \/\/ Pin0 Pin Change interrupt 1: Off \/\/ Pin1 Pin Change interrupt 1: Off \/\/ Pin2 Pin Change interrupt 1: Off \/\/ Pin3 Pin Change interrupt 1: Off \/\/ Pin4 Pin Change interrupt 1: Off \/\/ Pin5 Pin Change interrupt 1: Off \/\/ Pin6 Pin Change interrupt 1: Off \/\/ Pin7 Pin Change interrupt 1: Off PORTF.INT1MASK=0x00;  \/\/ PORTR initialization \/\/ OUT register PORTR.OUT=0x00; \/\/ Pin0: Input \/\/ Pin1: Input PORTR.DIR=0x00; \/\/ Pin0 Output\/Pull configuration: Totempole\/No \/\/ Pin0 Input\/Sense configuration: Sense both edges \/\/ Pin0 Inverted: Off \/\/ Pin0 Slew Rate Limitation: Off PORTR.PIN0CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Pin1 Output\/Pull configuration: Totempole\/No \/\/ Pin1 Input\/Sense configuration: Sense both edges \/\/ Pin1 Inverted: Off \/\/ Pin1 Slew Rate Limitation: Off PORTR.PIN1CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc; \/\/ Interrupt 0 level: Disabled \/\/ Interrupt 1 level: Disabled PORTR.INTCTRL=(PORTR.INTCTRL & (~(PORT_INT1LVL_gm | PORT_INT0LVL_gm))) | \tPORT_INT1LVL_OFF_gc | PORT_INT0LVL_OFF_gc; \/\/ Pin0 Pin Change interrupt 0: Off \/\/ Pin1 Pin Change interrupt 0: Off PORTR.INT0MASK=0x00; \/\/ Pin0 Pin Change interrupt 1: Off \/\/ Pin1 Pin Change interrupt 1: Off PORTR.INT1MASK=0x00; }  \/\/ Virtual Ports initialization void vports_init(void) { \/\/ PORTA mapped to VPORT0 \/\/ PORTB mapped to VPORT1 PORTCFG.VPCTRLA=PORTCFG_VP13MAP_PORTB_gc | PORTCFG_VP02MAP_PORTA_gc; \/\/ PORTC mapped to VPORT2 \/\/ PORTD mapped to VPORT3 PORTCFG.VPCTRLB=PORTCFG_VP13MAP_PORTD_gc | PORTCFG_VP02MAP_PORTC_gc; }  \/\/ Disable a Timer\/Counter type TC0 void tc0_disable(TC0_t *ptc) { \/\/ Timer\/Counter off ptc-&gt;CTRLA=TC_CLKSEL_OFF_gc; \/\/ Issue a reset command ptc-&gt;CTRLFSET=TC_CMD_RESET_gc; }  \/\/ Timer\/Counter TCC0 initialization void tcc0_init(void) { unsigned char s; unsigned char n;  \/\/ Note: The correct PORTC direction for the Compare Channels \/\/ outputs is configured in the ports_init function.  \/\/ Save interrupts enabled\/disabled state s=SREG; \/\/ Disable interrupts #asm(&quot;cli&quot;)  \/\/ Disable and reset the timer\/counter just to be sure tc0_disable(&TCC0); \/\/ Clock source: ClkPer\/1 TCC0.CTRLA=TC_CLKSEL_DIV1_gc; \/\/ Mode: Normal Operation, Overflow Int.\/Event on TOP \/\/ Compare\/Capture on channel A: Off \/\/ Compare\/Capture on channel B: Off \/\/ Compare\/Capture on channel C: Off \/\/ Compare\/Capture on channel D: Off TCC0.CTRLB=(0&lt;&lt;TC0_CCDEN_bp) | (0&lt;&lt;TC0_CCCEN_bp) | (0&lt;&lt;TC0_CCBEN_bp) | (0&lt;&lt;TC0_CCAEN_bp) | \tTC_WGMODE_NORMAL_gc; \/\/ Capture event source: None \/\/ Capture event action: None TCC0.CTRLD=TC_EVACT_OFF_gc | TC_EVSEL_OFF_gc;  \/\/ Set Timer\/Counter in Normal mode TCC0.CTRLE=TC_BYTEM_NORMAL_gc;  \/\/ Overflow interrupt: High Level \/\/ Error interrupt: Disabled TCC0.INTCTRLA=TC_ERRINTLVL_OFF_gc | TC_OVFINTLVL_HI_gc;  \/\/ Compare\/Capture channel A interrupt: Disabled \/\/ Compare\/Capture channel B interrupt: Disabled \/\/ Compare\/Capture channel C interrupt: Disabled \/\/ Compare\/Capture channel D interrupt: Disabled TCC0.INTCTRLB=TC_CCDINTLVL_OFF_gc | TC_CCCINTLVL_OFF_gc | TC_CCBINTLVL_OFF_gc | TC_CCAINTLVL_OFF_gc;  \/\/ High resolution extension: Off HIRESC.CTRLA&= ~HIRES_HREN0_bm;  \/\/ Advanced Waveform Extension initialization \/\/ Optimize for speed #pragma optsize-  \/\/ Disable locking the AWEX configuration registers just to be sure n=MCU.AWEXLOCK & (~MCU_AWEXCLOCK_bm); CCP=CCP_IOREG_gc; MCU.AWEXLOCK=n; \/\/ Restore optimization for size if needed #pragma optsize_default  \/\/ Pattern generation: Off \/\/ Dead time insertion: Off AWEXC.CTRL=(0&lt;&lt;AWEX_PGM_bp) | (0&lt;&lt;AWEX_CWCM_bp) | (0&lt;&lt;AWEX_DTICCDEN_bp) | (0&lt;&lt;AWEX_DTICCCEN_bp) |  \t(0&lt;&lt;AWEX_DTICCBEN_bp) | (0&lt;&lt;AWEX_DTICCAEN_bp);  \/\/ Fault protection initialization \/\/ Fault detection on OCD Break detection: On \/\/ Fault detection restart mode: Latched Mode \/\/ Fault detection action: None (Fault protection disabled) AWEXC.FDCTRL=(AWEXC.FDCTRL & (~(AWEX_FDDBD_bm | AWEX_FDMODE_bm | AWEX_FDACT_gm))) | \t(0&lt;&lt;AWEX_FDDBD_bp) | (0&lt;&lt;AWEX_FDMODE_bp) | AWEX_FDACT_NONE_gc; \/\/ Fault detect events:  \/\/ Event channel 0: Off \/\/ Event channel 1: Off \/\/ Event channel 2: Off \/\/ Event channel 3: Off \/\/ Event channel 4: Off \/\/ Event channel 5: Off \/\/ Event channel 6: Off \/\/ Event channel 7: Off AWEXC.FDEMASK=0b00000000; \/\/ Make sure the fault detect flag is cleared AWEXC.STATUS|=AWEXC.STATUS & AWEX_FDF_bm;  \/\/ Clear the interrupt flags TCC0.INTFLAGS=TCC0.INTFLAGS; \/\/ Set Counter register TCC0.CNT=0x0000; \/\/ Set Period register TCC0.PER=0x016A;\/\/0x01B2; \/\/ Set channel A Compare\/Capture register TCC0.CCA=0x0000; \/\/ Set channel B Compare\/Capture register TCC0.CCB=0x0000; \/\/ Set channel C Compare\/Capture register TCC0.CCC=0x0000; \/\/ Set channel D Compare\/Capture register TCC0.CCD=0x0000;  \/\/ Restore interrupts enabled\/disabled state SREG=s; }  \/\/ USARTF0 initialization void usartf0_init(void) { \/\/ Note: The correct PORTF direction for the RxD, TxD and XCK signals \/\/ is configured in the ports_init function.  \/\/ Transmitter is enabled \/\/ Set TxD=1 PORTF.OUTSET=0x08;  \/\/ Communication mode: Asynchronous USART \/\/ Data bits: 8 \/\/ Stop bits: 1 \/\/ Parity: Disabled USARTF0.CTRLC=USART_CMODE_ASYNCHRONOUS_gc | USART_PMODE_DISABLED_gc | USART_CHSIZE_8BIT_gc;  \/\/ Receive complete interrupt: Disabled \/\/ Transmit complete interrupt: Disabled \/\/ Data register empty interrupt: Disabled USARTF0.CTRLA=(USARTF0.CTRLA & (~(USART_RXCINTLVL_gm | USART_TXCINTLVL_gm | USART_DREINTLVL_gm))) | \tUSART_RXCINTLVL_OFF_gc | USART_TXCINTLVL_OFF_gc | USART_DREINTLVL_OFF_gc;  \/\/ Required Baud rate: 2000000 \/\/ Real Baud Rate: 2000000,0 (x2 Mode), Error: 0,0 % USARTF0.BAUDCTRLA=0x00; USARTF0.BAUDCTRLB=((0x09 &lt;&lt; USART_BSCALE_gp) & USART_BSCALE_gm) | 0x00;  \/\/ Receiver: On \/\/ Transmitter: On \/\/ Double transmission speed mode: On \/\/ Multi-processor communication mode: Off USARTF0.CTRLB=(USARTF0.CTRLB & (~(USART_RXEN_bm | USART_TXEN_bm | USART_CLK2X_bm | USART_MPCM_bm | USART_TXB8_bm))) | \tUSART_RXEN_bm | USART_TXEN_bm | USART_CLK2X_bm; }  \/\/ Receive a character from USARTF0 #pragma used+ char getchar_usartf0(void) { char data; unsigned char status;  while (1)       {       while (((status=USARTF0.STATUS) & USART_RXCIF_bm) == 0);       data=USARTF0.DATA;       if ((status & (USART_FERR_bm | USART_PERR_bm | USART_BUFOVF_bm)) == 0) return data;       } } #pragma used-  \/\/ Write a character to the USARTF0 Transmitter #pragma used+ void putchar_usartf0(char c) { while ((USARTF0.STATUS & USART_DREIF_bm) == 0); USARTF0.DATA=c; } #pragma used-  \/\/ DACB initialization void dacb_init(void) { \/\/ Operating mode: Single Channel (Ch0) \/\/ Channel 0 triggered by the event system: Off DACB.CTRLB=(DACB.CTRLB & (~(DAC_CHSEL_gm | DAC_CH0TRIG_bm | DAC_CH1TRIG_bm))) | \tDAC_CHSEL_SINGLE_gc;  \/\/ Reference: AVcc \/\/ Left adjust value: Off DACB.CTRLC=(DACB.CTRLC & (~(DAC_REFSEL_gm | DAC_LEFTADJ_bm))) | \tDAC_REFSEL_AVCC_gc;  \/\/ DACB is enabled \/\/ Low power mode: Off \/\/ Channel 0 output: On \/\/ Channel 1 output: Off \/\/ Internal output connected to the ADCB and Analog Comparator MUX-es: Off DACB.CTRLA=(DACB.CTRLA & (~(DAC_IDOEN_bm | DAC_CH0EN_bm | DAC_CH1EN_bm | DAC_LPMODE_bm))) | \tDAC_CH0EN_bm | DAC_ENABLE_bm; }  \/\/ Function used to write data to a DACB channel ch void dacb_write(unsigned char ch, unsigned int data) { register unsigned char m=ch ? DAC_CH1DRE_bm : DAC_CH0DRE_bm; \/\/ Wait for the channel data register to be ready for new data while ((DACB.STATUS & m)==0); \/\/ Write new data to the channel data register if (m==DAC_CH1DRE_bm) DACB.CH1DATA=data; else DACB.CH0DATA=data; }    \/\/ Timer\/counter TCC0 Overflow\/Underflow interrupt service routine interrupt [TCC0_OVF_vect] void tcc0_overflow_isr(void) {     \/\/PORTD.OUT=~PORTD.OUT;    if (rAdr!=wAdr)    {              PORTD.OUT=fifo[rAdr++];         \/\/DACB.CH0DATA=fifo[rAdr++]&lt;&lt;4;               \/\/   PORTE.OUT=0;    }    \/\/else   \/\/  PORTE.OUT=1;    if (fSIZE==rAdr) rAdr=0;    if (!needdata)    {        if (rAdr&lt;=wAdr)            if (wAdr-rAdr&lt;6000)            {             putchar_usartf0(0xFF);             needdata=1;            }            else;            else if (rAdr-wAdr&gt;6000)            {             putchar_usartf0(0xFF);             needdata=1;            }    }    else    {     if (dn++&gt;2000)     {     putchar_usartf0(0xFF);     dn=0;     }    } }      void main(void) { \/\/ Declare your local variables here unsigned char n;  \/\/ Interrupt system initialization \/\/ Optimize for speed #pragma optsize- \/\/ Make sure the interrupts are disabled #asm(&quot;cli&quot;) \/\/ Low level interrupt: Off \/\/ Round-robin scheduling for low level interrupt: Off \/\/ Medium level interrupt: Off \/\/ High level interrupt: On \/\/ The interrupt vectors will be placed at the start of the Application FLASH section n=(PMIC.CTRL & (~(PMIC_RREN_bm | PMIC_IVSEL_bm | PMIC_HILVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_LOLVLEN_bm))) |     PMIC_HILVLEN_bm; CCP=CCP_IOREG_gc; PMIC.CTRL=n; \/\/ Set the default priority for round-robin scheduling PMIC.INTPRI=0x00; \/\/ Restore optimization for size if needed #pragma optsize_default  \/\/ System clocks initialization system_clocks_init();  \/\/ Ports initialization ports_init();  \/\/ Virtual Ports initialization vports_init();  \/\/ DACB initialization dacb_init();   \/\/ Timer\/Counter TCC0 initialization tcc0_init();  \/\/ USARTF0 initialization usartf0_init();    \/\/ Globally enable interrupts #asm(&quot;sei&quot;) rAdr=0; wAdr=0; PORTD.OUT=0xFF;  needdata=0; while (1)       {         fifo[wAdr++]=getchar_usartf0();         if (fSIZE==wAdr) wAdr=0;       } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043b\u044f \u041f\u041a<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.IO; using System.Text.RegularExpressions; using System.Globalization; using System.IO.Ports;  namespace bol {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }         byte[] byData;         int k = 0;          private void Form1_Shown(object sender, EventArgs e)         {             string[] ports = SerialPort.GetPortNames();             comboBox1.Items.AddRange(SerialPort.GetPortNames());             if (comboBox1.Items.Count &gt; -1)             {                 comboBox1.SelectedIndex = 0;             }          }          private void serialPort1_DataReceived(object sender, SerialDataReceivedEventArgs e)         {             if (serialPort1.IsOpen)                 {                 if (byData.Length - 2000 &gt; k)                 {                     serialPort1.Write(byData, k, 2000);                     k += 2000;                 }             }         }          private void button2_Click(object sender, EventArgs e)         {             serialPort1.Close();             button1.Enabled = true;             try             {                 serialPort1.BaudRate = Convert.ToInt32(textBox1.Text);             }             catch             {                 MessageBox.Show(&quot;\u043d\u0435\u0430!!!!!!&quot;); return;             }              if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)             {                 string fileNam = openFileDialog1.FileName;                 FileStream fs = new FileStream(fileNam, FileMode.OpenOrCreate, FileAccess.Read);                 int len = Convert.ToInt32(fs.Length);                 byData = new byte[len];\u00a0\u00a0\u00a0\/\/\u00a0\u043c\u0430\u0441\u0441\u0438\u0432\u00a0\u0431\u0430\u0439\u0442\u043e\u0432                 try                 {\u00a0\u00a0\u00a0\/\/\u00a0\u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439\u00a0\u043f\u043e\u0442\u043e\u043a,\u00a0\u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u00a0\u0444\u0430\u0439\u043b\u00a0(\u043f\u0440\u0438\u00a0\u043e\u0442\u0441\u0443\u0442\u0441\u0432\u0438\u0438\u00a0\u0441\u043e\u0437\u0434\u0430\u0435\u0442)\u00a0\u0442\u043e\u043b\u044c\u043a\u043e\u00a0\u0434\u043b\u044f\u00a0\u0447\u0442\u0435\u043d\u0438\u044f                     fs.Read(byData, 44, len - 44 - 1);                     fs.Dispose();\u00a0\/\/\u00a0\u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u043c\u00a0\u0440\u0435\u0441\u0443\u0440\u0441\u044b                                     }                 catch (IOException err)                 {                     MessageBox.Show(err.Message); return;                 }                 serialPort1.Open();                 k = 0;                 if (byData.Length - 2000 &gt; k)                 {                     serialPort1.Write(byData, k, 2000);                     k += 2000;                 }             }         }           private void comboBox1_TextChanged(object sender, EventArgs e)         {             serialPort1.PortName = comboBox1.Text;         }          private void button3_Click(object sender, EventArgs e)         {             k = 0;         }          private void button1_Click_1(object sender, EventArgs e)         {             if (serialPort1.IsOpen)             {                 serialPort1.Close();             }             else serialPort1.Open();         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\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\/273904\/\"> https:\/\/geektimes.ru\/post\/273904\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/6f7\/134\/c40\/6f7134c4060240dfa4f58827e840943c.jpg\"\/><\/p>\n<p>  \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0440\u0435\u0432\u0438\u0437\u0438\u0438 \u0440\u0430\u0434\u0438\u043e\u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0431\u0430\u0440\u0430\u0445\u043b\u0430 \u0438 \u0440\u0430\u0441\u043f\u0438\u0445\u0438\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u043a\u043e\u0440\u043e\u0431\u043e\u0447\u043a\u0430\u043c \u043c\u043d\u0435 \u043f\u043e\u043f\u0430\u043b\u0441\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 AVR atxmega256a3u. \u0414\u0430\u0431\u044b \u0440\u0430\u0437\u0432\u0435\u044f\u0442\u044c \u0441\u043a\u0443\u043a\u0443 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0435 \u043f\u043e\u0434\u043e\u0431\u0438\u0435 \u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b, \u0430 \u0442\u043e\u0447\u043d\u0435\u0435 \u0426\u0410\u041f, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u044b\u0439 \u043a \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0443. \u0427\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.  <\/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-277735","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/277735","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=277735"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/277735\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=277735"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=277735"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=277735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}