
{"id":11179,"date":"2020-03-06T16:38:17","date_gmt":"2020-03-06T07:38:17","guid":{"rendered":"https:\/\/okiraku-camera.tokyo\/blog\/?p=11179"},"modified":"2020-04-24T18:05:41","modified_gmt":"2020-04-24T09:05:41","slug":"xd87%e3%82%ad%e3%83%bc%e3%83%9c%e3%83%bc%e3%83%89%e3%81%ae%e3%83%9e%e3%83%88%e3%83%aa%e3%83%83%e3%82%af%e3%82%b9%e3%82%b9%e3%82%ad%e3%83%a3%e3%83%b3","status":"publish","type":"post","link":"https:\/\/okiraku-camera.tokyo\/blog\/?p=11179","title":{"rendered":"xd87\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u30b9\u30ad\u30e3\u30f3"},"content":{"rendered":"<h1>\u6982\u8981<\/h1>\n<p>xd87\u30ad\u30fc\u30dc\u30fc\u30c9\u30ad\u30c3\u30c8\u306e\u30ad\u30fc\u30b9\u30a4\u30c3\u30c1\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u306e\u56de\u8def\u3092\u78ba\u8a8d\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092Arduino IDE\u3067\u66f8\u3044\u3066\u7d44\u307f\u8fbc\u3093\u3067\u307f\u305f\u3002\u5168\u30b9\u30a4\u30c3\u30c1\u306e\u72b6\u614b\u3092\u5b9a\u671f\u7684\u306b\u30b9\u30ad\u30e3\u30f3\u3057\u3001\u30aa\u30f3\u306b\u306a\u3063\u305f\u30b9\u30a4\u30c3\u30c1\u3068\u30aa\u30d5\u306b\u306a\u3063\u305f\u30b9\u30a4\u30c3\u30c1\u306e\u756a\u53f7\u3092\u30b7\u30ea\u30a2\u30eb\u51fa\u529b\u3059\u308b\u3002<\/p>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u3001\u524d\u56de\u306eLED\u306e\u52d5\u4f5c\u78ba\u8a8d\u3068\u540c\u69d8\u306bArduino Leonardo\u3068\u898b\u7acb\u3066\u3066\u8a18\u8ff0\u3057\u3066\u3044\u308b\u305f\u3081\u3001xd87\u3068\u3001Leonardo\u3084Pro Micro\u3068\u306e\u76f8\u9055\u70b9\u306b\u914d\u616e\u3059\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f\u3002\u305d\u306e\u305f\u3081\u306bATmega32u4\u306e\u30d2\u30e5\u30fc\u30ba\u30d3\u30c3\u30c8\u306e\u78ba\u8a8d\u3092\u884c\u3044\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u5bfe\u7b56\u3057\u305f\u3002<\/p>\n<figure id=\"attachment_11232\" aria-describedby=\"caption-attachment-11232\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2020\/03\/230bfb099806d3e5ec9e421ea4a0c05d.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"waku wp-image-11232 size-large\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2020\/03\/230bfb099806d3e5ec9e421ea4a0c05d-552x414.jpg\" alt=\"\" width=\"552\" height=\"414\" \/><\/a><figcaption id=\"caption-attachment-11232\" class=\"wp-caption-text\">xd87 PCB<\/figcaption><\/figure>\n<h1>\u30ad\u30fc\u30b9\u30a4\u30c3\u30c1\u30de\u30c8\u30ea\u30c3\u30af\u30b9<\/h1>\n<p>\u8abf\u3079\u3066\u307f\u305f\u9650\u308a\u3067\u306f\u3001xd87 PCB\u306e\u30ad\u30fc\u30b9\u30a4\u30c3\u30c1\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u56de\u8def\u306b\u306a\u3063\u3066\u3044\u308b\u3088\u3046\u3060\u3002<\/p>\n<figure id=\"attachment_11091\" aria-describedby=\"caption-attachment-11091\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2020\/02\/keymatrix-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"waku wp-image-11091 size-large\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2020\/02\/keymatrix-1-552x274.png\" alt=\"\" width=\"552\" height=\"274\" \/><\/a><figcaption id=\"caption-attachment-11091\" class=\"wp-caption-text\">xd87 \u30ad\u30fc\u30b9\u30a4\u30c3\u30c1\u30de\u30c8\u30ea\u30c3\u30af\u30b9<\/figcaption><\/figure>\n<p>\u6a2a\u306b\u306e\u3073\u308b\u914d\u7dda\u304c\u884c(ROW)\u306e\u63a5\u7d9a\u3092\u3001\u7e26\u306b\u306e\u3073\u308b\u914d\u7dda\u304c\u5217(COLumn)\u306e\u63a5\u7d9a\u3092\u8868\u3057\u3066\u304a\u308a\u3001\u884c\u3068\u5217\u306e\u4ea4\u70b9\u306b\u30b9\u30a4\u30c3\u30c1\u3068\u30c0\u30a4\u30aa\u30fc\u30c9\u304c\u914d\u7f6e\u3055\u308c\u3066\u3044\u308b\u3002\u56f3\u4e2d\u306e\u30b9\u30a4\u30c3\u30c1\u756a\u53f7(<strong>SWnnn<\/strong>)\u306f\u3001\u884c\u756a\u53f7(1\uff5e6)\u3068\u5217\u756a\u53f7(1\uff5e17)\u306b\u57fa\u3065\u3044\u3066\u52dd\u624b\u306b\u6c7a\u3081\u305f\u3082\u306e\u3067\u3001<br \/>\n<em><strong>SW\u756a\u53f7 = 17 \u00d7 (\u884c\u756a\u53f7 &#8211; 1) + \u5217\u756a\u53f7<\/strong> <\/em><br \/>\n\u3068\u3057\u3066\u3044\u308b\u3002\u5b9f\u969b\u306e\u56de\u8def\u3067\u306f\u884c\u3068\u5217\u306e\u4ea4\u70b9\u306b\u30b9\u30a4\u30c3\u30c1\u304c\u306a\u3044\u90e8\u5206\u3082\u3042\u308b\u304b\u3089\u629c\u3051\u756a\u3082\u3042\u308b\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306a\u30ad\u30fc\u30dc\u30fc\u30c9\u56de\u8def\u306b\u5bfe\u3057\u3066\u3001\u30aa\u30f3\u306b\u306a\u3063\u3066\u3044\u308b\u30b9\u30a4\u30c3\u30c1\uff08\u3064\u307e\u308a\u62bc\u3055\u308c\u3066\u3044\u308b\u30ad\u30fc\uff09\u3001\u30aa\u30d5\u306b\u306a\u3063\u3066\u3044\u308b\u30b9\u30a4\u30c3\u30c1\uff08\u62bc\u3055\u308c\u3066\u3044\u306a\u3044\u30ad\u30fc\uff09\u3092\u305d\u308c\u305e\u308c\u7279\u5b9a\u3059\u308b\u305f\u3081\u306e\u64cd\u4f5c\u3092<strong>\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u30b9\u30ad\u30e3\u30f3\uff08\u307e\u305f\u306f\u5358\u7d14\u306b\u30b9\u30ad\u30e3\u30f3\uff09<\/strong>\u3068\u547c\u3093\u3067\u3044\u308b\u3002<\/p>\n<p>\u30b9\u30ad\u30e3\u30f3\u3092\u5b9a\u671f\u7684\u306b\u884c\u3046\u3053\u3068\u3067\u3001\u524d\u56de\u30aa\u30d5\u3060\u3063\u305f\u30b9\u30a4\u30c3\u30c1\u304c\u30aa\u30f3\u306b\u306a\u308c\u3070\u3001\u305d\u308c\u306f\u65b0\u305f\u306b\u30ad\u30fc\u304c\u62bc\u3055\u308c\u305f\u3053\u3068\u306b\u306a\u308b\u3057\u3001\u30aa\u30f3\u3060\u3063\u305f\u3082\u306e\u304c\u30aa\u30d5\u306b\u306a\u3063\u3066\u3044\u308c\u3070\u3001\u305d\u306e\u30ad\u30fc\u306f\u96e2\u3055\u308c\u305f\u3053\u3068\u306b\u306a\u308b\u3002\u4eca\u56de\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u76ee\u7684\u306f\u3001\u72b6\u614b\u306b\u5909\u5316\u304c\u3042\u3063\u305f\u30ad\u30fc\u3092\u691c\u51fa\u3057\u3001\u305d\u306e\u756a\u53f7\u3092\u51fa\u529b\u3059\u308b\u3053\u3068\u3068\u3057\u305f\u3002<\/p>\n<h2>\u30b9\u30a4\u30c3\u30c1\u72b6\u614b\u306e\u691c\u51fa\u306b\u3064\u3044\u3066<\/h2>\n<p>xd87 PCB\u3067\u306f\u3001\u5404\u30b9\u30a4\u30c3\u30c1\u4f4d\u7f6e\u306b\u3042\u308b\u30c0\u30a4\u30aa\u30fc\u30c9\u306e\u5411\u304d\u304c\u5217\u304b\u3089\u884c\u65b9\u5411\u306a\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u30b9\u30a4\u30c3\u30c1\u304c\u30aa\u30f3\u306e\u3068\u304d\u5217\u304b\u3089\u884c\u306b\u96fb\u6d41\u304c\u6d41\u308c\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<ul>\n<li>\u5217\u5074\u306b\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308b\u30dd\u30fc\u30c8\u306f\u5165\u529b\u65b9\u5411\u3068\u3057\u3001\u5185\u90e8\u30d7\u30eb\u30a2\u30c3\u30d7\u62b5\u6297\u3092\u6709\u52b9\u306b\u3057\u3066\u304a\u304f(<strong>arduino\u3067\u306eINPUT_PULLUP<\/strong>)\u3002<\/li>\n<li>\u884c\u5074\u306b\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308b\u30dd\u30fc\u30c8\u306f\u51fa\u529b\u65b9\u5411\u3068\u3057\u3066\u304a\u304d\u3001\u521d\u671f\u72b6\u614b\u3067\u306f\u3059\u3079\u3066HIGH\u3092\u51fa\u529b\u3057\u3066\u304a\u304f\u3002<\/li>\n<\/ul>\n<p>\u30d7\u30eb\u30a2\u30c3\u30d7\u62b5\u6297\u3001\u30b9\u30a4\u30c3\u30c1\u3001\u5165\u529b\u30dd\u30fc\u30c8\u304a\u3088\u3073\u51fa\u529b\u30dd\u30fc\u30c8\u3092\u4e71\u66b4\u306a\u6a21\u5f0f\u56f3\u306b\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\u306b\u306a\u308b\u3060\u308d\u3046\u3002<\/p>\n<figure id=\"attachment_11230\" aria-describedby=\"caption-attachment-11230\" style=\"width: 516px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2020\/03\/KeySwitch1-off.png\"><img loading=\"lazy\" decoding=\"async\" class=\"waku wp-image-11230 size-full\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2020\/03\/KeySwitch1-off.png\" alt=\"\" width=\"516\" height=\"292\" \/><\/a><figcaption id=\"caption-attachment-11230\" class=\"wp-caption-text\">\u30b9\u30a4\u30c3\u30c1\u56de\u8def\u306e\u6a21\u5f0f\u56f3 \u30b9\u30a4\u30c3\u30c1\u304c\u30aa\u30d5\u306e\u3068\u304d<\/figcaption><\/figure>\n<p>\u30b9\u30a4\u30c3\u30c1\u304c\u30aa\u30d5\u306a\u3089\u3070\u3001\u51fa\u529b\u30dd\u30fc\u30c8\u306e\u72b6\u614b\u306b\u95a2\u308f\u3089\u305a\u30d7\u30eb\u30a2\u30c3\u30d7\u62b5\u6297\u3092\u4ecb\u3057\u305f\u96fb\u5727\u306b\u3088\u3063\u3066\u5165\u529b\u7d50\u679c\u306fHIGH\u306b\u306a\u308b\u3002<\/p>\n<figure id=\"attachment_11231\" aria-describedby=\"caption-attachment-11231\" style=\"width: 516px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2020\/03\/KeySwitch1-on.png\"><img loading=\"lazy\" decoding=\"async\" class=\"waku wp-image-11231 size-full\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2020\/03\/KeySwitch1-on.png\" alt=\"\" width=\"516\" height=\"292\" \/><\/a><figcaption id=\"caption-attachment-11231\" class=\"wp-caption-text\">\u30b9\u30a4\u30c3\u30c1\u56de\u8def\u306e\u6a21\u5f0f\u56f3 \u30b9\u30a4\u30c3\u30c1\u304c\u30aa\u30f3\u306e\u3068\u304d<\/figcaption><\/figure>\n<p>\u30b9\u30a4\u30c3\u30c1\u304c\u30aa\u30f3\u306a\u3089\u3070\u3001\u5165\u529b\u5074\u306e\u30dd\u30fc\u30c8(\u5217)\u3068\u5bfe\u5fdc\u3059\u308b\u51fa\u529b\u5074(\u884c)\u306e\u30dd\u30fc\u30c8\u306f\u30c0\u30a4\u30aa\u30fc\u30c9\u3092\u4ecb\u3057\u3066\u63a5\u7d9a\u3055\u308c\u3001\u5165\u529b\u30dd\u30fc\u30c8\u304c\u691c\u51fa\u3059\u308b\u5024\u306f\u51fa\u529b\u30dd\u30fc\u30c8\u306e\u72b6\u614b\u3067\u6c7a\u307e\u308b\u3002<\/p>\n<ul>\n<li>\u51fa\u529b\u30dd\u30fc\u30c8\u304c\u30ed\u30b8\u30c3\u30afHIGH\u3092\u51fa\u529b(\u56f3\u3067\u306fVCC\u306b\u30d7\u30eb\u30a2\u30c3\u30d7)\u4e2d\u306a\u3089\u3001\u96fb\u4f4d\u5dee\u304c\u751f\u3058\u306a\u3044\u306e\u3067\u5165\u529b\u30dd\u30fc\u30c8\u306fHIGH\u3092\u691c\u51fa\u3002<\/li>\n<li>\u30ed\u30b8\u30c3\u30afLOW\u3092\u51fa\u529b(\u56f3\u3067\u306fGND\u306b\u63a5\u7d9a)\u4e2d\u306a\u3089\u3070\u3001\u30d7\u30eb\u30a2\u30c3\u30d7\u62b5\u6297\u3092\u4ecb\u3057\u3066\u96fb\u6d41\u304c\u6d41\u308c\u308b\u306e\u3067\u3001\u5165\u529b\u30dd\u30fc\u30c8\u306fLOW\u3092\u691c\u51fa\u3059\u308b\u3002<\/li>\n<\/ul>\n<p>\u307e\u3068\u3081\u308b\u3068\u3001\u884c\u5074\u30dd\u30fc\u30c8\u3067LOW\u3092\u51fa\u529b\u3057\u3066\u3044\u308b\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u3001\u5217\u5074\u30dd\u30fc\u30c8\u3092\u8aad\u3093\u3060\u7d50\u679c\u304cLOW\u306a\u3089\u3070\u3001\u305d\u306e\u4ea4\u70b9\u306b\u3042\u308b\u30b9\u30a4\u30c3\u30c1\u306f\u62bc\u3055\u308c\u3066\u3044\u308b\u3057\u3001HIGH\u306a\u3089\u3070\u62bc\u3055\u308c\u3066\u3044\u306a\u3044\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308b\u3002<\/p>\n<p>\u56f3\u4e2d\u306eV<small>IH<\/small>\u3068V<small>IL<\/small>\u306f\u3001\u5165\u529b\u30dd\u30fc\u30c8\u304c\u30ed\u30b8\u30c3\u30afH\u307e\u305f\u306f\u30ed\u30b8\u30c3\u30afL\u3068\u5224\u5b9a\u3059\u308b\u96fb\u5727\u3092\u8868\u3057\u3066\u3044\u308b\u3002\u307e\u305f\u3001ATmega32u4\u306e\u5185\u90e8\u30d7\u30eb\u30a2\u30c3\u30d7\u62b5\u6297R<small>PU<\/small>\u306eMIN\/MAX\u5024\u306f\u300120k\u03a9\/50k\u03a9\u3068\u30c7\u30fc\u30bf\u30b7\u30fc\u30c8\u306b\u898f\u5b9a\u3055\u308c\u3066\u3044\u308b\u3002\u30d7\u30eb\u30a2\u30c3\u30d7\u62b5\u6297\u306e\u5024\u304c\u5927\u304d\u3044\u3053\u3068\u3082\u3042\u3063\u3066\u3001\u51fa\u529b\u30dd\u30fc\u30c8\u304c\u30ed\u30b8\u30c3\u30afL\u3092\u51fa\u529b\u3057\u305f\u3068\u304d\u3001\u5165\u529b\u30dd\u30fc\u30c8\u304cV<small>IL<\/small>\u306b\u9054\u3059\u308b\u307e\u3067\u306b\u306f\u305d\u308c\u306a\u308a\u306b\u6642\u9593\u304c\u304b\u304b\u308b\u304b\u3089\u3001\u884c\u306e\u9078\u629e\u3068\u5217\u72b6\u614b\u306e\u691c\u51fa\u3092\u884c\u3046\u307e\u3067\u306e\u3042\u3044\u3060\u306b\u306f\u3001\u5f85\u3061\u6642\u9593\u304c\u5fc5\u8981\u306b\u306a\u308b\u3002<\/p>\n<h1>\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u3064\u3044\u3066<\/h1>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0 (\u30b9\u30b1\u30c3\u30c1) \u5168\u4f53\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u305f\u3002<\/p>\n<pre class=\"height-set:true height:600 nums:true lang:default decode:true\">\/**\r\n * scan_xd87-4.ino\r\n * USBCore.* \u306f\u3001Arduino\u6a19\u6e96\u306e\u3082\u306e\u3092\u6539\u9020\u3057\u3066\u4f7f\u3046\u3002\r\n * \u30de\u30c8\u30ea\u30c3\u30af\u30b9\u30b9\u30ad\u30e3\u30f3\u3057\u3066\u30aa\u30f3\uff0f\u30aa\u30d5\u3055\u308c\u305f\u30ad\u30fc\u306e\u30b9\u30ad\u30e3\u30f3\u30b3\u30fc\u30c9\u3092\u30b7\u30ea\u30a2\u30eb\u51fa\u529b\u3059\u308b\u3002\r\n * \u30b7\u30ea\u30a2\u30eb\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308b\u307e\u3067\u3001setup()\u3067\u5f85\u3064\u3002\r\n * \u958b\u59cb\u3057\u305f\u3089\u3001RGB LED\u3092\u70b9\u706f\u3057\u3001\u30ad\u30fc\u30aa\u30f3\u30aa\u30d5\u304c\u3042\u3063\u305f\u3089\u3057\u3070\u3089\u304f\u660e\u308b\u304f\u3059\u308b\u3002\r\n *\/\r\nextern \"C\" {\r\n#include \"light_ws2812.h\"\r\n}\r\n\r\nstatic const uint8_t ROW_COUNT = 6;\r\nstatic const uint8_t COL_COUNT = 17; \/\/ ROW\u3042\u305f\u308a\u306e\u30d3\u30c3\u30c8\u6570(\u30ad\u30fc\u6570\uff09\r\n\r\n\/\/ 1ROW \u3042\u305f\u308a 17\u30d3\u30c3\u30c8\r\nuint8_t key_pressed[ROW_COUNT * 3]; \/\/ \u73fe\u5728\u62bc\u4e0b\u60c5\u5831\r\nuint8_t last_key_pressed[ROW_COUNT * 3];  \/\/ \u524d\u56de\u62bc\u4e0b\u60c5\u5831\r\n\r\nstatic const int16_t RGB_COUNT = 14;\r\nstatic const int16_t LED_BUFFER_SIZE = RGB_COUNT * sizeof(cRGB);\r\nuint8_t led_buffer[LED_BUFFER_SIZE];\r\n\r\nstatic const uint8_t VAL_DIMMED = 0x10; \/\/ \u6697\u3044\r\nstatic const uint8_t VAL_BRIGHT = 0x40; \/\/ \u660e\u308b\u3044\r\n\r\nvoid rgb_on( uint8_t val) {\r\n  memset(led_buffer,  val, sizeof(led_buffer));\r\n  ws2812_sendarray_mask(led_buffer, LED_BUFFER_SIZE, _BV(PINB7));\r\n}\r\n\r\n\/\/ xd87\r\n#define BGLED_ON()    PORTD &amp;= ~_BV(0)\r\n#define BGLED_OFF()   PORTD |= _BV(0)\r\n#define CAPSLED_ON()    PORTE &amp;= ~_BV(2)\r\n#define CAPSLED_OFF()   PORTE |= _BV(2)\r\n\r\nvoid setup() {\r\n  cli();\r\n  \r\n  CLKPR = 0x80;\r\n  CLKPR = 0;    \/\/ CLKPR = 1\/1\r\n  uint8_t v = MCUCR | 0x80;\r\n  MCUCR = v;    \/\/ disable JTAG for PF\r\n  MCUCR = v;\r\n  \r\n  TCCR1A = 0; \/\/ init timers (without TC0)\r\n  TCCR3A = 0;\r\n  TCCR4A = 0;\r\n\r\n\/\/ setup Ports.\r\n  DDRB =  _BV(7) | _BV(1) | _BV(0); \/\/ PB7 = RGBLED.\r\n  DDRC =  _BV(7);\r\n  DDRD =  _BV(5) | _BV(3) | _BV(1) | _BV(0);\r\n  DDRE =  _BV(2);\r\n  DDRF =  0;\r\n\/\/ set INPUT_PULLUP to COLs.\r\n  PORTB =  _BV(6) | _BV(5) | _BV(4) | _BV(3) | _BV(2);\r\n  PORTC =  _BV(6);\r\n  PORTD =  _BV(7) | _BV(6) | _BV(4) | _BV(2);\r\n  PORTE =  _BV(6);\r\n  PORTF =  _BV(7) | _BV(6) | _BV(5) | _BV(4) | _BV(1) | _BV(0);\r\n\/\/ set output HIGH to all ROWs. BGLED off and CapsLED off.\r\n  PORTB = PORTB | _BV(0) | _BV(1);\r\n  PORTC = PORTC | _BV(7);\r\n  PORTD = PORTD | _BV(0) | _BV(1) | _BV(3) | _BV(5);\r\n  PORTE = PORTE | _BV(2);\r\n\r\n  memset(key_pressed, 0, sizeof(key_pressed));\r\n  memset(last_key_pressed, 0, sizeof(last_key_pressed));\r\n  sei();\r\n\r\n  Serial.begin(115200);\r\n  while(!Serial)\r\n    ;           \/\/ wait until CDC ready.\r\n  Serial.println(\"scan_xd87 start.\");    \r\n  rgb_on(VAL_DIMMED);\r\n  BGLED_OFF();\r\n  CAPSLED_OFF();\r\n}\r\n\r\n\/\/ \u3059\u3079\u3066\u306e\u5217\u3092\u8aad\u3093\u3067\u30d3\u30c3\u30c8\u30de\u30c3\u30d7\u306b\u5c55\u958b\u3002\r\nstatic void read_cols(uint8_t row) {\r\n    key_pressed[row++] = ~( ((PINB &lt;&lt; 2) &amp; 0x80) | ((PINF &gt;&gt; 1) &amp; 0x78) | ((PINF &lt;&lt; 1) &amp; 6) | ((PINE &gt;&gt; 6) &amp; 1));\r\n    key_pressed[row++] = ~( ((PINB &lt;&lt; 4) &amp; 0xc0) | ((PINB &lt;&lt; 1) &amp; 0x20) | \r\n          ((PIND &gt;&gt; 3) &amp; 0x18) | ((PIND &gt;&gt; 2) &amp; 4) | ((PINC &gt;&gt; 5) &amp; 2) | ((PINB &gt;&gt; 6) &amp; 1));\r\n    key_pressed[row] = ~((PIND &gt;&gt; 2) &amp; 1) &amp; 1;\r\n}\r\n\r\n#define READ_ROW(port, pin, r)  { \\\r\n  port &amp;= ~_BV(pin); \\\r\n  delayMicroseconds(5); \\\r\n  read_cols(r); \\\r\n  port |= _BV(pin); \\\r\n  delayMicroseconds(5); }\r\n\r\nvoid scan() {\r\n  PORTD &amp;= ~_BV(0); \/\/  \u6642\u9593\u6e2c\u5b9a\u7528\u30c8\u30ea\u30ac\r\n  READ_ROW(PORTD, 1, 0);\r\n  READ_ROW(PORTB, 0, 3);\r\n  READ_ROW(PORTB, 1, 6);\r\n  READ_ROW(PORTC, 7, 9);\r\n  READ_ROW(PORTD, 3, 12);\r\n  READ_ROW(PORTD, 5, 15);\r\n  PORTD |= _BV(0);\r\n}\r\n\r\nunsigned long rgb_bright = 0;\r\nvoid loop() {\r\n  scan();\r\n  uint8_t code = 0;\r\n  uint8_t m = 0;\r\n  for(uint8_t i = 0; i &lt; sizeof(key_pressed); i++) {\r\n    uint8_t pressed = key_pressed[i];\r\n    uint8_t delta = 8; \r\n    if (m == 2) {\r\n      m = 0;\r\n      delta = 1;\r\n    } else\r\n      m++;\r\n    uint8_t change = pressed ^ last_key_pressed[i];\r\n    if (change) {\r\n      uint8_t mask = 1;\r\n      for(uint8_t k = 0; k &lt; delta; k++, mask &lt;&lt;= 1) {\r\n        if (change &amp; mask) {\r\n          uint8_t c = code + k + 1;\r\n          char tmp[10];\r\n          sprintf(tmp, \"%d , %d \", c, (pressed &amp; mask) != 0);\r\n          Serial.print(tmp);\r\n          \/\/ rgb leds.\r\n          rgb_on(VAL_BRIGHT);\r\n          rgb_bright = millis();\r\n        }\r\n      }\r\n      last_key_pressed[i] = pressed;\r\n      Serial.println();\r\n    }\r\n    code += delta;\r\n  }\r\n  if (rgb_bright != 0 &amp;&amp; (millis() - rgb_bright) &gt; 200) {\r\n    rgb_bright = 0;\r\n    rgb_on(VAL_DIMMED);\r\n  }\r\n  delay(10);\r\n}<\/pre>\n<p>\u6700\u521d\u306b\u516c\u958b\u3057\u3066\u3044\u305f\u30b9\u30b1\u30c3\u30c1\u306b\u306f\u3001\u8907\u6570\u306e\u30ad\u30fc\u3092\u540c\u6642\u306b\u62bc\u3057\u305f\u3068\u304d\u3001\u62bc\u3057\u3066\u3044\u306a\u3044\u30ad\u30fc\u306e\u30b3\u30fc\u30c9\u3082\u51fa\u3057\u3066\u3057\u307e\u3046\u3068\u3044\u3046\u6065\u305a\u304b\u3057\u3044\u30d1\u30b0\u304c\u3042\u3063\u305f\u306e\u3067\u4fee\u6b63\u3057\u307e\u3057\u305f\u3002<\/p>\n<h3>\u78ba\u8a8d\u3057\u3066\u3044\u308b\u69d8\u5b50<\/h3>\n<p>\u30b9\u30a4\u30c3\u30c1\u756a\u53f7\u306e\u78ba\u8a8d\u3057\u3066\u3044\u308b\u69d8\u5b50\u3092\u52d5\u753b\u306b\u3082\u3057\u3066\u307f\u305f\u3002<\/p>\n<p><iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/g2BBKI-2j5c\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>\u3042\u3089\u304b\u3058\u3081\u30b7\u30ea\u30a2\u30eb\u30dd\u30fc\u30c8\u3092\u6307\u5b9a\u3057\u305fTera Term\u3092\u958b\u3044\u3066\u304a\u304d\u3001 Atmel Flip \u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u958b\u59cb\u3059\u308b\u3068\u3053\u308d\u304b\u3089\u3001\u3044\u304f\u3064\u304b\u306e\u30b9\u30a4\u30c3\u30c1\u4f4d\u7f6e\u3092\u30d4\u30f3\u30bb\u30c3\u30c8\u3067\u306f\u3055\u3093\u3067\u3044\u308b\u3068\u3053\u308d\u3002<\/p>\n<p>\u30d0\u30a6\u30f3\u30b9 (\u30c1\u30e3\u30bf\u30ea\u30f3\u30b0) \u3092\u9664\u304f\u51e6\u7406\u306f\u5165\u3063\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u30d4\u30f3\u30bb\u30c3\u30c8\u3067\u306e\u89e6\u308a\u65b9\u306b\u3088\u3063\u3066\u3001\u9023\u7d9a\u7684\u306b\u51fa\u529b\u3055\u308c\u305f\u308a\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>Picture in Picture \u3067\u753b\u9762\u30ad\u30e3\u30d7\u30c1\u30e3\u3057\u305f\u52d5\u753b\u3068\u5916\u90e8\u30ab\u30e1\u30e9\u3067\u9332\u3063\u305f\u52d5\u753b\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u307f\u305f\u304c\u3001\u308f\u305a\u304b\u306b\u30bf\u30a4\u30df\u30f3\u30b0\u304c\u305a\u308c\u3066\u3057\u307e\u3063\u305f\u3002<\/p>\n<p>\u4ee5\u4e0b\u3001\u30b9\u30b1\u30c3\u30c1\u5404\u90e8\u306e\u8aac\u660e\u306a\u3069\u3002<\/p>\n<h2>\u307e\u305a\u5fc5\u8981\u306a\u8a2d\u5b9a<\/h2>\n<p>xd87 PCB\u306f\u3001ATmega32u4\u306e\u307b\u3068\u3093\u3069\u306e\u30dd\u30fc\u30c8\u3092\u4f7f\u3063\u305f\u56de\u8def\u69cb\u6210\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u30ad\u30fc\u30b9\u30a4\u30c3\u30c1\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u306b\u95a2\u308f\u308b\u30dd\u30fc\u30c8\u8a2d\u5b9a\u3092\u884c\u3046\u524d\u306b\u3001\u4ee5\u4e0b\u306e\u4e09\u70b9\u3092\u3084\u3063\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u3063\u305f\u3002<\/p>\n<ul>\n<li>\u30d2\u30e5\u30fc\u30ba\u7531\u6765\u306e<strong>\u30af\u30ed\u30c3\u30af\u30d7\u30ea\u30b9\u30b1\u30fc\u30e9(CLKPR)<\/strong>\u306e\u5909\u66f4 (LED\u306e\u8a71\u3067\u89e6\u308c\u305f)\u3002<\/li>\n<li>\u30d2\u30e5\u30fc\u30ba\u7531\u6765\u306e<strong>JTAG\u8a2d\u5b9a\u306e\u7981\u6b62\u3002<\/strong><\/li>\n<li>Arduino\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u306f<strong>TXLED\u3068RXLED\u7528\u30dd\u30fc\u30c8\u3092\u4f7f\u308f\u305b\u306a\u3044<\/strong>\u3002<\/li>\n<\/ul>\n<h3>JTAG\u306e\u7981\u6b62<\/h3>\n<p>ATmega32u4\u306e<strong>JTAG<\/strong>\u3068\u3044\u3046\u6a5f\u80fd\u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u3068\u3001PORTF\u306e4\u3064\u306e\u30d4\u30f3\u304cI\/O\u30dd\u30fc\u30c8\u3068\u3057\u3066\u5229\u7528\u3067\u304d\u306a\u3044\u306e\u3067\u3001\u3053\u308c\u3092\u7981\u6b62\u3057\u305f\u3002\u30d2\u30e5\u30fc\u30ba\u306e\u8abf\u67fb\u3068\u5bfe\u7b56\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"#fuse_settings\">\u5f8c\u534a\u306b\u307e\u3068\u3081\u305f<\/a>\u3002xd87\u95a2\u4fc2\u306e\u4e00\u9023\u306e\u306f\u306a\u3057\u306e\u4e2d\u3067\u306f\u3001\u30d2\u30e5\u30fc\u30ba\u306e\u66f8\u304d\u63db\u3048\u306f\u884c\u308f\u306a\u3044\u3053\u3068\u306b\u3057\u3066\u3044\u308b\u3002<\/p>\n<h3>Arduino Leonardo\u7279\u6709\u306e\u5bfe\u7b56(TXLED, RXLED)<\/h3>\n<p>\u4eca\u56de\u306f\u3001xd87 PCB\u3092Arduino Leonardo\u306b\u898b\u7acb\u3066\u3066\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u3063\u3066\u3044\u308b\u306e\u3067\u3001Leonardo (\u304a\u3088\u3073 Pro Micro) \u306b\u7279\u6709\u306e\u5bfe\u7b56\u304c\u5fc5\u8981\u306b\u306a\u308b\u3002\u3053\u308c\u3089\u306e\u958b\u767a\u30dc\u30fc\u30c9\u3067\u306f\u3001USB\u5165\u51fa\u529b\u306b\u540c\u671f\u3057\u3066\u70b9\u706f\u3059\u308b2\u3064\u306eLED\u304c\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4f7f\u308f\u308c\u3066\u3044\u308b\u3002<\/p>\n<ul>\n<li><strong>PD5 = L \u3067TXLED(\u9001\u4fe1)\u304c\u70b9\u706f\u3002<\/strong><\/li>\n<li><strong>PB0 = L \u3067RXLED(\u53d7\u4fe1)\u304c\u70b9\u706f\u3002<\/strong><\/li>\n<\/ul>\n<p>PB0\u3068PD5\u306f\u3001\u3044\u305a\u308c\u3082\u884c\u3092\u9078\u629e\u3059\u308b\u305f\u3081\u306e\u51fa\u529b\u7528\u30dd\u30fc\u30c8\u30d4\u30f3\u3068\u3057\u3066\u4f7f\u3046\u306e\u3067\u3001USB\u5165\u51fa\u529b\u306e\u90fd\u5408\u3067\u52dd\u624b\u306b\u72b6\u614b\u3092\u5909\u66f4\u3055\u308c\u3066\u306f\u56f0\u308b\u3002Arduino\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u306f\u3001\u3053\u308c\u3089\u306e\u30dd\u30fc\u30c8\u30d4\u30f3\u306e\u521d\u671f\u8a2d\u5b9a\u3084LED\u64cd\u4f5c\u306e\u305f\u3081\u306e\u30b3\u30fc\u30c9\u306f USBCore.cpp \u306b\u307e\u3068\u3081\u3089\u308c\u3066\u3044\u308b\u304b\u3089\u3001\u3053\u308c\u3092\u66f8\u304d\u63db\u3048\u3066\u4f7f\u3046\u3053\u3068\u306b\u3057\u305f\u3002\u5909\u66f4\u306e\u8a73\u7d30\u3084\u5909\u66f4\u5f8c\u306e\u30b3\u30fc\u30c9\u306b\u3064\u3044\u3066\u306f<a href=\"#usbcore_cpp\">\u5f8c\u534a\u306b<\/a>\u3002<\/p>\n<h3>\u30b7\u30ea\u30a2\u30eb\u901a\u4fe1\u306e\u958b\u59cb<\/h3>\n<p>\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306f\u3001Arduino\u306e\u3088\u304f\u3042\u308b\u30b9\u30b1\u30c3\u30c1\u3068\u540c\u69d8\u306b\u3001setup() \u306e\u7d42\u308f\u308a\u3042\u305f\u308a\u3067 <strong>Serial.begin();<\/strong>\u00a0\u3057\u3066\u3044\u308b\u304c\u3001Arduino Leonardo\u3084SparkFun Pro Micro\u3067\u3084\u308b\u306e\u3068\u540c\u3058\u304f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true\">  Serial.begin(115200);\r\n  while(!Serial) \r\n    ;<\/pre>\n<p>\u30b7\u30ea\u30a2\u30eb\u901a\u4fe1\u306e\u76f8\u624b\u65b9\u3068\u63a5\u7d9a\u3067\u304d\u308b\u307e\u3067\u3053\u3053\u3067\u5f85\u3064\u3002\u3064\u307e\u308a\u3001PC\u306a\u3069\u3067\u30bf\u30fc\u30df\u30ca\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0 (Tera Term\u306a\u3069)\u3092\u52d5\u304b\u3057\u3001\u6b63\u3057\u3044\u30dd\u30fc\u30c8\u3092\u30aa\u30fc\u30d7\u30f3\u3057\u306a\u3044\u3068\u5148\u306b\u9032\u307e\u306a\u3044\u3002<\/p>\n<p>Leonardo\u3084Pro Micro\u3067\u306e Serial \u306f\u3001<strong>USB\u306eCDC (Communication Device Class)<\/strong> \u3092\u4f7f\u3063\u3066\u5b9f\u88c5\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u3053\u3046\u3044\u3046\u30b3\u30fc\u30c9\u3092\u5165\u308c\u3066CDC\u306b\u3088\u308b\u63a5\u7d9a\u304c\u5b8c\u4e86\u3057\u5229\u7528\u53ef\u80fd\u3068\u306a\u308b\u307e\u3067\u5f85\u3064\u5fc5\u8981\u304c\u3042\u308b\u3002Serial.begin(); \u3057\u305f\u76f4\u5f8c\u306b Serial.println(&#8220;test&#8221;); \u3068\u304b\u51fa\u3057\u3066\u3057\u307e\u3046\u3068\u3001\u305d\u306e\u5f8c\u306eUSB\u3092\u4f7f\u3063\u305f\u901a\u4fe1\u304c\u3046\u307e\u304f\u3044\u304b\u306a\u304b\u3063\u305f\u308a\u3059\u308b\u3002<\/p>\n<h2>\u30b9\u30ad\u30e3\u30f3\u7528\u306e\u30dd\u30fc\u30c8\u8a2d\u5b9a<\/h2>\n<p>\u30b9\u30a4\u30c3\u30c1\u72b6\u614b\u8aad\u307f\u53d6\u308a\u7528\u306e\u8a2d\u5b9a\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true\">\/\/ setup Ports.\r\n  DDRB =  _BV(7) | _BV(1) | _BV(0); \/\/ PB7 = RGBLED.\r\n  DDRC =  _BV(7);\r\n  DDRD =  _BV(5) | _BV(3) | _BV(1) | _BV(0);\r\n  DDRE =  _BV(2);\r\n  DDRF =  0;\r\n\/\/ set INPUT_PULLUP to COLs.\r\n  PORTB =  _BV(6) | _BV(5) | _BV(4) | _BV(3) | _BV(2);\r\n  PORTC =  _BV(6);\r\n  PORTD =  _BV(7) | _BV(6) | _BV(4) | _BV(2);\r\n  PORTE =  _BV(6);\r\n  PORTF =  _BV(7) | _BV(6) | _BV(5) | _BV(4) | _BV(1) | _BV(0);\r\n\/\/ set output HIGH to all ROWs. BGLED off.\r\n  PORTB = PORTB | _BV(0) | _BV(1);\r\n  PORTC = PORTC | _BV(7);\r\n  PORTD = PORTD | _BV(0) | _BV(1) | _BV(3) | _BV(5);\r\n<\/pre>\n<p>DDR\u3067\u306f\u3058\u307e\u308b\u30ec\u30b8\u30b9\u30bf\u306f\u30dd\u30fc\u30c8\u30d4\u30f3\u306e\u5165\u51fa\u529b\u65b9\u5411\u3092\u8a2d\u5b9a\u3059\u308b\u305f\u3081\u306e\u3082\u306e\u3067\u30011 \u3092\u30bb\u30c3\u30c8\u3057\u305f\u30d4\u30f3\u304c\u51fa\u529b\u65b9\u5411\u306b\u306a\u308b (\u521d\u671f\u5024\u306f\u3059\u3079\u3066\u5165\u529b\u65b9\u5411)\u3002\u884c\u306b\u63a5\u7d9a\u3057\u3066\u3044\u308b6\u3064\u306e\u30d4\u30f3\u306e\u4ed6\u306b\u3001RGBLED(PB7)\u3001BGLED(PD0)\u3001CapsLED(PE2)\u3092\u51fa\u529b\u3068\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>\u6b21\u306b\u3001\u5165\u529b\u30d4\u30f3\u306e\u30d7\u30eb\u30a2\u30c3\u30d7\u62b5\u6297\u3092\u6709\u52b9\u306b\u3059\u308b\u305f\u3081\u3001\u5217\u306b\u63a5\u7d9a\u3059\u308b17\u672c\u306e\u30d4\u30f3\u306b\u3064\u3044\u3066\u3001PORTx\u30ec\u30b8\u30b9\u30bf\u306b 1 \u3092\u30bb\u30c3\u30c8\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>\u6700\u5f8c\u306b\u3001\u51fa\u529b\u30dd\u30fc\u30c8\u30d4\u30f3\u306e\u521d\u671f\u72b6\u614b\u3092\u30ed\u30b8\u30c3\u30afH\u3068\u3057\u3001BGLED\u7528\u306e\u30d4\u30f3\u306b\u3082H\u3092\u4e0e\u3048\u3066\u6d88\u706f\u3057\u3066\u3044\u308b\u3002<\/p>\n<h2>\u30b9\u30a4\u30c3\u30c1\u72b6\u614b\u3092\u8aad\u3080<\/h2>\n<p>\u30b9\u30a4\u30c3\u30c1\u306e\u72b6\u614b\u306e\u8aad\u307f\u8fbc\u307f\u306f\u3001\u4ee5\u4e0b\u306e\u7e70\u308a\u8fd4\u3057\u306b\u306a\u308b\u3002<\/p>\n<ol>\n<li>\u3042\u308b\u4e00\u3064\u306e\u884c\u306e\u30dd\u30fc\u30c8\u306bL\u3092\u51fa\u529b<\/li>\n<li>\u3059\u3079\u3066\u306e\u5217\u306e\u72b6\u614b\u3092\u8aad\u307f\u8fbc\u3080<\/li>\n<li>L\u306b\u3057\u305f\u884c\u3092H\u306b\u623b\u3059\u3002<\/li>\n<\/ol>\n<p>\u3053\u308c\u30921\u884c\u76ee\u304b\u30896\u884c\u76ee\u307e\u3067\u884c\u3046\u3053\u3068\u3067\u3001\u3059\u3079\u3066\u306e\u30b9\u30a4\u30c3\u30c1\u72b6\u614b\u304c\u5f97\u3089\u308c\u308b\u30021\u3064\u306e\u30b9\u30a4\u30c3\u30c1\u306e\u72b6\u614b\u30921\u30d3\u30c3\u30c8\u3067\u8868\u73fe\u3057\u3066\u8a18\u61b6\u3059\u308b\u306e\u3067\u3001\u5168\u4f53\u30676 \u00d7 17\u30d3\u30c3\u30c8\u5fc5\u8981\u306b\u306a\u308b\u3002\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306f\u51e6\u7406\u306e\u3057\u3084\u3059\u3055\u304b\u30891\u884c\u3042\u305f\u308a3\u30d0\u30a4\u30c8\u305a\u3064\u8a18\u61b6\u3059\u308b\u3088\u3046\u306b\u3057\u305f\u3002<\/p>\n<p>\u884c\u306e\u9078\u629e\u3068\u5217\u72b6\u614b\u306e\u8aad\u307f\u8fbc\u307f\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30de\u30af\u30ed\u306b\u3057\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true\">#define READ_ROW(port, pin, r)  { \\\r\n  port &amp;= ~_BV(pin); \\\r\n  delayMicroseconds(5); \\\r\n  read_cols(r); \\\r\n  port |= _BV(pin); \\\r\n  delayMicroseconds(5); }\r\n<\/pre>\n<p>port\u306b\u306f\u5bfe\u8c61\u884c\u306e\u30dd\u30fc\u30c8\u540d\u3001pin\u306b\u306f\u30d4\u30f3\u756a\u53f7\u3092\u6307\u5b9a\u3059\u308b\u3002\u884c\u3054\u3068\u306e17\u500b\u306e\u30b9\u30a4\u30c3\u30c1\u72b6\u614b\u306e\u8aad\u307f\u53d6\u308a\u3068\u683c\u7d0d\u306f read_cols() \u3067\u884c\u3046\u3002<\/p>\n<p>\u3053\u306e\u30de\u30af\u30ed\u306e\u4e2d\u3067\u306f\u3001\u30dd\u30fc\u30c8\u306e\u51fa\u529b\u3092\u5909\u66f4\u3057\u305f\u3042\u3068 delayMicroseconds(5); \u306b\u3088\u3063\u3066\u9045\u5ef6\u3092\u304a\u3044\u3066\u3044\u308b\u3002\u3053\u308c\u306f\u3001\u51fa\u529b\u30dd\u30fc\u30c8\u306e\u72b6\u614b\u3092\u5909\u66f4\u3057\u3066\u304b\u3089\u5165\u529b\u30dd\u30fc\u30c8\u306e\u30ed\u30b8\u30c3\u30af\u30ec\u30d9\u30eb\u304cV<small>IL<\/small>\u3084V<small>IH<\/small>\u306b\u9054\u3059\u308b\u307e\u3067\u306b\u751f\u3058\u308b\u9045\u5ef6\u6642\u9593\u306b\u5bfe\u51e6\u3059\u308b\u305f\u3081 (\u30d7\u30eb\u30a2\u30c3\u30d7\u62b5\u6297\u3068\u3001\u30dd\u30fc\u30c8\u3084\u914d\u7dda\u306e\u5bb9\u91cf\u306b\u8d77\u56e0\u3059\u308b)\u3002<\/p>\n<h3>\u5217\u306e\u72b6\u614b\u306e\u8aad\u53d6\u308a<\/h3>\n<p>\u4ee5\u4e0b\u306e read_cols() \u306b\u3088\u308a\u3001\u9078\u629e\u4e2d\u306e\u884c\u306e\u3059\u3079\u3066\u306e\u5217\u306e\u30b9\u30a4\u30c3\u30c1\u72b6\u614b\u3092\u8aad\u307f\u53d6\u308b\u3002<\/p>\n<pre class=\"lang:default decode:true\">static void read_cols(uint8_t row) {\r\n    key_pressed[row++] = ~( ((PINB &lt;&lt; 2) &amp; 0x80) | ((PINF &gt;&gt; 1) &amp; 0x78) | ((PINF &lt;&lt; 1) &amp; 6) | ((PINE &gt;&gt; 6) &amp; 1));\r\n    key_pressed[row++] = ~( ((PINB &lt;&lt; 4) &amp; 0xc0) | ((PINB &lt;&lt; 1) &amp; 0x20) | \r\n          ((PIND &gt;&gt; 3) &amp; 0x18) | ((PIND &gt;&gt; 2) &amp; 4) | ((PINC &gt;&gt; 5) &amp; 2) | ((PINB &gt;&gt; 6) &amp; 1));\r\n    key_pressed[row] = ~((PIND &gt;&gt; 2) &amp; 1) &amp; 1;\r\n}<\/pre>\n<p>\u56de\u8def\u56f3\u306b\u5408\u308f\u305b\u306617\u5217\u306e\u72b6\u614b\u3092\u53d6\u5f97\u3057\u3001\u30b9\u30a4\u30c3\u30c1\u72b6\u614b\u3092\u8a18\u61b6\u3059\u308b key_pressed[] \u306b\u683c\u7d0d (1\u884c\u3042\u305f\u308a3\u30d0\u30a4\u30c8)\u3002\u30aa\u30f3\u306b\u306a\u3063\u3066\u3044\u308b\u30b9\u30a4\u30c3\u30c1\u306e\u72b6\u614b\u306f\u5b9f\u969b\u306b\u306f L ( == 0) \u3068\u306a\u308b\u304c\u3001\u683c\u7d0d\u306b\u3042\u305f\u3063\u3066\u30d3\u30c3\u30c8\u53cd\u8ee2\u30571\u3067\u8868\u73fe\u3057\u3066\u3044\u308b\u3002\u306a\u304a\u30013\u30d0\u30a4\u30c8\u76ee\u306f\u6700\u4e0b\u4f4d\u306e1\u30d3\u30c3\u30c8\u3057\u304b\u4f7f\u3063\u3066\u3044\u306a\u3044\u306e\u3067\u3001LSB\u4ee5\u5916\u306f0\u3068\u3057\u3066\u3044\u308b\u3002<\/p>\n<h3>\u5168\u884c\u306e\u72b6\u614b\u306e\u8aad\u307f\u53d6\u308a<\/h3>\n<p>scan() \u3067\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5168\u884c\u3092\u9806\u306b\u8aad\u307f\u53d6\u3063\u3066\u3044\u308b\u3002<\/p>\n<pre class=\"lang:default decode:true\">void scan() {\r\n  PORTD &amp;= ~_BV(0); \/\/  \u6642\u9593\u6e2c\u5b9a\u7528\u30c8\u30ea\u30ac\r\n  READ_ROW(PORTD, 1, 0);\r\n  READ_ROW(PORTB, 0, 3);\r\n  READ_ROW(PORTB, 1, 6);\r\n  READ_ROW(PORTC, 7, 9);\r\n  READ_ROW(PORTD, 3, 12);\r\n  READ_ROW(PORTD, 5, 15);\r\n  PORTD |= _BV(0);\r\n}<\/pre>\n<p>6\u3064\u306e\u884c\u3092\u4e0a\u304b\u3089\u9806\u306b\u8aad\u307f\u53d6\u3063\u3066\u3044\u308b\u3002READ_ROW() \u3067\u306f1\u884c\u306b\u3064\u304d3\u30d0\u30a4\u30c8\u305a\u3064\u5217\u306e\u72b6\u614b\u3092\u683c\u7d0d\u3057\u3066\u3044\u304f\u306e\u3067\u3001 key_pressed[] \u306b\u683c\u7d0d\u3059\u3079\u304d\u4f4d\u7f6e\u30923\u305a\u3064\u5897\u3084\u3057\u3066\u6307\u5b9a\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>\u6700\u521d\u3068\u6700\u5f8c\u306e PD0 \u306e\u64cd\u4f5c\u306f\u3001\u30bf\u30a4\u30df\u30f3\u30b0\u306e\u89b3\u5bdf\u306e\u305f\u3081\u306e\u30ed\u30b8\u30a2\u30ca\u306e\u30c8\u30ea\u30ac\u4fe1\u53f7\u3068\u3059\u308b\u305f\u3081\u306b\u5165\u308c\u3066\u3044\u308b\u3002PD0 \u306fBGLED\u3092\u70b9\u706f\uff0f\u6d88\u706f\u3059\u308b\u305f\u3081\u306e\u30dd\u30fc\u30c8\u3067\u3001\u30ed\u30b8\u30c3\u30afL\u3092\u66f8\u304f\u3068\u70b9\u706f\u3059\u308b\u304b\u3089\u884c\u306e\u8aad\u307f\u8fbc\u307f\u4e2d\u306b\u70b9\u706f\u3057\u3066\u3044\u308b\u3053\u3068\u306b\u306a\u308b\u3002<\/p>\n<h2>void loop() \u3067\u306e\u51e6\u7406<\/h2>\n<p>scan() \u306b\u3088\u3063\u3066 key_pressed[] \u306b\u5f97\u305f\u5168\u30b9\u30a4\u30c3\u30c1\u306e\u72b6\u614b\u3092\u3001\u524d\u56de\u30b9\u30ad\u30e3\u30f3\u6642\u306e\u72b6\u614b ( last_key_pressed[] )\u3068\u6bd4\u8f03\u3059\u308b\u3053\u3068\u3067\u3001\u5909\u5316\u304c\u3042\u3063\u305f\u30ad\u30fc\u3092\u691c\u51fa\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>\u524d\u56de\u3068\u4eca\u56de\u3068\u3067\u540c\u3058\u30b9\u30a4\u30c3\u30c1\u304b\u3089\u5f97\u305f\u30d3\u30c3\u30c8\u3092 XOR \u3059\u308b\u3068\u3001\u30b9\u30a4\u30c3\u30c1\u72b6\u614b\u306b\u5909\u5316\u304c\u3042\u308c\u3070 1 \u3068\u306a\u308b\u3002\u305d\u3057\u3066\u3001XOR\u3057\u3066\u5f97\u305f\u30d3\u30c3\u30c8\u3068\u4eca\u56de\u5f97\u305f\u30d3\u30c3\u30c8\u306e AND \u3092\u3068\u3063\u305f\u3068\u304d\u30011\u306a\u3089\u3070\u30aa\u30f3\u306b\u30010\u306a\u3089\u3070\u30aa\u30d5\u306b\u306a\u3063\u305f\u3053\u3068\u306b\u306a\u308b\u3002<\/p>\n<p>\u305d\u3046\u3044\u3063\u305f\u51e6\u7406\u3092 key_pressed[] \u5185\u306e\u5168\u30d3\u30c3\u30c8\u306b\u5bfe\u3057\u3066\u884c\u3044\u3001\u5909\u5316\u306e\u3042\u3063\u305f\u30b9\u30a4\u30c3\u30c1\u756a\u53f7\u3068\u3001\u30aa\u30f3\u306b\u306a\u3063\u305f\u306e\u304b\u30aa\u30d5\u306b\u306a\u3063\u305f\u306e\u304b\u3092\u30b7\u30ea\u30a2\u30eb\u51fa\u529b\u3059\u308b\u3002\u305d\u3057\u3066\u3001\u5909\u5316\u306e\u3042\u3063\u305f\u30d3\u30c3\u30c8\u3092\u542b\u3080\u30d0\u30a4\u30c8\u3092\u3001last_key_pressed[] \u306b\u30b3\u30d4\u30fc\u3059\u308b\u3053\u3068\u3067\u76f4\u524d\u60c5\u5831\u3092\u66f4\u65b0\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u52d5\u304b\u3057\u3001\u3059\u3079\u3066\u306e\u30ad\u30fc\u30b9\u30a4\u30c3\u30c1\u30dd\u30b8\u30b7\u30e7\u30f3\u306b\u30d4\u30f3\u30bb\u30c3\u30c8\u306e\u5148\u3092\u7a81\u3063\u8fbc\u3093\u3067\u78ba\u8a8d\u3057\u305f\u7d50\u679c\u304c\u4ee5\u4e0b\u306e\u56f3\u306b\u306a\u308b\u3002<\/p>\n<figure id=\"attachment_11093\" aria-describedby=\"caption-attachment-11093\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2020\/02\/sw_number.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-11093\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2020\/02\/sw_number-552x206.png\" alt=\"\" width=\"552\" height=\"206\" \/><\/a><figcaption id=\"caption-attachment-11093\" class=\"wp-caption-text\">xd87\u30b9\u30a4\u30c3\u30c1\u756a\u53f7<\/figcaption><\/figure>\n<p>\u3053\u3053\u306b\u8a18\u8f09\u3057\u305f\u30b9\u30a4\u30c3\u30c1\u756a\u53f7\u306f\u3001\u3042\u304f\u307e\u3067\u3082\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u5f97\u3089\u308c\u305f\u3082\u306e\u3067\u3042\u308a\u3001\u5b9f\u969b\u306e\u88fd\u54c1\u306b\u3053\u306e\u3088\u3046\u306a\u756a\u53f7\u304c\u632f\u3089\u308c\u3066\u3044\u308b\u308f\u3051\u3067\u306f\u306a\u3044\u3002<\/p>\n<h3>\u30b9\u30ad\u30e3\u30f3\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u30c1\u30e3\u30fc\u30c8<\/h3>\n<p>USB\u30ed\u30b8\u30a2\u30ca\u3092\u4f7f\u3063\u3066\u884c\u306e\u9078\u629e\u3068\u8aad\u53d6\u308a\u306b\u8981\u3059\u308b\u6642\u9593\u3084\u3001\u5168\u4f53\u306e\u30b9\u30ad\u30e3\u30f3\u306b\u8981\u3059\u308b\u6642\u9593\u3092\u89b3\u5bdf\u3057\u3066\u307f\u305f\u3068\u308d\u3001\u4e0b\u56f3\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u305f\u3002\u30b9\u30b1\u30c3\u30c1\u5185\u306e scan() \u306e\u6700\u521d\u3068\u6700\u5f8c\u306b\u3042\u308bPORTD0\u306e\u64cd\u4f5c\u3092\u30c8\u30ea\u30ac\u3068\u3057\u3066\u30b5\u30f3\u30d7\u30ea\u30f3\u30b0\u3057\u3066\u3044\u308b(\u4e00\u756a\u4e0b\u306e\u30d4\u30f3\u30af\u8272\u306e\u7dda)\u3002<\/p>\n<figure id=\"attachment_11242\" aria-describedby=\"caption-attachment-11242\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2020\/03\/scan_timing2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"waku wp-image-11242 size-large\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2020\/03\/scan_timing2-552x274.png\" alt=\"\" width=\"552\" height=\"274\" \/><\/a><figcaption id=\"caption-attachment-11242\" class=\"wp-caption-text\">\u30ad\u30fc\u30b9\u30ad\u30e3\u30f3\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u56f3<\/figcaption><\/figure>\n<p>\u5404\u884c\u306e\u30ed\u30b8\u30c3\u30af\u3092\u8868\u3059\u7dda\u306b\u306f\u5b9a\u671f\u7684\u306b10\u03bc\u79d2\u307b\u3069\u306eL\u671f\u9593\u304c\u3042\u308b\u304c\u3001\u3053\u308c\u304c\u307b\u307cREAD_ROW()\u30de\u30af\u30ed\u306e\u5b9f\u884c\u671f\u9593\u306b\u306a\u308b\u30026\u884c\u3059\u3079\u3066\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u306e\u306b\u8981\u3057\u3066\u3044\u308b\u6642\u9593\uff08\u307b\u307cscan() \u306e\u5b9f\u884c\u6642\u9593\uff09\u306f\u7d0462\u03bc\u79d2\u7a0b\u5ea6\u3001\u305d\u306e\u5f8c\u306eloop() \u5185\u306e\u51e6\u7406\u6642\u9593\u306b\u7d0440\u03bc\u79d2\u307b\u3069\u304b\u304b\u3063\u3066\u3044\u308b\u3002\u524d\u5f8c\u306e\u30b9\u30ad\u30e3\u30f3\u7d50\u679c\u306b\u76f8\u9055\u304c\u306a\u3044\u5834\u5408\u306e\u3082\u306e\u306a\u306e\u3067\u3001\u6bd4\u8f03\u306b\u8981\u3059\u308b\u6700\u77ed\u6642\u9593\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308b\u3002<\/p>\n<p>\u56f3\u5185\u306eBGLED\u306e\u30a2\u30ce\u30fc\u30c9\u5074\u7aef\u5b50\u304b\u3089\u5f97\u3066\u3044\u308b\u30d4\u30f3\u30af\u306e\u7dda\u306eL\u671f\u9593\u306f20.7\u03bc\u79d2\u3068\u306a\u3063\u3066\u304a\u308a\u3001scan() \u4ee5\u5916\u306e loop() \u5185\u306e\u5b9f\u884c\u6642\u9593\u3092\u8868\u3057\u3066\u3044\u308b\u3088\u3046\u306b\u601d\u3048\u308b\u304c\u3001PD0\u3092H\u306b\u3057\u3066\u3082\u30a2\u30ce\u30fc\u30c9\u5074\u304c\u30ed\u30b8\u30c3\u30afL\u306b\u306a\u308b\u307e\u3067\u306b\u306f\u30a2\u30ca\u30ed\u30b0\u7684\u306a\u9045\u5ef6\u304c\u3042\u308a\u3001\u7acb\u3061\u4e0b\u304c\u308a\u304c\u9045\u308c\u3066\u3044\u308b\u3002<\/p>\n<p>READ_ROW()\u5185\u306b\u306f\u5408\u8a0810\u03bc\u79d2\u306e\u9045\u5ef6\u3092\u5165\u308c\u3066\u3044\u308b\u304b\u3089\u3001\u884c\u3054\u3068\u306eL\u671f\u9593\u306b\u3064\u3044\u3066\u3082\u5b9f\u969b\u306b\u306f\u3082\u3046\u3061\u3087\u3063\u3068\u9577\u3044\u306f\u305a\u3002\u3053\u306e\u3042\u305f\u308a\u306e\u3068\u3053\u308d\u306f\u30ed\u30b8\u30a2\u30ca\u3067\u306f\u306a\u304f\u3001\u30aa\u30b7\u30ed\u30b9\u30b3\u30fc\u30d7\u3067\u89b3\u5bdf\u3057\u305f\u65b9\u304c\u3088\u3044\u306e\u306f\u9593\u9055\u3044\u306a\u3044\u3002<\/p>\n<p>\u306a\u304a\u3001\u3053\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3092\u5f97\u308b\u3068\u304d\u306b\u306f\u3001void loop() \u306e\u6700\u5f8c\u306b\u3042\u308b delay(10); \u3092\u30b3\u30e1\u30f3\u30c8\u3068\u3057\u3066\u3044\u308b\u3002<\/p>\n<h2 id=\"usbcore_cpp\">USBCore.cpp \u306e\u4fee\u6b63<\/h2>\n<p>Leonardo\u3084Pro Micro\u306eTXLED\u304a\u3088\u3073RXLED\u7528\u306e\u30dd\u30fc\u30c8\u3092Arduino\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u89e6\u3089\u305b\u306a\u3044\u305f\u3081\u3001<strong>USBCore.cpp\u3092\u66f8\u304d\u63db\u3048\u305f<\/strong>\u3002<br \/>\n\u66f8\u63db\u3048\u306f <strong>&#8230;\\Arduino\\hardware\\arduino\\avr\\cores\\arduino\\USBCore.cpp\u00a0 (\u304a\u3088\u3073 .h)<\/strong> \u3092\u3001\u4eca\u56de\u4f5c\u3063\u3066\u3044\u308b\u30b9\u30b1\u30c3\u30c1\u306e\u3042\u308b\u30d5\u30a9\u30eb\u30c0\u306b\u30b3\u30d4\u30fc\u3057\u3066\u304d\u3066\u3001\u30b3\u30d4\u30fc\u3057\u3066\u304d\u305f\u3082\u306e\u306b\u5bfe\u3057\u3066\u884c\u3063\u305f\u3002<\/p>\n<p>\u5177\u4f53\u7684\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8ffd\u52a0\u3057\u3066\u3001\u5b9a\u7fa9\u6e08\u306e\u30dd\u30fc\u30c8\u60c5\u5831\u3092\u6d88\u3057\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true \">#include \"USBAPI.h\"\r\n#include \"PluggableUSB.h\"\r\n#include &lt;stdlib.h&gt;\r\n\r\n\/\/ \u3053\u3053\u304b\u3089\u3001\r\n#if defined(TXLED0)\r\n  #undef TXLED0\r\n  #define TXLED0\r\n#endif\r\n#if defined(TXLED1)\r\n  #undef TXLED1\r\n  #define TXLED1\r\n#endif  \r\n#if defined(RXLED0)\r\n  #undef RXLED0\r\n  #define RXLED0\r\n#endif\r\n#if defined(RXLED1)\r\n  #undef RXLED1\r\n  #define RXLED1\r\n#endif  \r\n#if defined(TX_RX_LED_INIT)\r\n#undef TX_RX_LED_INIT\r\n#define TX_RX_LED_INIT\r\n#endif\r\n\/\/ \u3053\u3053\u307e\u3067\r\n#if defined(USBCON)\r\n...<\/pre>\n<p>USBCore.cpp \u3067\u306f\u3001\u3053\u3053\u3067\u5185\u5bb9\u3092\u7a7a\u306b\u3057\u305f\u30de\u30af\u30ed\u3092\u547c\u3076\u3053\u3068\u3067\u30dd\u30fc\u30c8\u306e\u521d\u671f\u5316\u3084LED\u306e\u70b9\u706f\uff0f\u6d88\u706f\u3092\u884c\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u30de\u30af\u30ed\u5b9a\u7fa9\u3055\u3048\u5909\u66f4\u3057\u3066\u3057\u307e\u3048\u3070\u30b3\u30fc\u30c9\u306e\u5185\u5bb9\u307e\u3067\u624b\u3092\u5165\u308c\u308b\u5fc5\u8981\u304c\u306a\u3044\u3002<\/p>\n<h3>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/h3>\n<p>\u4eca\u56de\u4f5c\u6210\u3057\u305f\u30b9\u30b1\u30c3\u30c1 (scan_xd87-4.ino) \u304a\u3088\u3073\u5909\u66f4\u3092\u52a0\u3048\u305fUSBCore.cpp \u306f\u3001<a href=\"\/blog\/download\/scan_xd87-4.zip\">scan_xd87-4.zip \u3068\u3057\u3066\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059<\/a>\u3002USBCore.h \u3082\u542b\u3093\u3067\u3044\u307e\u3059\u304c\u3001\u3053\u308c\u306b\u3064\u3044\u3066\u306f\u5909\u66f4\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u307e\u305f\u3001light_ws2812.c \u304a\u3088\u3073 .h \u3082\u542b\u3093\u3067\u3044\u307e\u3059\u3002<\/p>\n<h2 id=\"fuse_settings\">\u30d2\u30e5\u30fc\u30ba\u30d3\u30c3\u30c8\u306e\u78ba\u8a8d\u3068\u5bfe\u7b56<\/h2>\n<p>xd87\u306eLED\u3092\u30c1\u30ab\u30c1\u30ab\u3055\u305b\u3066\u307f\u305f\u3068\u304d\u3001<strong>CLKPR ( \u30af\u30ed\u30c3\u30af\u30d7\u30ea\u30b9\u30b1\u30fc\u30e9\u30ec\u30b8\u30b9\u30bf )<\/strong>\u3092\u64cd\u4f5c\u3057\u3066\u30b7\u30b9\u30c6\u30e0\u30af\u30ed\u30c3\u30af\u306e\u5206\u5468\u6bd4\u30921 (\u5206\u5468\u7121\u3057\uff09\u306b\u3057\u305f\u304c\u3001Leonardo\u3084Pro Micro\u3067\u306f\u3042\u3089\u304b\u3058\u3081\u30d2\u30e5\u30fc\u30ba\u30d3\u30c3\u30c8\u304c\u30d7\u30ed\u30b0\u30e9\u30e0\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u3053\u3046\u3044\u3063\u305f\u64cd\u4f5c\u306f\u4e0d\u8981\u306b\u306a\u3063\u3066\u3044\u308b\u3002\u3067\u306f\u3001\u4ed6\u306e\u30d2\u30e5\u30fc\u30ba\u306e\u5185\u5bb9\u306f\u3069\u3046\u306a\u3063\u3066\u3044\u308b\u306e\u304b\u3092\u8abf\u3079\u3066\u5bfe\u7b56\u3092\u884c\u3063\u305f\u3002<\/p>\n<p>\u30d2\u30e5\u30fc\u30ba\u30d3\u30c3\u30c8\u306e\u78ba\u8a8d\u306b\u306f\u6b21\u306e\u3088\u3046\u306a\u30b9\u30b1\u30c3\u30c1\u3092\u4f7f\u3063\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true\">\/\/ show_fuse.ino\r\nvoid setup() {\r\n  cli();\r\n  CLKPR = 0x80;\r\n  CLKPR = 0;    \/\/ CLKPR = 1\/1\r\n  \r\n  SPMCSR |= (_BV(BLBSET) | _BV(SPMEN)); \r\n  uint8_t flb = pgm_read_byte(0); \/\/ Fuse Low Byte \r\n  SPMCSR |= (_BV(BLBSET) | _BV(SPMEN)); \r\n  uint8_t fhb = pgm_read_byte(3); \/\/ Fuse High Byte\r\n  SPMCSR |= (_BV(BLBSET) | _BV(SPMEN));  Byte\r\n  uint8_t efb = pgm_read_byte(2); \/\/ Extended Fuse\r\n  \r\n  sei();\r\n  Serial.begin(115200);\r\n  while(!Serial)  \/\/ wait for CDC ready.\r\n    ;\r\n  char tmp[100];\r\n  sprintf(tmp, \"flb = %02x, fhb = %02x, efb = %02x\", flb, fhb, efb );\r\n  Serial.println(tmp);\r\n}\r\n\r\nvoid loop() { }<\/pre>\n<p>setup() \u5185\u3067 \u30ed\u30fc\u30d0\u30a4\u30c8\u30d2\u30e5\u30fc\u30ba (Fuse Low Byte)\u3001\u30cf\u30a4\u30d0\u30a4\u30c8\u30d2\u30e5\u30fc\u30ba (Fuse High Byte)\u3001\u62e1\u5f35\u30d0\u30a4\u30c8\u30d2\u30e5\u30fc\u30ba (Extended Fuse Byte) \u306e\u5185\u5bb9\u3092\u5f97\u3066\u304a\u304d\u3001Serial.println(); \u3067\u51fa\u529b\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u304b\u3089\u30d2\u30e5\u30fc\u30ba\u306e\u5185\u5bb9\u3092\u5f97\u308b\u305f\u3081\u306b\u306f\u3001<strong>SPMCSR ( SPM\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30fb\u30b9\u30c6\u30fc\u30bf\u30b9\u30ec\u30b8\u30b9\u30bf)<\/strong> \u306b\u30a2\u30af\u30bb\u30b9\u3057\u3001Z\u30ec\u30b8\u30b9\u30bf\u306b\u6240\u5b9a\u306e\u5024\u3092\u30bb\u30c3\u30c8\u3057\u3066LPM (Load Program Memory) \u547d\u4ee4\u3092\u5b9f\u884c\u3059\u308b\u3002\u8a73\u3057\u304f\u306f\u3001 <a href=\"http:\/\/ww1.microchip.com\/downloads\/en\/devicedoc\/atmel-7766-8-bit-avr-atmega16u4-32u4_datasheet.pdf\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>ATmega16U4\/ATmega32U4 \u30c7\u30fc\u30bf\u30b7\u30fc\u30c8<\/strong> <\/a>\u306e <strong>27.7.9 Reading the Fuse and Lock Bits from Software<\/strong> \u3092\u53c2\u7167\u3002<br \/>\n\u3053\u306e\u30b9\u30b1\u30c3\u30c1\u3092\u9006\u30a2\u30bb\u30f3\u30d6\u30eb\u3057\u3066\u307f\u308b\u3068\u3001\u30ed\u30fc\u30d0\u30a4\u30c8\u30d2\u30e5\u30fc\u30ba\u3092\u8aad\u3080\u90e8\u5206\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u306b\u306a\u3063\u3066\u3044\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true\">d26:\t87 b7       \tin\tr24, 0x37\t; 55\r\nd28:\t89 60       \tori\tr24, 0x09\t; 9\r\nd2a:\t87 bf       \tout\t0x37, r24\t; 55\r\nd2c:\tf0 e0       \tldi\tr31, 0x00\t; 0\r\nd2e:\te0 e0       \tldi\tr30, 0x00\t; 0\r\nd30:\t14 91       \tlpm\tr17, Z\r\n...<\/pre>\n<p>\u3053\u306e\u30b3\u30fc\u30c9\u306f\u3001SPMCSR (I\/O\u30a2\u30c9\u30ec\u30b9\u306e0x37)\u306b\u6240\u5b9a\u306e\u30c7\u30fc\u30bf\u3092\u30bb\u30c3\u30c8\u3057\u305d\u306e3\u30b5\u30a4\u30af\u30eb\u4ee5\u5185\u306b0\u756a\u5730 (Z == 0) \u304b\u3089lpm\u3059\u308b\u3001\u3068\u3044\u3046\u898f\u5b9a\u3092\u6e80\u305f\u3057\u3066\u3044\u308b\u3002\u5b9f\u884c\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true \">flb = 5e, fhb = 99, efb = f3<\/pre>\n<p>\u3053\u308c\u3092\u3001\u30c7\u30fc\u30bf\u30b7\u30fc\u30c8\u306e <strong>28.2 Fuse Bits<\/strong> \u3068\u306b\u3042\u308b\u30c7\u30d5\u30a9\u30eb\u30c8\u5024(\u51fa\u8377\u6642)\u3068\u7167\u3089\u3057\u5408\u308f\u305b\u3066 \u307f\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308b\u3002<\/p>\n<pre class=\"nums:false lang:default decode:true\">         bit7                                           bit0\r\n------------------------------------------------------------------\r\nLOWBYTE  CKDIV8 CKOUT SUT1  SUT2  CKSEL3 CKSEL2 CKSEL1  CKSEL0\r\nDefault   0     1      0     1     1      1       1       0   (0x5E)\r\nxd87      0     1      0     1     1      1       1       0   (0x5E)\r\n------------------------------------------------------------------\r\nHIGHBYTE OCDEN JTAGEN SPIEN WDTON EESAVE BOOTSZ1 BOOTSZ0 BOOTRST\r\nDefault   1     0      0     1     1      0       0       1   (0x99)\r\nxd87      1     0      0     1     1      0       0       1   (0x99)   \r\n------------------------------------------------------------------\r\nEXTBYTE  ---   ---    ---   ---   HWBE    BODLV2  BODLV1  BODLV0\r\nDefault   1     1      1     1     0      0       1       1   (0xF3)\r\nxd87      1     1      1     1     0      0       1       1   (0xF3)<\/pre>\n<p>\u3064\u307e\u308a\u3001\u30c7\u30fc\u30bf\u30b7\u30fc\u30c8\u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b<strong>\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u305d\u306e\u307e\u307e<\/strong>\u3068\u3044\u3046\u3053\u3068\u304c\u5206\u304b\u3063\u305f\u3002<\/p>\n<p>\u5b9f\u306f\u3061\u3083\u3093\u3068\u8aad\u3081\u3066\u3044\u306a\u3044\u306e\u304b\u3082\u3068\u601d\u3063\u3066\u3001SparkFun Pro Micro (+5V\/16MHz) \u3067\u3082\u540c\u3058\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3057\u3066\u307f\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true\">flb = ff, fhb = d8, efb = cb<\/pre>\n<p>xd87\u306e\u30d2\u30e5\u30fc\u30ba\u30d3\u30c3\u30c8\u3068\u306e\u304a\u3082\u306a\u76f8\u9055\u306f\u3001<strong>CLKDIV8\u304c1\u3001JTAGEN\u304c1\u3001BOOTRST\u304c0\u3001HWBE\u304c1<\/strong>\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u3002\u4e0d\u601d\u8b70\u306a\u306e\u306f\u3001\u62e1\u5f35\u30d0\u30a4\u30c8\u306e\u4e0a\u4f4d4\u30d3\u30c3\u30c8\u304c\u3059\u3079\u30661\u3067\u306f\u306a\u3044\u3068\u3053\u308d\u3060\u304c\u3001\u4ee5\u524d\u306bISP\u3092\u4f7f\u3063\u3066\u8aad\u3093\u3060\u3068\u304d\u3082\u305d\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u305f\u3002<\/p>\n<p>\u4e0a\u306b\u8f09\u305b\u305f\u30b9\u30ad\u30e3\u30f3\u7528\u306e\u3082\u306e\u3082\u305d\u3046\u3060\u304c\u3001\u5916\u90e8\u30ea\u30bb\u30c3\u30c8\u3092\u4f7f\u3063\u3066\u30b9\u30b1\u30c3\u30c1\u306e\u5165\u308c\u66ff\u3048\u3092\u884c\u3046\u3088\u3046\u306a\u3068\u304d\u306b\u306f\u3001Arduino IDE\u306e\u30b7\u30ea\u30a2\u30eb\u30e2\u30cb\u30bf\u3067\u306f\u306a\u304f\u3001\u3042\u3089\u304b\u3058\u3081Tera Term\u306e\u3088\u3046\u306a\u30bf\u30fc\u30df\u30ca\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u958b\u59cb\u3057\u3066\u304a\u304f\u65b9\u304c\u3088\u3055\u305d\u3046\u3067\u3042\u308b\u3002<br \/>\n\u5916\u90e8\u30ea\u30bb\u30c3\u30c8\u306b\u3088\u3063\u3066\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u30fc\u30e2\u30fc\u30c9\u3059\u308b\u3068\u3001Arduino\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u3088\u308bCDC\u63a5\u7d9a\u304c\u5207\u308c\u308b\u306e\u3067\u3001PC\u304b\u3089\u4eee\u60f3\u30b7\u30ea\u30a2\u30eb\u30dd\u30fc\u30c8\u304c\u306a\u304f\u306a\u308b\u3002\u305d\u3057\u3066\u3001\u30d5\u30e9\u30c3\u30b7\u30e5\u5185\u306b\u66f8\u304d\u8fbc\u3093\u3060Arduino\u30b9\u30b1\u30c3\u30c1\u306e\u5b9f\u884c\u3092\u958b\u59cb\u3059\u308b\u3068\u6d88\u3048\u3066\u3044\u305f\u30b7\u30ea\u30a2\u30eb\u30dd\u30fc\u30c8\u304c\u5fa9\u6d3b\u3059\u308b\u304c\u3001\u3053\u306e\u3088\u3046\u306a\u5bfe\u8c61\u30b7\u30ea\u30a2\u30eb\u30dd\u30fc\u30c8\u304c\u6d88\u3048\u305f\u308a\u898b\u3048\u305f\u308a\u3059\u308b\u3088\u3046\u306a\u6319\u52d5\u306b\u5bfe\u3057\u3066\u3001Arduino IDE\u306e\u30b7\u30ea\u30a2\u30eb\u30e2\u30cb\u30bf\u306f\u4e0d\u5b89\u5b9a\u306e\u3088\u3046\u3060\u3002<\/p>\n<h3>\u30ea\u30bb\u30c3\u30c8\u6642\u306e\u6319\u52d5 (<strong>BOOTRST\u304a\u3088\u3073HWBE)<\/strong><\/h3>\n<p>xd87\u3067\u306f\u3001<strong>HWBE<\/strong>\u30d3\u30c3\u30c8\u304c0\u3067\u3042\u308a\u3001<strong>\/HWB(PE2)\u30d4\u30f3\u304c\u30d7\u30eb\u30c0\u30a6\u30f3<\/strong>\u3055\u308c\u3066\u3044\u308b\u304b\u3089\u3001\/RESET\u30d4\u30f3\u3092\u4f7f\u3063\u305f\u5916\u90e8\u30ea\u30bb\u30c3\u30c8\u6642\u306b\u306f\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u30fc\u304b\u3089\u5b9f\u884c\u3092\u958b\u59cb\u3059\u308b\u3002\u305d\u3057\u3066\u3001<strong>BOOTRST<\/strong>\u30d3\u30c3\u30c8\u304c1\u306a\u306e\u3067\u3001\u30d1\u30ef\u30fc\u30aa\u30f3\u30ea\u30bb\u30c3\u30c8\u3084\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u30ea\u30bb\u30c3\u30c8\u6642\u306b\u306f\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u5148\u982d (0\u756a\u5730) \u306e\u30ea\u30bb\u30c3\u30c8\u30d9\u30af\u30bf\u306b\u66f8\u3044\u3066\u3042\u308b\u30a2\u30c9\u30ec\u30b9 (\u4e00\u822c\u7684\u306b\u306f\u30e6\u30fc\u30b6\u30fc\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u5148\u982d) \u306b\u30b8\u30e3\u30f3\u30d7\u3059\u308b\u3002<\/p>\n<p>Arduino Leonardo\u3084SparkFun Pro Micro\u3067\u306f\u3001<strong>HWBE<\/strong>\u304c1\u306a\u306e\u3067\u30ea\u30bb\u30c3\u30c8\u6642\u306e\u6319\u52d5\u306f<strong>BOOTRST<\/strong>\u3067\u6c7a\u307e\u308b\u3002BOOTRST\u306f0\u3060\u304b\u3089\u3001\u5916\u90e8\u30ea\u30bb\u30c3\u30c8\u3001\u30d1\u30ef\u30fc\u30aa\u30f3\u30ea\u30bb\u30c3\u30c8\u3001\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u30ea\u30bb\u30c3\u30c8\u3068\u3082\u306b\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u30fc\u306e\u5148\u982d\u304b\u3089\u5b9f\u884c\u304c\u958b\u59cb\u3059\u308b\u3002<\/p>\n<h3>JTAG\u306b\u3064\u3044\u3066<\/h3>\n<p>xd87 PCB (\u51fa\u8377\u6642\u306eATmega32u4)\u3067\u306f\u3001\u30cf\u30a4\u30d0\u30a4\u30c8\u30d2\u30e5\u30fc\u30ba\u306e<strong>JTAGEN<\/strong>\u30d3\u30c3\u30c8\u304c0\u306a\u306e\u3067\u3001\u30c7\u30d0\u30a4\u30b9\u30ec\u30d9\u30eb\u3067\u306e\u30c6\u30b9\u30c8\u3084\u30c7\u30d0\u30c3\u30b0\u306e\u305f\u3081\u306e<strong>JTAG\u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u308b<\/strong>\u3002JTAG\u304c\u6709\u52b9\u306e\u3068\u304d\u3001<strong>PF4\uff5ePF7<\/strong>\u306e4\u3064\u30d4\u30f3\u306fJTAG\u30c7\u30fc\u30bf\u306e\u5165\u51fa\u529b\u5c02\u7528\u306b\u306a\u308a\u3001I\/O\u30d4\u30f3\u3068\u3057\u3066\u306f\u5229\u7528\u3067\u304d\u306a\u3044\u3002xd87 PCB\u3067\u306f\u3053\u308c\u3089\u306e\u30dd\u30fc\u30c8\u30d4\u30f3\u3092\u4f7f\u3063\u3066\u30ad\u30fc\u30b9\u30a4\u30c3\u30c1\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u3092\u69cb\u6210\u3057\u3066\u3044\u308b\u304b\u3089\u3001JATG\u3092\u7121\u52b9\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<p>JTAG\u3092\u7121\u52b9\u306b\u3059\u308b\u305f\u3081\u306b\u306f\u3001<strong>MCUCR (MCU\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30ec\u30b8\u30b9\u30bf) \u306eJTD\u30d3\u30c3\u30c8<\/strong>\u3092\u30bb\u30c3\u30c8\u3059\u308b\u304b\u3001\u30d2\u30e5\u30fc\u30ba\u306eJTAG\u30d3\u30c3\u30c8\u30921\u306b\u3057\u3066\u3084\u308b\u3002xd87\u306e\u8abf\u67fb\u3084\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u3059\u308b\u306b\u3042\u305f\u3063\u3066\u3001\u30d2\u30e5\u30fc\u30ba\u306f\u5909\u66f4\u3057\u306a\u3044\u3053\u3068\u306b\u3057\u3066\u3044\u308b\u306e\u3067\u3001CLKPR\u3068\u540c\u69d8\u306b\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u884c\u3046\u3053\u3068\u306b\u3057\u305f\u3002<\/p>\n<p>\u30c7\u30fc\u30bf\u30b7\u30fc\u30c8\u306e\u00a0 <strong>26.5.1 MCU Control Register \u2013 MCUCR<\/strong> \u306b\u3088\u308c\u3070\u30014\u30b5\u30a4\u30af\u30eb\u4ee5\u5185\u306bJTD\u30d3\u30c3\u30c8\u306b\u30bb\u30c3\u30c8\u3057\u305f\u3044\u5024\u30922\u56de\u66f8\u304d\u8fbc\u3080\u3053\u3068\u3067\u5909\u66f4\u3067\u304d\u308b\u3068\u306e\u3053\u3068\u306a\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u306b\u3057\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true\">uint8_t v = MCUCR | _BV(JTD);\r\nMCUCR = v;\r\nMCUCR = v;<\/pre>\n<p>\u3053\u308c\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u306b\u843d\u3061\u308b\u306e\u3067\u3001\u610f\u56f3\u901a\u308a\u306b\u52d5\u304f\u3060\u308d\u3046\u3002<\/p>\n<pre class=\"lang:default decode:true \">...\r\nd26:\t85 b7       \tin\tr24, 0x35\t; 53\r\nd28:\t80 68       \tori\tr24, 0x80\t; 128\r\nd2a:\t85 bf       \tout\t0x35, r24\t; 53\r\nd2c:\t85 bf       \tout\t0x35, r24\t; 53\r\n...<\/pre>\n<h3>ISP\u306f\u4f7f\u308f\u305a\u306b\u6e08\u307e\u305b\u308b<\/h3>\n<p>CLKDIV8\u3068JTAGEN\u306b\u3064\u3044\u3066\u306f\u3001\u304a\u305d\u3089\u304fxd87\u7528\u306e\u3042\u3089\u3086\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u51e6\u7f6e\u304c\u5fc5\u8981\u306b\u306a\u308b\u304b\u3089\u30d2\u30e5\u30fc\u30ba\u3092\u66f8\u304d\u63db\u3048\u308c\u3070\u3044\u3044\u306e\u3060\u3051\u308c\u3069\u3001\u6570\u884c\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3059\u308c\u3070\u3044\u3044\u3053\u3068\u306a\u306e\u3067\u3001\u51fa\u8377\u6642\u8a2d\u5b9a\u306e\u307e\u307e\u8a71\u3092\u9032\u3081\u308b\u3053\u3068\u306b\u3057\u305f\u3002\u30d2\u30e5\u30fc\u30ba\u66f8\u304d\u63db\u3048\u306e\u305f\u3081\u306eISP\u88c5\u7f6e (\u88c5\u7f6e\u3068\u3044\u3063\u3066\u3082\u3001Arduino Pro Mini\u3068\u304b Pro Micro\u3068\u304b\u3060\u304c) \u3092\u4f7f\u308f\u305a\u306b\u6e08\u3080\u306a\u3089\u3070\u3001\u305d\u306e\u65b9\u304c\u4f55\u304b\u3092\u58ca\u3057\u3066\u3057\u307e\u3046\u6a5f\u4f1a\u3082\u6e1b\u308b\u3002<\/p>\n<h2>\u53c2\u8003<\/h2>\n<p>ATmega32u4 \u306e\u5404\u7a2e\u60c5\u5831\u306f\u3001 <a href=\"http:\/\/ww1.microchip.com\/downloads\/en\/devicedoc\/atmel-7766-8-bit-avr-atmega16u4-32u4_datasheet.pdf\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>ATmega16U4\/ATmega32U4 \u30c7\u30fc\u30bf\u30b7\u30fc\u30c8<\/strong> <\/a>\u3092\u53c2\u7167\u306e\u3053\u3068\u3002<\/p>\n<p>\u30ad\u30fc\u30b9\u30a4\u30c3\u30c1\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u306e\u69cb\u6210\u3084\u8aad\u307f\u53d6\u308a\u65b9\u6cd5\u306a\u3069\u306b\u3064\u3044\u3066\u306f\u3001\u30eb\u30cd\u30b5\u30b9\u793e\u306eKNOWLEDGEBASE (FAQ)\u306b\u3042\u308b\u3001<strong><a href=\"https:\/\/ja.na4.teamsupport.com\/knowledgeBase\/17796057\" target=\"_blank\" rel=\"noopener noreferrer\">\u30de\u30a4\u30b3\u30f3\u3067\u306e\u30ad\u30fc\u30fb\u30b9\u30a4\u30c3\u30c1\u5165\u529b<\/a>\u00a0<\/strong>\u304c\u53c2\u8003\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h1>\u304d\u3087\u3046\u306e\u307e\u3068\u3081<\/h1>\n<p>xd87 PCB\u306e\u30ad\u30fc\u30b9\u30a4\u30c3\u30c1\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u6a5f\u80fd\u306f\u3053\u308c\u3067\u307b\u307c\u5b8c\u6210\u3002\u30d0\u30a6\u30f3\u30b9\u9664\u53bb\u306e\u305f\u3081\u306e\u51e6\u7406\u3084\u30b9\u30a4\u30c3\u30c1\u756a\u53f7\u3092HID Usage ID (USB\u30ad\u30fc\u30dc\u30fc\u30c9\u3067\u306e\u30b9\u30ad\u30e3\u30f3\u30b3\u30fc\u30c9) \u306b\u7f6e\u304d\u63db\u3048\u3066\u51fa\u529b\u3059\u308b\u51e6\u7406\u306a\u3069\u3092\u3044\u308c\u308c\u3070\u3001USB\u30ad\u30fc\u30dc\u30fc\u30c9\u3068\u3057\u3066\u6a5f\u80fd\u3059\u308b\u3060\u308d\u3046\u3002<\/p>\n<p>\u305d\u308d\u305d\u308d\u52d5\u4f5c\u78ba\u8a8d\u306f\u7d42\u3048\u3066\u3082\u3044\u3044\u306e\u3060\u3051\u3069\u3001\u96c6\u3081\u305f\u90e8\u54c1\u3092\u773a\u3081\u3066\u308b\u3046\u3061\u306b\u6c17\u304c\u5909\u308f\u3063\u3066\u5225\u306e\u3082\u306e\u3092\u767a\u6ce8\u3057\u305f\u308a\u3001\u305d\u308c\u306e\u8f38\u9001\u304c1\u30f6\u6708\u4ee5\u4e0a\u6ede\u3063\u3066\u3057\u307e\u3063\u3066\u3001\u307e\u305f\u5225\u306e\u3082\u306e\u3092\u767a\u6ce8\u3057\u3066\u5f85\u3063\u3066\u3044\u305f\u308a\u3068\u6ce5\u6cbc\u5316\u3057\u3064\u3064\u3042\u308b\u4eca\u65e5\u3053\u306e\u3054\u308d\u3002\u3068\u308a\u3042\u3048\u305a\u3001\u30ad\u30fc\u306e\u914d\u7f6e\u3092\u6c7a\u3081\u3066PCB\u306b\u30b9\u30bf\u30d3\u30e9\u30a4\u30b6\u30fc\u3092\u7740\u3051\u308b\u3068\u3053\u308d\u304b\u3089\u7d44\u7acb\u3066\u3092\u59cb\u3081\u308b\u4e88\u5b9a\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981 xd87\u30ad\u30fc\u30dc\u30fc\u30c9\u30ad\u30c3\u30c8\u306e\u30ad\u30fc\u30b9\u30a4\u30c3\u30c1\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u306e\u56de\u8def\u3092\u78ba\u8a8d\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092Arduino IDE\u3067\u66f8\u3044\u3066\u7d44\u307f\u8fbc\u3093\u3067\u307f\u305f\u3002\u5168\u30b9\u30a4\u30c3\u30c1\u306e\u72b6\u614b\u3092\u5b9a\u671f\u7684\u306b\u30b9\u30ad\u30e3\u30f3\u3057\u3001\u30aa\u30f3\u306b\u306a\u3063\u305f\u30b9\u30a4\u30c3\u30c1\u3068\u30aa\u30d5\u306b\u306a\u3063\u305f\u30b9\u30a4\u30c3\u30c1\u306e\u756a\u53f7\u3092\u30b7 &hellip; <a href=\"https:\/\/okiraku-camera.tokyo\/blog\/?p=11179\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">xd87\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u30b9\u30ad\u30e3\u30f3<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,69],"tags":[65,143,100],"class_list":["post-11179","post","type-post","status-publish","format-standard","hentry","category-pc","category-programming","tag-arduino","tag-xd87","tag-100"],"_links":{"self":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/posts\/11179","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11179"}],"version-history":[{"count":0,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/posts\/11179\/revisions"}],"wp:attachment":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}