
{"id":15907,"date":"2023-09-07T17:36:59","date_gmt":"2023-09-07T08:36:59","guid":{"rendered":"https:\/\/okiraku-camera.tokyo\/blog\/?p=15907"},"modified":"2023-12-11T17:46:34","modified_gmt":"2023-12-11T08:46:34","slug":"ch552%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%9f%e3%83%86%e3%83%b3%e3%82%ad%e3%83%bc%e3%83%91%e3%83%83%e3%83%89%e3%81%ae%e8%a3%bd%e4%bd%9c-%e3%81%9d%e3%81%ae2","status":"publish","type":"post","link":"https:\/\/okiraku-camera.tokyo\/blog\/?p=15907","title":{"rendered":"CH552\u3092\u4f7f\u3063\u305f\u30c6\u30f3\u30ad\u30fc\u30d1\u30c3\u30c9\u306e\u88fd\u4f5c (\u305d\u306e2)"},"content":{"rendered":"<h1>\u6982\u8981<\/h1>\n<p>CH552 \u3092\u4f7f\u3063\u305f\u30c6\u30f3\u30ad\u30fc\u30d1\u30c3\u30c9\u3092\u4f5c\u3063\u305f\u8a71\u306e\u7d9a\u304d\u3067\u3001\u4eca\u56de\u306f\u3001<a href=\"https:\/\/github.com\/DeqingSun\/ch55xduino\" target=\"_blank\" rel=\"noopener\">CH55xDuino<\/a>\u3092\u4f7f\u3063\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3084\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u4e2d\u8eab\u306e\u8a71\u306a\u3069\u3002<\/p>\n<h2>CH55xDuino \u306b\u3064\u3044\u3066<\/h2>\n<p>CH55xDuino\u306f\u3001CH55x\u30b7\u30ea\u30fc\u30ba\u30de\u30a4\u30b3\u30f3\u5411\u3051\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u958b\u767a\u3092\u3001Arduino IDE\u3092\u4f7f\u3063\u3066Arduino\u306e\u3088\u3046\u306b\u884c\u3046\u305f\u3081\u306e\u30b3\u30a2\u30fb\u30d1\u30c3\u30b1\u30fc\u30b8 (\u30dc\u30fc\u30c9\u30b5\u30dd\u30fc\u30c8\u30d1\u30c3\u30b1\u30fc\u30b8) \u3067\u3001Arduino\u306eAPI\u306e\u591a\u304f\u3092\u30ab\u30d0\u30fc\u3059\u308bcore\u30e9\u30a4\u30d6\u30e9\u30ea\u3001MCS51\u7528\u306e\u30d3\u30eb\u30c9\u30c4\u30fc\u30eb (<a href=\"https:\/\/sdcc.sourceforge.net\/\" target=\"_blank\" rel=\"noopener\">SDCC<\/a>)\u3001SDCC \u3092Arduino \u958b\u767a\u74b0\u5883\u3067\u3046\u307e\u304f\u6271\u3046\u305f\u3081\u306e\u30c4\u30fc\u30eb\u3084\u30b9\u30af\u30ea\u30d7\u30c8\u3001USB\u30c7\u30d0\u30a4\u30b9\u3068\u3057\u3066\u4f7f\u3046\u3068\u304d\u306e\u30b5\u30f3\u30d7\u30eb (examples) \u306a\u3069\u304b\u3089\u69cb\u6210\u3055\u308c\u3066\u3044\u308b\u3002<\/p>\n<p><strong>CH55xDuino 0.0.18\u7248<\/strong>\u3092\u4f7f\u3063\u3066\u307f\u3066Arduino\u3068\u3061\u3087\u3063\u3068\u9055\u3046\u306a\u3068\u611f\u3058\u305f\u306e\u306f\u3001\u4eca\u306e\u3068\u3053\u308dC++\u3067\u306f\u306a\u3044\u3068\u3044\u3046\u70b9\u3060\u3051\u3060\u3063\u305f\u3002<\/p>\n<h3>C++\u3067\u306f\u306a\u3044<\/h3>\n<p>CH55xDuino\u3067\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3068\u3001\u4ed6\u306eAVR\u3084ARM\u30b3\u30a2\u306eArduino \u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3068\u306e\u5927\u304d\u306a\u9055\u3044\u306f\u3001<strong>C++\u3067\u306f\u306a\u304fC \u8a00\u8a9e\u3067\u8a18\u8ff0\u3059\u308b<\/strong>\u5fc5\u8981\u304c\u3042\u308b\u3053\u3068\u3002\u3057\u305f\u304c\u3063\u3066class\u3084\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u4f7f\u3048\u306a\u3044\u3002\u540c\u3058\u540d\u524d\u3067\u5f15\u6570\u306e\u578b\u3084\u500b\u6570\u304c\u7570\u306a\u308b\u95a2\u6570(\u30aa\u30fc\u30d0\u30fc\u30ed\u30fc\u30c9\u3055\u308c\u305f\u95a2\u6570)\u306e\u547c\u3073\u51fa\u3057\u3082\u3067\u304d\u306a\u3044\u3002<\/p>\n<p>\u305f\u3068\u3048\u3070\u3001Arduino\u3067\u3088\u304f\u4f7f\u3046 <em>Serial.print(value);<\/em> \u3068\u3044\u3063\u305f\u547c\u3073\u51fa\u3057\u306f\u3001\u307e\u305aSerial\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u306a\u3044\u3057\u3001\u5f53\u7136\u305d\u306e\u30e1\u30f3\u30d0\u95a2\u6570\u3082\u306a\u3044\u304b\u3089\u3001\u305f\u3068\u3048\u3070 <em>serial_print(value );<\/em> \u3068\u3044\u3063\u305f\u72ec\u7acb\u3057\u305f\u95a2\u6570API \u306b\u7f6e\u304d\u63db\u3048\u305f\u3082\u306e\u3092\u4f7f\u3046\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<p>\u307e\u305f\u3001\u3075\u3064\u3046\u306eArduino\u3067\u306f\u3001\u540c\u3058\u540d\u524d\u306e\u95a2\u6570\u306b\u4e0e\u3048\u308b\u5f15\u6570\u306e\u578b(\u3053\u306e\u4f8b\u3067\u306fvalue\u306e\u90e8\u5206)\u304c\u6587\u5b57\u5217\u3060\u3063\u305f\u308a\u6587\u5b57\u3060\u3063\u305f\u308a\u6570\u5024\u3060\u3063\u305f\u308a\u3057\u3066\u3082\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5074\u3067\u9069\u5207\u306b\u5bfe\u5fdc\u3057\u3066\u304f\u308c\u308b\u304c\u3001C\u8a00\u8a9e\u3067\u306f\u5f15\u6570\u306e\u578b\u3054\u3068\u306b\u7570\u306a\u308b\u95a2\u6570API\u304c\u5fc5\u8981\u306b\u306a\u308b\u3002\u305f\u3068\u3048\u3070 <em>serial_print_s (&#8220;string&#8221;)<\/em>\u3001 <em>serial_print_c (charater)<\/em>\u00a0\u3001<em> serial_print_n(number) <\/em>\u3068\u3044\u3063\u305f\u5177\u5408\u3002<\/p>\n<p>\u73fe\u5728\u306eCH55xDuino\u3067\u306f\u3001USB\u3092\u4f7f\u3046\u4eee\u60f3\u30b7\u30ea\u30a2\u30eb\u306e <em>USBSerial<\/em> \u3084\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u30b7\u30ea\u30a2\u30eb(<em>Serial0, Serial1<\/em>) \u3078\u306e\u51fa\u529b\u306b\u3064\u3044\u3066\u306f\u3001\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u578b\u306b\u5fdc\u3058\u305f\u66f8\u304d\u5206\u3051\u3092\u3057\u306a\u304f\u3066\u6e08\u3080\u3088\u3046\u306b\u3001generic selection \u3068\u3044\u3046\u6280\u6cd5\u3092\u5c0e\u5165\u3057\u3066\u3044\u308b\u3002\u3053\u308c\u306b\u3064\u3044\u3066\u306f\u3001\u30c6\u30f3\u30ad\u30fc\u30d1\u30c3\u30c9\u306e\u30ad\u30fc\u30b9\u30ad\u30e3\u30f3\u3092\u8a66\u3059\u306e\u306b\u66f8\u3044\u305f<strong><em> numkeyPad_test.ino<\/em> <\/strong>\u3067\u5229\u7528\u3057\u305f\u3002<\/p>\n<h3>\u5c0e\u5165<\/h3>\n<p>Arduino IDE\u3078\u306e\u5c0e\u5165\u306f\u4ed6\u306e\u30de\u30a4\u30b3\u30f3\u7528\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3068\u540c\u3058\u3067\u3001<strong>\u30d5\u30a1\u30a4\u30eb\uff0f\u74b0\u5883\u8a2d\u5b9a<\/strong> \u306b\u3042\u308b <strong>\u8ffd\u52a0\u306e\u30dc\u30fc\u30c9\u30de\u30cd\u30fc\u30b8\u30e3\u306eURL<\/strong> \u306b\u4ee5\u4e0b\u306eURL\u3092\u5165\u529b\u3059\u308b\u3002\u00a0 \u00a0<span class=\"lang:default decode:true crayon-inline\" style=\"font-family: 'courier new', courier, monospace;\">https:\/\/raw.githubusercontent.com\/DeqingSun\/ch55xduino\/ch55xduino\/package_ch55xduino_mcs51_index.json<\/span><br \/>\n\u305d\u3057\u3066\u3001<strong>\u30c4\u30fc\u30eb\uff0f\u30dc\u30fc\u30c9\u30de\u30cd\u30fc\u30b8\u30e3<\/strong>\u3067 <strong>Ch55xduino<\/strong> \u3092\u9078\u629e\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/p>\n<figure id=\"attachment_15815\" aria-describedby=\"caption-attachment-15815\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2023\/08\/0d40a5e4a645fc6b96e767d64ac0878e.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-15815 size-large\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2023\/08\/0d40a5e4a645fc6b96e767d64ac0878e-552x310.png\" alt=\"\" width=\"552\" height=\"310\" \/><\/a><figcaption id=\"caption-attachment-15815\" class=\"wp-caption-text\">ch55xDuino<\/figcaption><\/figure>\n<p>\u4e0a\u56f3\u306e\u3088\u3046\u306b\u3001\u30dc\u30fc\u30c9\u30de\u30cd\u30fc\u30b8\u30e3\u306e\u691c\u7d22\u30d5\u30a3\u30fc\u30eb\u30c9\u306b ch \u3068\u5165\u529b\u3057\u3066\u3084\u308b\u3068\u3059\u3050\u306b\u898b\u3064\u304b\u308b\u3002<\/p>\n<h3>\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u9078\u629e<\/h3>\n<figure id=\"attachment_15816\" aria-describedby=\"caption-attachment-15816\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2023\/08\/0d40a5e4a645fc6b96e767d64ac0878e-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"waku wp-image-15816 size-large\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2023\/08\/0d40a5e4a645fc6b96e767d64ac0878e-1-552x372.png\" alt=\"\" width=\"552\" height=\"372\" \/><\/a><figcaption id=\"caption-attachment-15816\" class=\"wp-caption-text\">ch55xDuino<\/figcaption><\/figure>\n<p>\u4eca\u56de\u306e\u30c6\u30f3\u30ad\u30fc\u30d1\u30c3\u30c9\u306fCH552G\u3092\u4f7f\u3063\u3066\u3044\u308b\u306e\u3067\u3001<strong>\u30c4\u30fc\u30eb\uff0f\u30dc\u30fc\u30c9<\/strong> \u304b\u3089 <strong>CH55x Boards<\/strong> \u3092\u9078\u629e\u3057\u3001\u66f4\u306b<strong>CH552 Board<\/strong> \u3092\u9078\u629e\u3059\u308b\u3002\u3053\u306e\u6642\u70b9\u3067\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u30de\u30a4\u30b3\u30f3\u306f\u3001CH552, CH551, CH559, CH554 (\u5b9f\u9a13\u6bb5\u968e) \u306e4\u7a2e\u985e\u3060\u3063\u305f\u3002<\/p>\n<h3>\u30d3\u30eb\u30c9\u30aa\u30d7\u30b7\u30e7\u30f3<\/h3>\n<p>\u30c4\u30fc\u30eb\u30e1\u30cb\u30e5\u30fc\u306e\u30d3\u30eb\u30c9\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u306f\u4ee5\u4e0b\u306e\u5404\u9805\u76ee\u304c\u3042\u308b\u3002<\/p>\n<figure id=\"attachment_15817\" aria-describedby=\"caption-attachment-15817\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2023\/08\/0d40a5e4a645fc6b96e767d64ac0878e-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"waku wp-image-15817 size-large\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2023\/08\/0d40a5e4a645fc6b96e767d64ac0878e-2-552x462.png\" alt=\"\" width=\"552\" height=\"462\" \/><\/a><figcaption id=\"caption-attachment-15817\" class=\"wp-caption-text\">ch55xDuino<\/figcaption><\/figure>\n<h4>USB<strong> Settings:<\/strong><\/h4>\n<p style=\"padding-left: 40px;\">\u30b9\u30b1\u30c3\u30c1\u304b\u3089USB\u7d4c\u7531\u3067\u6587\u5b57\u3084\u6570\u5b57\u3092\u30b7\u30ea\u30a2\u30eb\u30e2\u30cb\u30bf\u306b\u51fa\u529b\u3059\u308b\u305f\u3081\u306b\u4eee\u60f3\u30b7\u30ea\u30a2\u30eb\u3092\u4f7f\u3044\u305f\u3044\u3068\u304d\u306f\u00a0 <strong>Default CDC\u00a0<\/strong> \u3092\u6307\u5b9a\u3059\u308b\u3002&#8221;USBSerial_&#8221; \u3067\u59cb\u307e\u308b\u4eee\u60f3\u30b7\u30ea\u30a2\u30eb\u7528API\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u9078\u629e\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b\u3002<strong>Default CDC<\/strong> \u3092\u6307\u5b9a\u3057\u305f\u5834\u5408\u3001\u30d3\u30eb\u30c9\u306b\u969b\u3057\u3066 <strong>USER_USB_RAM \u30de\u30af\u30ed\u304c\u5b9a\u7fa9\u3055\u308c\u306a\u3044<\/strong>\u3002<\/p>\n<p style=\"padding-left: 40px;\">USB\u3092\u305d\u306e\u4ed6\u306e\u7528\u9014(HID\u306a\u3069)\u3067\u4f7f\u3046\u3068\u304d\u306f\u3001USB\u306eEP\u30d0\u30c3\u30d5\u30a1\u7528\u306a\u3069\u306e\u305f\u3081\u306b\u3042\u3089\u304b\u3058\u3081 xRAM\u306b\u78ba\u4fdd\u3057\u3066\u304a\u304f\u30e1\u30e2\u30ea\u30b5\u30a4\u30ba\u3092\u6307\u5b9a\u3059\u308b\u305f\u3081 <strong>USER CODE w\/ 148B USB ram<\/strong> \u306a\u3069\u3092\u9078\u629e\u3059\u308b\u3002&#8221;<strong>USER CODE w\/<\/strong>&#8221; \u3067\u59cb\u307e\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u9078\u629e\u3057\u3066\u3044\u308b\u3068\u304d\u306f\u3001\u30d3\u30eb\u30c9\u6642\u306b <strong>USER_USB_RAM<\/strong> \u30de\u30af\u30ed\u304c\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u542b\u307e\u308c\u3066\u3044\u308b\u30d0\u30a4\u30c8\u6570\u3092\u4fdd\u6301\u3059\u308b (<strong>USER CODE w\/ 148B USB ram<\/strong>\u306a\u3089\u3070\u3001sdcc\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306b<em> -DUSER_USB_RAM=148<\/em> \u304c\u8ffd\u52a0\u3055\u308c\u308b )\u3002<\/p>\n<p style=\"padding-left: 40px;\">xRAM\u5185\u306b\u914d\u7f6e\u3055\u308c\u308b\u30b9\u30b1\u30c3\u30c1\u5185\u306e\u30c7\u30fc\u30bf\u306f\u6307\u5b9a\u30d0\u30a4\u30c8\u6570\u306e\u5f8c\u308d\u304b\u3089\u914d\u7f6e\u3055\u308c\u3001\u305f\u3068\u3048\u3070\u3001 w\/ 148B \u306a\u3089\u3070 0x93 \u756a\u5730\u4ee5\u964d\u306b\u30b9\u30b1\u30c3\u30c1\u5185\u306e\u30c7\u30fc\u30bf\u304c\u914d\u7f6e\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3002<\/p>\n<h4>Upload<strong> methd:<\/strong><\/h4>\n<p style=\"padding-left: 40px;\">\u30b9\u30b1\u30c3\u30c1\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u65b9\u6cd5\u3068\u3057\u3066\u3001USB \u307e\u305f\u306f Serial \u3092\u9078\u629e\u3059\u308b\u3002CDC\u306b\u3088\u308b\u4eee\u60f3\u30b7\u30ea\u30a2\u30eb\u7d4c\u7531\u3067\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u5834\u5408\u3001Arduino IDE\u304b\u3089\u306f\u30b7\u30ea\u30a2\u30eb\u30dd\u30fc\u30c8\u306b\u898b\u3048\u3066\u3044\u3066\u3082USB\u3092\u6307\u5b9a\u3059\u308b\u3002\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u30b7\u30ea\u30a2\u30eb\u7d4c\u7531\u3067\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u3068\u304d\u306b\u306f Serial \u3092\u9078\u629e\u3059\u308b(\u306e\u3060\u3068\u601d\u3046)\u3002<\/p>\n<h4>Clock<strong> Source:<\/strong><\/h4>\n<p style=\"padding-left: 40px;\">\u5185\u8535\u30af\u30ed\u30c3\u30af\u307e\u305f\u306f\u5916\u90e8\u30af\u30ed\u30c3\u30af\u3001\u304a\u3088\u3073\u3001\u304a\u306e\u304a\u306e\u3067\u306e\u52d5\u4f5c\u5468\u6ce2\u6570\u306e\u6307\u5b9a\u3002CH552Board\u3092\u9078\u629e\u3057\u3066\u5185\u8535\u30af\u30ed\u30c3\u30af\u3092\u4f7f\u3046\u5834\u5408\u300124MHz, 16MHz, 12MHz\u304c\u6307\u5b9a\u3067\u304d\u308b\u3002<\/p>\n<p style=\"padding-left: 40px;\">AVR\u306eArduino\u306e\u3068\u304d\u3068\u540c\u3058\u304f\u3001\u9078\u629e\u3057\u305f\u30af\u30ed\u30c3\u30af\u5468\u6ce2\u6570\u306f sdcc\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306b <em>-DF_CPU=12000000L<\/em> \u306e\u3088\u3046\u306b\u4e0e\u3048\u3089\u308c\u308b\u3002<\/p>\n<h3>\u4eca\u56de\u306e\u30d3\u30eb\u30c9\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u6ce8\u610f\u70b9\u306a\u3069<\/h3>\n<p>USBSerial\u306b\u30b9\u30ad\u30e3\u30f3\u7d50\u679c\u3092\u8868\u793a\u3059\u308b\u30c6\u30b9\u30c8\u7528\u30b9\u30b1\u30c3\u30c1 (numkeyPad_test.ino)\u3067\u306f <strong>Default CDC<\/strong>\u3092\u3001HID\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u4f5c\u308b\u305f\u3081\u306e ch552_numkeyPad.ino\u3067\u306f <strong>USER CODE w\/148B<\/strong> \u3092\u6307\u5b9a\u3057\u3066\u30d3\u30eb\u30c9\u3057\u305f\u3002<\/p>\n<p>\u30af\u30ed\u30c3\u30af\u306b\u3064\u3044\u3066\u306f\u3001\u52d5\u4f5c\u5468\u6ce2\u6570\u304c\u4f4e\u3044\u307b\u3069\u6d88\u8cbb\u96fb\u6d41\u306f\u6e1b\u308b\u304c\u3055\u307b\u3069\u5287\u7684\u306a\u52b9\u679c\u306f\u306a\u304b\u3063\u305f\u3002\u540c\u3058\u30b9\u30b1\u30c3\u30c1\u3067\u300124MHz\u6642\u306b16mA\u3060\u3063\u305f\u306e\u304c12MHz\u306e\u3068\u304d13mA\u3068\u304b\u3002\u5916\u90e8LDO\u3092\u4f7f\u3063\u3066CH552\u306b+3.3V\u3092\u4f9b\u7d66\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304f\u3068\u8a71\u304c\u9055\u3046\u306e\u304b\u3082\u3002<\/p>\n<p><strong>Default CDC<\/strong> \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u305f\u30b9\u30b1\u30c3\u30c1\u304c\u52d5\u3044\u3066\u3044\u308b\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u306b\u3064\u3044\u3066\u306f\u3001\u3075\u3064\u3046\u306eArduino\u306e\u3088\u3046\u306bArduino IDE\u3084VSCode\u304b\u3089\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u64cd\u4f5c\u3092\u884c\u3046\u3060\u3051\u3067\u3001\u7279\u306b\u30de\u30a4\u30b3\u30f3\u5074\u3092\u89e6\u308b\u3053\u3068\u306a\u304f\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f4\u65b0\u3067\u304d\u308b\u3002<\/p>\n<p>\u305d\u308c\u306b\u5bfe\u3057\u3066\u3001<strong>USER CODE w\/xxxx<\/strong> \u3092\u6307\u5b9a\u3057\u305f\u30b9\u30b1\u30c3\u30c1\u304c\u52d5\u3044\u3066\u3044\u308b\u5834\u5408\u3001\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u306e\u76f4\u524d\u306b\u30de\u30a4\u30b3\u30f3\u5074\u3092\u64cd\u4f5c (USB DP\u3092+3.3V\u3067\u30d7\u30eb\u30a2\u30c3\u30d7\u3057\u3066\u96fb\u6e90\u6295\u5165) \u3059\u308b\u3053\u3068\u3067\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u30fc\u30e2\u30fc\u30c9\u3067\u7acb\u3061\u4e0a\u3052\u308b\u3066\u3084\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002\u6700\u521d\u306e\u3046\u3061\u306f\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u30fc\u30e2\u30fc\u30c9\u306b\u5165\u308c\u308b\u30bf\u30a4\u30df\u30f3\u30b0\u304c\u5206\u304b\u3089\u305a\u3001\u3061\u3087\u3063\u3068\u624b\u9593\u53d6\u3063\u305f\u3002<\/p>\n<h3>\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u30fc\u30e2\u30fc\u30c9\u306b\u5165\u308c\u308b\u64cd\u4f5c<\/h3>\n<p>\u4eca\u56de\u4f5c\u3063\u305fPCB\u3067\u306f\u3001\u30ad\u30fc\u30d1\u30c3\u30c9\u306e\u6700\u5317\u90e8\u306bBOOT\u7528\u3084RESET\u7528\u306e\u30b9\u30eb\u30fc\u30db\u30fc\u30eb\u3092\u7528\u610f\u3057\u3001\u30d4\u30f3\u30bb\u30c3\u30c8\u3067\u30b7\u30e7\u30fc\u30c8\u3055\u305b\u3066\u4f7f\u3046\u3088\u3046\u306b\u3057\u305f\u3002<\/p>\n<figure id=\"attachment_15937\" aria-describedby=\"caption-attachment-15937\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2023\/09\/868437b24187bc2b1b0b96e8a71fd624.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-15937\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2023\/09\/868437b24187bc2b1b0b96e8a71fd624-552x414.jpg\" alt=\"\" width=\"552\" height=\"414\" \/><\/a><figcaption id=\"caption-attachment-15937\" class=\"wp-caption-text\">ch552_numkeyPad. Enter boot-loader mode.<\/figcaption><\/figure>\n<p>\u307e\u305a\u3001\u30c6\u30f3\u30ad\u30fc\u30d1\u30c3\u30c9\u306eUSB\u30b1\u30fc\u30d6\u30eb\u3092\u30db\u30b9\u30c8\u5074\u307e\u305f\u306f\u30c6\u30f3\u30ad\u30fc\u5074\u304b\u3089\u629c\u3044\u3066\u304a\u304f\u3002\u305d\u3057\u3066\u3053\u306e\u5199\u771f\u306e\u3088\u3046\u306bBOOT\u3092\u30b7\u30e7\u30fc\u30c8\u3055\u305b\u308b\u3068\u3001\u56de\u8def\u4e0aUSB DP (UDP)\u306f10k\u03a9\u306e\u62b5\u6297\u3092\u4ecb\u3057\u3066+3.3V\u306b\u63a5\u7d9a\u3055\u308c\u308b\u3002<\/p>\n<p>\u3053\u306e\u72b6\u614b\u3067USB\u30b1\u30fc\u30d6\u30eb\u3092\u63a5\u7d9a\u3057\u3066\u96fb\u6e90\u3092\u4e0e\u3048\u308b\u3068\u3001CH552\u306f\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u30fc\u30e2\u30fc\u30c9\u3067\u958b\u59cb\u3059\u308b\u3002\u305d\u306e\u307e\u307e\u4f55\u3082\u3057\u306a\u3044\u3067\u3044\u308b\u3068\u3001<strong>\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u30fc\u30e2\u30fc\u30c9\u306f5,6\u79d2\u9593\u3067\u7d42\u4e86<\/strong>\u3057\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u66f8\u3044\u305f(\u30d7\u30ed\u30b0\u30e9\u30e0ROM\u5185\u306e) \u30d7\u30ed\u30b0\u30e9\u30e0\u3042\u308b\u3044\u306f\u30b9\u30b1\u30c3\u30c1\u304c\u958b\u59cb\u3059\u308b\u3002<\/p>\n<p>Arduino IDE\u304b\u3089\u30b9\u30b1\u30c3\u30c1\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u969b\u306b\u306f\u3001USB\u30b1\u30fc\u30d6\u30eb\u3092\u629c\u304d\u3001\u30d4\u30f3\u30bb\u30c3\u30c8\u306a\u3069\u3067BOOT\u30b9\u30eb\u30fc\u30db\u30fc\u30eb\u3092\u30b7\u30e7\u30fc\u30c8\u3055\u305b\u3001\u3042\u3068\u6570\u79d2\u3067 vnproch55x \u306b\u3088\u308bHEX\u30d5\u30a1\u30a4\u30eb\u306e\u8ee2\u9001\u304c\u59cb\u307e\u308b\u30bf\u30a4\u30df\u30f3\u30b0\u3092\u898b\u8a08\u3089\u3063\u3066USB\u30b1\u30fc\u30d6\u30eb\u3092\u63a5\u7d9a\u3057\u3066\u96fb\u6e90\u3092\u4e0e\u3048\u308b (\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u30fc\u30e2\u30fc\u30c9\u3092\u958b\u59cb\u3059\u308b)\u3002\u3046\u307e\u304f\u8ee2\u9001\u3067\u304d\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u306f\u3001\u30b9\u30c6\u30fc\u30bf\u30b9\u753b\u9762\u3067\u78ba\u8a8d\u3059\u308b\u3002<\/p>\n<p>BOOT\u306e\u30b9\u30eb\u30fc\u30db\u30fc\u30eb\u3092\u30b7\u30e7\u30fc\u30c8\u3055\u305b\u305f\u307e\u307e\u3067\u3082\u3001\u5f31\u3044\u30d7\u30eb\u30a2\u30c3\u30d7\u306e\u305f\u3081\u304b\u30b9\u30b1\u30c3\u30c1\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u306f\u554f\u984c\u306a\u304f\u9032\u884c\u3059\u308b\u3002<\/p>\n<h4>\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u30fc\u30e2\u30fc\u30c9\u3092\u8996\u899a\u7684\u306b\u78ba\u8a8d<\/h4>\n<p>CH552\u306eGPIO\u30d4\u30f3\u306f\u30ea\u30bb\u30c3\u30c8\u306b\u3088\u3063\u3066\u5185\u90e8\u3067\u30d7\u30eb\u30a2\u30c3\u30d7\u3055\u308c\u3001\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u30fc\u30e2\u30fc\u30c9\u306e\u3068\u304d\u3082\u30d7\u30eb\u30a2\u30c3\u30d7\u306f\u7dad\u6301\u3055\u308c\u308b\u3088\u3046\u3067\u3042\u308b\u3002\u4eca\u56de\u306e\u56de\u8def\u3067\u306f\u3001P1.1\u30d4\u30f3\u306bNumLock\u30a4\u30f3\u30b8\u30b1\u30fc\u30bf\u30fc\u7528\u306eLED\u3092\u63a5\u7d9a\u3057\u3066\u3044\u308b\u306e\u3067\u3001BOOT\u3092\u30b7\u30e7\u30fc\u30c8\u3055\u305b\u305f\u72b6\u614b\u3067\u96fb\u6e90\u3092\u4e0e\u3048\u308b\u3068LED\u304c\u70b9\u706f\u3057\u3001\u6570\u79d2\u5f8c\u306b \u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u30fc\u30e2\u30fc\u30c9\u304c\u7d42\u4e86\u3057\u3066\u30b9\u30b1\u30c3\u30c1\u304c\u8d70\u308a\u51fa\u3059\u3068setup()\u3067\u306e\u51e6\u7406\u3067LED\u304c\u6d88\u706f\u3059\u308b\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u30fc\u30e2\u30fc\u30c9\u306e\u7d42\u4e86\u3092\u8996\u899a\u7684\u306b\u3082\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3066\u3044\u308b\u3002LED\u306f\u30ed\u30b8\u30c3\u30afHIGH\u3067\u70b9\u706f\u3067\u3042\u308b\u3053\u3068(\u56de\u8def\u306b\u3064\u3044\u3066\u306f<a href=\"https:\/\/okiraku-camera.tokyo\/blog\/?p=15858\" target=\"_blank\" rel=\"noopener\">\u524d\u56de\u306e\u6295\u7a3f<\/a>\u3092\u53c2\u7167)\u3002<\/p>\n<figure id=\"attachment_15961\" aria-describedby=\"caption-attachment-15961\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2023\/09\/2d32f61796c36b3c55532be0117ee79a.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-15961\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2023\/09\/2d32f61796c36b3c55532be0117ee79a-552x458.jpg\" alt=\"\" width=\"552\" height=\"458\" \/><\/a><figcaption id=\"caption-attachment-15961\" class=\"wp-caption-text\">ch552_numkeyPad. Backside<\/figcaption><\/figure>\n<p>\u3044\u3061\u304a\u3046\u3001\u88cf\u9762\u306b\u3082BOOT\u30b9\u30a4\u30c3\u30c1\u3092\u5b9f\u88c5\u3067\u304d\u308b\u3088\u3046\u306a\u30d1\u30bf\u30fc\u30f3\u3092\u7528\u610f\u3057\u305f\u306e\u3060\u3051\u3069\u3001\u30d4\u30f3\u30bb\u30c3\u30c8\u3067\u3064\u307e\u3093\u3067\u3084\u308b\u65b9\u304c\u64cd\u4f5c\u3057\u3084\u3059\u3044\u306e\u3067\u30cf\u30f3\u30c0\u4ed8\u3051\u3059\u308b\u306e\u3092\u3084\u3081\u3066\u3057\u307e\u3063\u305f\u3002<\/p>\n<h2>\u30ad\u30fc\u30b9\u30ad\u30e3\u30f3\u3057\u3066\u30b3\u30fc\u30c9\u3092\u51fa\u529b\u3059\u308b\u30b9\u30b1\u30c3\u30c1 numkeyPad_test.ino<\/h2>\n<p>\u30c6\u30f3\u30ad\u30fc\u30d1\u30c3\u30c9\u306e\u57fa\u677f\u306e\u30c6\u30b9\u30c8\u306e\u305f\u3081\u3001\u30aa\u30f3\u30aa\u30d5\u3055\u308c\u305f\u30b9\u30a4\u30c3\u30c1\u306e\u30b3\u30fc\u30c9\u3092\u4eee\u60f3\u30b7\u30ea\u30a2\u30eb\u306b\u51fa\u529b\u3059\u308b\u3001\u3068\u3044\u3046\u30b9\u30b1\u30c3\u30c1\u3092\u4f5c\u3063\u305f\u3002<\/p>\n<p>\u3053\u306e\u30b9\u30b1\u30c3\u30c1\u3067\u306f\u300110msec\u7a0b\u5ea6\u306e\u983b\u5ea6\u3067\u30b9\u30a4\u30c3\u30c1\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u3001\u524d\u56de\u72b6\u614b\u3068\u5909\u5316\u304c\u3042\u3063\u305f\u30b9\u30a4\u30c3\u30c1\u3092\u691c\u51fa\u3059\u308b\u3002\u305d\u3057\u3066\u3001\u305d\u306e\u30b9\u30a4\u30c3\u30c1\u306b\u76f8\u5f53\u3059\u308bHID Usage ID\u3092 <em>USBSerial_print()<\/em> \u3092\u4f7f\u3063\u3066\u30b7\u30ea\u30a2\u30eb\u30e2\u30cb\u30bf\u306b\u51fa\u529b\u3059\u308b\u3002\u30b9\u30b1\u30c3\u30c1\u5168\u4f53\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/github.com\/okiraku-camera\/ch552_numkeyPad\/tree\/main\/sketch\/numkeyPad_test\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/okiraku-camera\/ch552_numkeyPad\/tree\/main\/sketch\/numkeyPad_test<\/a> \u3092\u53c2\u7167\u306e\u3053\u3068\u3002<\/p>\n<h3>GPIO\u5165\u51fa\u529b\u306b\u3064\u3044\u3066<\/h3>\n<p><em>pinMode()\u3001digitalWrite()\u3001 digitalRead()<\/em> \u3068\u3044\u3063\u305fArduino\u3068\u540c\u3058API\u3092\u4f7f\u3063\u3066I\/O\u30d4\u30f3\u3092\u6307\u5b9a\u3059\u308b\u3068\u304d\u306f\u3001\u30d4\u30f3\u756a\u53f7\u3068\u3057\u3066\u305f\u3068\u3048\u3070P1.1\u3092\u5bfe\u8c61\u306b\u3059\u308b\u3068\u304d\u306f11\u3092\u3001P3.2\u3092\u5bfe\u8c61\u3068\u3059\u308b\u3068\u304d\u306f32\u3092\u6307\u5b9a\u3059\u308b\u3002\u305f\u3068\u3048\u3070\u3001<em>digitalWrite(11,\u00a0 HIGH);<\/em> \u3068\u66f8\u3051\u3070\u3001\u305d\u308c\u306f P1\u30dd\u30fc\u30c8\u306e\u30d3\u30c3\u30c81\u3092\u30bb\u30c3\u30c8\u3059\u308b\u3053\u3068\u306b\u306a\u308b\u3002<\/p>\n<p>\u307e\u305f\u306f\u3001CH552\u306e\u5185\u90e8\u30ec\u30b8\u30b9\u30bf\u3092\u76f4\u63a5\u6307\u5b9a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u3066\u3001P1\u30dd\u30fc\u30c8\u306e\u30d3\u30c3\u30c81\u3092\u30bb\u30c3\u30c8\u3059\u308b\u306a\u3089\u3070 <em>P1 |= 2;\u00a0 \u30af\u30ea\u30a2\u3059\u308b\u306a\u3089\u3070 P1 &amp;= 0xfd; <\/em>\u00a0\u3068\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n<p>\u4e8c\u756a\u76ee\u306e\u30dd\u30fc\u30c8\u76f4\u63a5\u6307\u5b9a\u306e\u65b9\u304c\u30b3\u30fc\u30c9\u306f\u5c0f\u3055\u304f\u306a\u308a\u3001\u5b9f\u884c\u901f\u5ea6\u3082\u3042\u304c\u308b\u3068\u306f\u601d\u3046\u304c\u3001\u3055\u307b\u3069\u6025\u3050\u5fc5\u8981\u306e\u306a\u3044\u5834\u9762\u3067\u306f\u5206\u304b\u308a\u3084\u3059\u3055\u512a\u5148\u3067\u4f7f\u3044\u5206\u3051\u3066\u3044\u308b\u3002<\/p>\n<h3>\u30b9\u30a4\u30c3\u30c1\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u306e\u30b9\u30ad\u30e3\u30f3<\/h3>\n<p>\u30c6\u30f3\u30ad\u30fc\u30d1\u30c3\u30c8\u306e\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\u3002<\/p>\n<figure id=\"attachment_15945\" aria-describedby=\"caption-attachment-15945\" style=\"width: 471px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2023\/09\/66c19942ab4ba346fdb64ccc04cde373-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"waku wp-image-15945 size-full\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2023\/09\/66c19942ab4ba346fdb64ccc04cde373-1.png\" alt=\"\" width=\"471\" height=\"469\" \/><\/a><figcaption id=\"caption-attachment-15945\" class=\"wp-caption-text\">ch552_numkeyPad switch matrix (SW12, 18, 20\u306fPCB\u306b\u5b9f\u88c5\u7121\u3057)<\/figcaption><\/figure>\n<p>\u4e0a\u56f3\u3067\u306f\u7701\u7565\u3057\u305f\u304c\u3001COL1\uff5eCOL4\u306fCH552G\u306e P1.4, P1.5,P1.6,P1.7 \u306b\u63a5\u7d9a\u3057\u3001ROW1\uff5eROW5\u306f\u3001P3.0, P3.1,P3.2,P3.3,P3.4\u306b\u63a5\u7d9a\u3057\u3066\u3044\u308b\u3002\u3053\u306e\u30b9\u30b1\u30c3\u30c1\u3067\u306f\u3001\u56de\u8def\u306b\u3042\u308f\u305b\u3066\u30b9\u30a4\u30c3\u30c1\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u3092\u4ee5\u4e0b\u306e\u914d\u5217\u3067\u8868\u73fe\u3057\u3066\u3044\u308b\u3002<\/p>\n<pre class=\"lang:default decode:true\">const uint8_t cols[] = {14, 15, 16, 17};\r\nconst uint8_t rows[] = {30, 31, 32, 33, 34};\r\nconst uint8_t row_masks[] = {1, 2, 4, 8, 0x10};<\/pre>\n<p><em>cols[]<\/em> \u306f\u30b9\u30a4\u30c3\u30c1\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u306e1\u5217\u76ee\uff5e4\u5217\u76ee\u306b\u63a5\u7d9a\u3057\u3066\u3044\u308b\u30dd\u30fc\u30c8\u30d4\u30f3\u306e\u756a\u53f7\u3092\u4fdd\u6301\u3057\u3001<em>rows[]<\/em> \u306b\u306f1\u884c\u76ee\uff5e5\u884c\u76ee\u306e\u30dd\u30fc\u30c8\u30d4\u30f3\u756a\u53f7\u3092\u4fdd\u6301\u3057\u3066\u3044\u308b\u3002<em>row_masks[]<\/em> \u306f\u3001\u30b9\u30ad\u30e3\u30f3\u306e\u9ad8\u901f\u5316\u3092\u610f\u8b58\u3057\u3066\u30dd\u30fc\u30c8\u76f4\u63a5\u6307\u5b9a\u3059\u308b\u305f\u3081\u3001P3\u30dd\u30fc\u30c8\u306e\u5404\u30d3\u30c3\u30c8\u306e\u72b6\u614b\u3092\u64cd\u4f5c\u3059\u308b\u305f\u3081\u306e\u30c7\u30fc\u30bf\u306b\u306a\u3063\u3066\u3044\u308b\u3002<\/p>\n<h4>\u6e96\u5099<\/h4>\n<p>\u4eca\u56de\u306e\u30b9\u30a4\u30c3\u30c1\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u56de\u8def\u306f\u3001\u30b9\u30a4\u30c3\u30c1\u304c\u30aa\u30f3\u306b\u306a\u3063\u305f\u3068\u304d\u5217\u5074(COL)\u306e\u30dd\u30fc\u30c8\u30d4\u30f3\u304b\u3089\u884c\u5074(ROW)\u306e\u30dd\u30fc\u30c8\u30d4\u30f3\u306b\u96fb\u6d41\u304c\u6d41\u308c\u308b\u3053\u3068\u3092\u60f3\u5b9a\u3057\u3066\u304a\u308a\u3001<em>cols[]<\/em> \u5185\u306e\u5404\u30dd\u30fc\u30c8\u30d4\u30f3\u3092 <em>INPUT_PULLUP<\/em> \u3068\u3057\u3001<em>rows[]<\/em> \u306e\u5404\u30dd\u30fc\u30c8\u30d4\u30f3\u306f <em>OUTPUT<\/em> \u3068\u3057\u3066\u521d\u671f\u5024 HIGH\u3092\u51fa\u529b\u3059\u308b\u3002<\/p>\n<p>setup() \u306b\u304a\u3044\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30dd\u30fc\u30c8\u30d4\u30f3\u3092\u521d\u671f\u5316\u3057\u3066\u3044\u308b\u3002<\/p>\n<pre class=\"lang:default decode:true\">for(uint8_t i = 0; i &lt; sizeof(cols); i++)\r\n\tpinMode(cols[i], INPUT_PULLUP);\r\nfor(uint8_t i = 0; i &lt; sizeof(rows); i++) {\r\n\tpinMode(rows[i], OUTPUT);\r\n\tdigitalWrite(rows[i], 1);\r\n}\r\n<\/pre>\n<h4>\u30b9\u30ad\u30e3\u30f3\u306e\u5b9f\u884c<\/h4>\n<p>\u30b9\u30a4\u30c3\u30c1\u72b6\u614b\u306e\u8aad\u307f\u53d6\u308a\u306f <em>cols[]<\/em> \u5185\u306e\u5404\u30dd\u30fc\u30c8\u30d4\u30f3\u3067\u884c\u3046\u3002\u30b9\u30a4\u30c3\u30c1\u304c\u62bc\u3055\u308c\u3066\u3044\u306a\u3044\u72b6\u614b\u3067\u8aad\u3080\u3068\u3001<em>INPUT_PULLUP<\/em> \u306a\u306e\u3067\u7d50\u679c\u306f\u5e38\u306bHIGH\u306b\u306a\u308b\u3057\u3001\u30b9\u30a4\u30c3\u30c1\u304c\u62bc\u3055\u308c\u3066\u3044\u3066\u3082\u884c\u5074\u30dd\u30fc\u30c8\u30d4\u30f3\u304cHIGH\u306e\u307e\u307e\u306a\u3089\u3070\u3084\u306f\u308aHIGH\u3068\u306a\u308b\u3002\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u56de\u8def\u306e\u30ad\u30fc\u30b9\u30ad\u30e3\u30f3\u3067\u306f\u3001\u884c\u5074\u30dd\u30fc\u30c8\u30d4\u30f3\u3092\u4e00\u5b9a\u306e\u671f\u9593LOW\u3068\u3057\u3001\u305d\u306e\u671f\u9593\u4e2d\u306b\u5217\u5074\u3092\u8aad\u3093\u3060\u3068\u304d\u306e\u72b6\u614b\u3067\u30b9\u30a4\u30c3\u30c1\u304c\u62bc\u3055\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u5224\u65ad\u3059\u308b\u3002<\/p>\n<p>\u95a2\u6570 <em>scan()<\/em> \u5185\u3067\u306e\u30b9\u30a4\u30c3\u30c1\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u306e\u30b9\u30ad\u30e3\u30f3\u306f1\u884c\u305a\u3064\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u64cd\u4f5c\u3067\u884c\u3046\u3002<\/p>\n<ul>\n<li>\u5bfe\u8c61\u884c\u306b\u5bfe\u3057\u3066 LOW \u3092\u51fa\u529b\u3057\u3066\u9078\u629e\u3002<\/li>\n<li>1\u884c\u3092\u69cb\u6210\u3059\u308b4\u3064\u306e\u30b9\u30a4\u30c3\u30c1\u72b6\u614b\u3092\u8aad\u307f\u51fa\u3057\u3066\u4fdd\u5b58\u3002<\/li>\n<li>\u5bfe\u8c61\u884c\u306b\u5bfe\u3057\u3066HIGH\u3092\u51fa\u529b\u3057\u3066\u9078\u629e\u89e3\u9664\u3002<\/li>\n<\/ul>\n<p>\u3059\u3079\u3066\u306e\u884c\u306b\u5bfe\u3059\u308b\u8aad\u51fa\u3057\u64cd\u4f5c\u304c\u7d42\u308f\u3063\u305f\u6642\u70b9\u3067\u3001\u884c\u6570\u00d7\u5217\u6570 \u500b\u306e\u30b9\u30a4\u30c3\u30c1\u72b6\u614b\u306e\u30c7\u30fc\u30bf\u304c1\u30d3\u30c3\u30c8\u305a\u3064\u9806\u756a\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308c\u3070\u3088\u3044\u3002<\/p>\n<h5>\u30b9\u30ad\u30e3\u30f3\u65b9\u6cd5\u305d\u306e1<\/h5>\n<p>\u3075\u3064\u3046\u306eAPI\u3092\u4f7f\u3063\u3066\u300120\u500b\u306e\u30b9\u30a4\u30c3\u30c1\u72b6\u614b\u3092\u30d3\u30c3\u30c8\u30de\u30c3\u30d7\u5316\u3057\u3066\u914d\u5217 keys[] \u306b\u683c\u7d0d\u3059\u308b\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308b\u3060\u308d\u3046\u3002keys[0]\u306b\u306fSW1\uff5eSW7\u3001keys[1]\u306b\u306fSW8\uff5eSW15\u3001keys[2]\u306b\u306fSW16\uff5eSW20\u306e\u72b6\u614b\u304c\u683c\u7d0d\u3055\u308c\u308b\u3002<\/p>\n<pre class=\"nums:true tab-convert:true tab-size:2 lang:default decode:true\">uint8_t keys[3];\r\nuint8_t key = 0;\r\nuint8_t n = 0;\r\nfor(uint8_t row = 0; row &lt; sizeof(rows); row++) {\r\n\tdigitalWrite(rows[row], 0);\t\/\/ select a row\r\n\tn = 0;\r\n\tfor (uint8_t col = 0; col &lt; sizeof(cols); col++) \/\/ read all cols.\r\n\t\tn |= (digitalRead(cols[col]) &lt;&lt; col);\r\n\tif (row &amp; 1)\r\n\t\tkeys[key++] |= (~(n &lt;&lt; 4) &amp; 0xf0); \r\n\telse\r\n\t\tkeys[key] = ~n &amp; 0x0f;\r\n\tdigitalWrite(rows[row], 1);\t\/\/ unselect a row.\r\n}<\/pre>\n<p>\u3053\u306e\u30ad\u30fc\u30dc\u30fc\u30c9\u306b\u306f\u5404\u52174\u3064\u306e\u30b9\u30a4\u30c3\u30c1\u304c\u3042\u308b\u306e\u3067\u3001\u5076\u6570\u884c\u306e\u3068\u304d\u4e0b\u4f4d4\u30d3\u30c3\u30c8\u306b\u3001\u5947\u6570\u884c\u306e\u3068\u304d\u4e0a\u4f4d4\u30d3\u30c3\u30c8\u306b\u72b6\u614b\u3092\u683c\u7d0d\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u308b\u3002\u306a\u304a\u30dd\u30fc\u30c8\u30d4\u30f3\u304b\u3089\u8aad\u307f\u53d6\u308c\u308b\u30b9\u30a4\u30c3\u30c1\u306e\u72b6\u614b\u306f\u30aa\u30f3\u306e\u3068\u304d0\u3001\u30aa\u30d5\u306e\u3068\u304d\u306b1\u306a\u306e\u3067\u3001\u308f\u304b\u308a\u3084\u3059\u3055\u306e\u305f\u3081\u53cd\u8ee2\u3057\u3066\u683c\u7d0d\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>\u3053\u306e\u65b9\u6cd5\u306b\u554f\u984c\u304c\u3042\u308b\u3068\u3059\u308c\u3070\u3001<em>digitalRead() <\/em>\u3084 <em>digitalWrite() <\/em>\u3068\u3044\u3063\u305fAPI\u306e\u547c\u3073\u51fa\u3057\u3092\u7e70\u308a\u8fd4\u3057\u3066\u3044\u308b\u3053\u3068\u3067\u3001\u7d20\u65e9\u304f\u7d42\u308f\u3089\u305b\u305f\u3044\u51e6\u7406\u306e\u5b9f\u88c5\u3068\u3057\u3066\u306f\u3042\u307e\u308a\u3088\u308d\u3057\u304f\u306a\u3044\u3060\u308d\u3046\u3002<\/p>\n<div>\n<div>\n<h5>\u30b9\u30ad\u30e3\u30f3\u65b9\u6cd5\u305d\u306e2<\/h5>\n<p>CH552 (8051)\u3067\u306f\u3001\u5404\u30dd\u30fc\u30c8\u30d4\u30f3\u306e\u72b6\u614b\u3092\u30dd\u30fc\u30c8\u3054\u3068\u306b\u307e\u3068\u3081\u3066\u53d6\u5f97\u3057\u305f\u308a\u8a2d\u5b9a\u3057\u305f\u308a\u3067\u304d\u308b\u306e\u3067\u30011\u5217\u305a\u3064 <em>digitalRead()<\/em> \u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001P1 \u30dd\u30fc\u30c8\u304b\u3089\u307e\u3068\u3081\u3066\u8aad\u307f\u53d6\u308b\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u308b\u3002\u3055\u3089\u306b\u3001\u884c\u306e\u9078\u629e\u3082\u30dd\u30fc\u30c8\u6307\u5b9a\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308b\u3002<\/p>\n<\/div>\n<\/div>\n<pre class=\"nums:true tab-convert:true tab-size:2 lang:default decode:true\">uint8_t keys[3];\r\nuint8_t key = 0;\r\nfor(uint8_t row = 0; row &lt; sizeof(rows); row++) {\r\n\tP3 &amp;= ~row_masks[row];\t\t\/\/ select row\r\n\tif (row &amp; 1)\r\n\t\tkeys[key++] |= (~P1 &amp; 0xf0);\r\n\telse\r\n\t\tkeys[key] = (~P1 &gt;&gt; 4) &amp; 0x0f;\r\n\tP3 |= row_masks[row];\t\t\/\/ unselect row\r\n}<\/pre>\n<h5>\u5b9f\u884c\u6642\u9593\u306e\u76f8\u9055<\/h5>\n<p>\u30ed\u30b8\u30a2\u30ca\u3092\u4f7f\u3063\u30661\u884c\u306e\u9078\u629e\u304b\u3089\u9078\u629e\u89e3\u9664\u307e\u3067\u306b\u8981\u3059\u308b\u6642\u9593\u3092\u6e2c\u3063\u3066\u307f\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u305f(24MHz\u52d5\u4f5c)\u3002<\/p>\n<table style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 33.3333%;\">\u30d7\u30ed\u30b0\u30e9\u30e0<\/td>\n<td style=\"width: 33.3333%;\">\u9078\u629e\u884c\u304cLOW\u306e\u671f\u9593<br \/>\n(\u8aad\u51fa\u3057\u3068\u4fdd\u5b58\u3082\u542b\u3080)<\/td>\n<td style=\"width: 33.3333%;\">\u6b21\u306e\u884c\u304cLOW\u306b\u306a\u308b\u307e\u3067\u306e\u6642\u9593<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 33.3333%;\">\u30b9\u30ad\u30e3\u30f3\u65b9\u6cd5\u305d\u306e1<\/td>\n<td style=\"width: 33.3333%;\">35usec<\/td>\n<td style=\"width: 33.3333%;\">7usec<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 33.3333%;\">\u30b9\u30ad\u30e3\u30f3\u65b9\u6cd5\u305d\u306e2<\/td>\n<td style=\"width: 33.3333%;\">3usec<\/td>\n<td style=\"width: 33.3333%;\">1usec<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5b9f\u884c\u6642\u9593\u306b\u306f<span style=\"text-decoration: underline;\"><strong>10\u500d\u4ee5\u4e0a\u306e\u76f8\u9055<\/strong><\/span>\u304c\u3042\u3063\u305f\u3002<\/p>\n<p>\u305d\u306e1\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u30011\u884c\u3092\u69cb\u6210\u3059\u308b4\u3064\u306e\u30b9\u30a4\u30c3\u30c1\u72b6\u614b\u306e\u8aad\u51fa\u3057\u306b\u3001<em>digitalRead()<\/em> \u30924\u56de\u547c\u3073\u51fa\u3057\u3066\u3044\u308b\u3053\u3068\u5927\u304d\u304f\u5f71\u97ff\u3057\u3066\u3044\u308b\u3068\u601d\u308f\u308c\u308b\u3002\u307e\u305f\u3001\u6b21\u306e\u884c\u304cLOW\u306b\u306a\u308b\u307e\u3067\u306e\u6642\u9593\u306b\u76f8\u9055\u304c\u3042\u308b\u306e\u306f\u3001\u884c\u306e\u9078\u629e\u3092\u89e3\u9664\u3059\u308b\u30eb\u30fc\u30d7\u306e\u6700\u5f8c\u306e <em>digitalWrite()<\/em> \u3068\u3001\u6b21\u306e\u884c\u3092\u9078\u629e\u3059\u308b\u305f\u3081\u306e <em>digitalWrite()<\/em> \u306e\u547c\u3073\u51fa\u3057\u3088\u308b\u3082\u306e\u3060\u308d\u3046\u3002<\/p>\n<p>\u30b9\u30ad\u30e3\u30f3\u65b9\u6cd5\u305d\u306e2 \u3092\u63a1\u7528\u3059\u308b\u306a\u3089\u3070\u3001\u30b9\u30a4\u30c3\u30c1\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u5168\u4f53\u306e\u30ad\u30fc\u72b6\u614b\u3092\u914d\u5217 <em>keys[]<\/em> \u306b\u683c\u7d0d\u3059\u308b\u305f\u3081\u306e\u6642\u9593\u304c 20usec \u7a0b\u5ea6\u3060\u304b\u3089\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u7528\u306e\u30b3\u30fc\u30c9\u3068\u3057\u3066\u306f\u5341\u5206\u3060\u308d\u3046\u3002<\/p>\n<p>\u5b9f\u884c\u901f\u5ea6\u3084\u30b3\u30fc\u30c9\u30b5\u30a4\u30ba\u3092\u6c17\u306b\u3059\u308b\u5834\u5408\u3001 sdcc \u304cArduino\u306e\u30d3\u30eb\u30c9\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u4f5c\u6210\u3059\u308b\u30a2\u30bb\u30f3\u30d6\u30e9\u30ea\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb(sourcefile.asm, sourcefile.lst, sourcefile.rst) \u3084\u30e1\u30e2\u30ea\u30de\u30c3\u30d7\u30d5\u30a1\u30a4\u30eb(sourcefile.mem, sourcefile.map) \u306a\u3069\u3092\u53c2\u7167\u3057\u3001\u81ea\u529b\u3067\u30b3\u30fc\u30c9\u306e\u6700\u9069\u5316\u3092\u884c\u3046\u3053\u3068\u3082\u53ef\u80fd\u3068\u601d\u308f\u308c\u308b\u3002 \u30a2\u30bb\u30f3\u30d6\u30e9\u30ea\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u30d3\u30eb\u30c9\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u76f4\u4e0b\u306esketch\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306b\u4f5c\u6210\u3055\u308c\u308b)\u3002<\/p>\n<h4>HID\u30b3\u30fc\u30c9\u3078\u306e\u5909\u63db\u3068\u30b7\u30ea\u30a2\u30eb\u30e2\u30cb\u30bf\u3078\u306e\u51fa\u529b<\/h4>\n<p><em>keys[] <\/em>\u306b\u683c\u7d0d\u3057\u305f\u30b9\u30a4\u30c3\u30c1\u72b6\u614b\u306f\u3001\u30c7\u30d0\u30a6\u30f3\u30b9\u306e\u305f\u3081\u306b\u76f4\u524d\u30c7\u30fc\u30bf <em>last_scan[]<\/em> \u3068\u306e\u6bd4\u8f03\u3059\u308b\u3002\u5168\u30b9\u30a4\u30c3\u30c1\u306e\u72b6\u614b\u304c\u4e00\u81f4\u3057\u3066\u3044\u306a\u3051\u308c\u3070\u3001\u30b9\u30a4\u30c3\u30c1\u72b6\u614b\u304c\u5b89\u5b9a\u3057\u3066\u3044\u306a\u3044\u3068\u307f\u306a\u3057\u3066\u30b3\u30fc\u30c9\u306e\u751f\u6210\u306f\u884c\u308f\u306a\u3044\u3002\u4eca\u56de\u4f7f\u3063\u305fGateron KS-33\u306e\u4ed5\u69d8\u4e0a\u306e\u30d0\u30a6\u30f3\u30b9\u6642\u9593\u306f5msec (max) \u306a\u306e\u3067\u3001\u76f4\u524d\u30c7\u30fc\u30bf\u3068\u306e\u6bd4\u8f03\u306f5msec\u4ee5\u4e0a\u306e\u6642\u9593\u3092\u3042\u3051\u3066\u884c\u3046\u3002\u3053\u306e\u30b9\u30b1\u30c3\u30c1\u3067\u306f\u300110msec\u3054\u3068\u306b <em>scan()<\/em> \u3092\u547c\u3093\u3067\u3044\u308b\u3002<\/p>\n<p>\u524d\u56de\u53d6\u5f97\u3057\u305f\u4e8c\u5ea6\u8aad\u307f\u4e00\u81f4\u30c7\u30fc\u30bf\u306f\u914d\u5217 <em>last_stable[]<\/em> \u5185\u306b\u8a18\u61b6\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u306e\u5185\u5bb9\u30681\u30d3\u30c3\u30c8\u305a\u3064\u6bd4\u8f03\u3057\u5909\u5316\u304c\u3042\u3063\u305f\u30b9\u30a4\u30c3\u30c1\u3092\u691c\u51fa\u3059\u308b\u3002\u305d\u3057\u3066\u5909\u5316\u306e\u3042\u3063\u305f\u30b9\u30a4\u30c3\u30c1\u756a\u53f7\u3092\u00a0<em>void key_event(uint8_t switch_num, uint8_t state)\u00a0<\/em>\u306b\u6e21\u3057\u3001\u305d\u306e\u4e2d\u3067\u5bfe\u5fdc\u3059\u308bHID Usage ID \u306b\u5909\u63db\u3057\u3066 <em>USBSerial_print()<\/em> \u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u3067\u3001\u30b3\u30fc\u30c9\u3068\u72b6\u614b\u3092\u30b7\u30ea\u30a2\u30eb\u30e2\u30cb\u30bf\u306b\u51fa\u529b\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>HID Usage ID\u3078\u306e\u5909\u63db\u306f\u3001\u4ee5\u4e0b\u306e\u914d\u5217\u3092\u30b9\u30a4\u30c3\u30c1\u756a\u53f7\u3067\u5f15\u304f\u3053\u3068\u3067\u884c\u3046\u3002<\/p>\n<pre class=\"nums:true tab-convert:true tab-size:2 lang:default decode:true\">static const uint8_t scan_to_hid[] = {\t\t\t\/\/ scan hid\r\n\tHID_KEYBOARD_SC_NUM_LOCK,\t\t\t\t\t\t\t\t\t\/\/ 1 \t\t0x53\r\n\tHID_KEYBOARD_SC_KEYPAD_SLASH,\t\t\t\t\t\t\t\/\/ 2\t\t0x54\r\n\tHID_KEYBOARD_SC_KEYPAD_ASTERISK,\t\t\t\t\t\/\/ 3\t\t0x55\r\n\tHID_KEYBOARD_SC_KEYPAD_MINUS,\t\t\t\t\t\t\t\/\/ 4\t\t0x56\r\n\tHID_KEYBOARD_SC_KEYPAD_7_AND_HOME,\t\t\t\t\/\/ 5\t\t0x5f\r\n\tHID_KEYBOARD_SC_KEYPAD_8_AND_UP_ARROW,\t\t\/\/ 6\t\t0x60\r\n\tHID_KEYBOARD_SC_KEYPAD_9_AND_PAGE_UP,\t\t\t\/\/ 7\t\t0x61\r\n\tHID_KEYBOARD_SC_KEYPAD_PLUS,\t\t\t\t\t\t\t\/\/ 8\t\t0x57\r\n\tHID_KEYBOARD_SC_KEYPAD_4_AND_LEFT_ARROW,\t\/\/ 9\t\t0x5c\r\n\tHID_KEYBOARD_SC_KEYPAD_5,\t\t\t\t\t\t\t\t\t\/\/ 10\t\t0x5d\r\n\tHID_KEYBOARD_SC_KEYPAD_6_AND_RIGHT_ARROW,\t\/\/ 11\t\t0x5e\r\n\t0,\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/ 12\r\n\tHID_KEYBOARD_SC_KEYPAD_1_AND_END,\t\t\t\t\t\/\/ 13\t\t0x59\r\n\tHID_KEYBOARD_SC_KEYPAD_2_AND_DOWN_ARROW,\t\/\/ 14\t\t0x5a\r\n\tHID_KEYBOARD_SC_KEYPAD_3_AND_PAGE_DOWN,\t\t\/\/ 15\t\t0x5b\r\n\tHID_KEYBOARD_SC_KEYPAD_ENTER,\t\t\t\t\t\t\t\/\/ 16\t\t0x58\r\n\tHID_KEYBOARD_SC_KEYPAD_0_AND_INSERT,\t\t\t\/\/ 17\t\t0x62\r\n\t0,\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/ 18\r\n\tHID_KEYBOARD_SC_KEYPAD_DOT_AND_DELETE,\t\t\/\/ 19\t\t0x63\r\n\t0\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/ 20\r\n};<\/pre>\n<p>\u3053\u306e\u914d\u5217\u306b\u542b\u307e\u308c\u3066\u3044\u308b <em>HID_KEYBOARD_SC_NUM_LOCK<\/em> \u3068\u3044\u3063\u305fHID Usage ID\u306e\u5b9a\u7fa9\u306f\u3001CH55xDuino\u306e\u00a0 <em>&#8230;\\cores\\ch55xduino\\usbCommonDescriptors\\HIDClassCommon.h<\/em> \u5185\u306b\u66f8\u304b\u308c\u3066\u3044\u308b\u3002<\/p>\n<h2>HID\u30ad\u30fc\u30dc\u30fc\u30c9\u3068\u3057\u3066\u52d5\u4f5c\u3059\u308b\u30b9\u30b1\u30c3\u30c1 ch552_numkeyPad.ino<\/h2>\n<ul>\n<li><em>numkeyPad_test.ino<\/em> \u3068\u540c\u3058\u3084\u308a\u65b9\u3067\u30ad\u30fc\u30b9\u30a4\u30c3\u30c1\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u3001\u72b6\u614b\u5909\u5316\u304c\u3042\u3063\u305f\u30b9\u30a4\u30c3\u30c1\u306e\u30b3\u30fc\u30c9\u3092HID\u30ad\u30fc\u30dc\u30fc\u30c9\u3068\u3057\u3066\u9001\u4fe1\u3059\u308b\u3002<\/li>\n<li>\u30db\u30b9\u30c8\u5074\u304b\u3089\u306e\u51fa\u529b\u30ec\u30dd\u30fc\u30c8\u306b\u57fa\u3065\u3044\u3066NumLock \u30a4\u30f3\u30b8\u30b1\u30fc\u30bf\u30fc\u306e\u70b9\u706f\uff0f\u6d88\u706f\u3092\u884c\u3046\u3002<\/li>\n<li>CH55xDuino\u306b\u4ed8\u5c5e\u306e\u30b9\u30b1\u30c3\u30c1\u4f8b <em><strong>HidKeyboard<\/strong> <\/em>\u3092\u69cb\u6210\u3059\u308b <em>USBhandler.c\/.h <\/em>\u3084 <em>USBconstant.c\/.h <\/em>\u3068\u3044\u3063\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u4fee\u6b63\u3057\u3066\u5229\u7528\u3057\u3066\u3044\u308b\u3002<\/li>\n<li>\u30d3\u30eb\u30c9\u6642\u306b\u3001USB Settings:\u00a0 <strong>USER CODE w\/148B<\/strong> \u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3002<\/li>\n<li>\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u306b\u3064\u3044\u3066\u306f\u3001 <a href=\"https:\/\/github.com\/okiraku-camera\/ch552_numkeyPad\/tree\/main\/sketch\/ch552_numkeyPad\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/okiraku-camera\/ch552_numkeyPad\/tree\/main\/sketch\/ch552_numkeyPad<\/a> \u3092\u53c2\u7167\u306e\u3053\u3068\u3002<\/li>\n<\/ul>\n<h3>\u30d5\u30a1\u30a4\u30eb\u69cb\u6210<\/h3>\n<p>\u3053\u306e\u30b9\u30b1\u30c3\u30c1\u306e\u30d5\u30a1\u30a4\u30eb\u69cb\u6210\u3068\u30c8\u30d4\u30c3\u30af\u30b9\u7684\u306a\u3053\u3068\u3002<\/p>\n<h4>ch552_numkeyPad.ino<\/h4>\n<p style=\"padding-left: 40px;\">\u30e1\u30a4\u30f3\u30b9\u30b1\u30c3\u30c1\u3002\u30ad\u30fc\u30b9\u30a4\u30c3\u30c1\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u306e\u30b9\u30ad\u30e3\u30f3\u3068\u72b6\u614b\u5909\u5316\u3092\u691c\u51fa\u3057\u305f\u30ad\u30fc\u306e HID Usage ID \u3092 ch552_usbhid.c \u5185\u306e\u95a2\u6570\u3092\u4f7f\u3063\u3066\u5165\u529b\u30ec\u30dd\u30fc\u30c8\u3068\u3057\u3066\u9001\u4fe1\u3059\u308b\u3002<\/p>\n<p style=\"padding-left: 40px;\">\u30db\u30b9\u30c8\u304b\u3089\u306e\u51fa\u529b\u30ec\u30dd\u30fc\u30c8\u306e\u5185\u5bb9\u3092\u305f\u307e\u306b\u53c2\u7167\u3057\u3001\u5fc5\u8981\u306a\u3089\u3070\u30ad\u30fc\u30dc\u30fc\u30c9\u306eNumLock\u30a4\u30f3\u30b8\u30b1\u30fc\u30bf\u30fcLED\u3092\u70b9\u706f\uff0f\u6d88\u706f\u3059\u308b\u3002<\/p>\n<p style=\"padding-left: 40px;\">CH552\u3092\u30b9\u30ea\u30fc\u30d7\u72b6\u614b\u3068\u3059\u308b\u305f\u3081\u306e\u95a2\u6570 <em>USBStartSuspend()<\/em> \u306f\u3001USBhandler.c \u3067<em>UIF_SUSPEND<\/em>\u5272\u308a\u8fbc\u307f\u3092\u691c\u51fa\u3057\u305f\u3068\u304d\u306b\u547c\u3073\u51fa\u3055\u308c\u308b\u3002<\/p>\n<h4>ch552_usbhid.c \/ .h<\/h4>\n<p style=\"padding-left: 40px;\"><strong>HidKeyboard<\/strong> \u30b5\u30f3\u30d7\u30eb\u306e USBHIDKeyboard.c \/ .h \u304b\u3089\u5fc5\u8981\u306a\u90e8\u5206\u3092\u62bd\u51fa\u3057\u3001HID\u5165\u529b\u30ec\u30dd\u30fc\u30c8\u3092\u9001\u4fe1\u3059\u308b\u305f\u3081\u306e <em>report_press()<\/em> \u304a\u3088\u3073r<em>eport_release()<\/em> \u3092\u8ffd\u52a0\u3002HID \u306e\u5165\u51fa\u529b\u3092\u884c\u3046\u305f\u3081\u306e\u95a2\u6570\u3092\u96c6\u3081\u305f\u3002<\/p>\n<h4>USBconstant.c \/ .h<\/h4>\n<p style=\"padding-left: 40px;\">USB\u306e\u5404\u7a2e\u30c7\u30a3\u30b9\u30af\u30ea\u30d7\u30bf\u3092\u8868\u3059\u3044\u308d\u3044\u308d\u306a\u914d\u5217\u3092\u4fdd\u6301\u3059\u308b\u3002<strong>HidKeyboard<\/strong> \u30b5\u30f3\u30d7\u30eb\u304b\u3089\u6d41\u7528\u3002<\/p>\n<p style=\"padding-left: 40px;\">HID\u30ec\u30dd\u30fc\u30c8\u30c7\u30a3\u30b9\u30af\u30ea\u30d7\u30bf\u306b\u3064\u3044\u3066\u306f\u3001\u4fee\u98fe\u30ad\u30fc\u3092\u542b\u3080\uff0f\u542b\u307e\u306a\u3044\u306e\u3069\u3061\u3089\u3082\u5bfe\u5fdc\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u3002<\/p>\n<h4>USBhandler.c \/ .h<\/h4>\n<p style=\"padding-left: 40px;\">CH552\u306eUSB\u5272\u308a\u8fbc\u307f\u30cf\u30f3\u30c9\u30e9\u3092\u542b\u3080\u3001USB\u5165\u51fa\u529b\u306e\u30b3\u30a2\u90e8\u5206\u3002<strong>HidKeyboard<\/strong> \u30b5\u30f3\u30d7\u30eb\u304b\u3089\u6d41\u7528\u3002<\/p>\n<p style=\"padding-left: 40px;\">USB\u30d0\u30b9\u306e\u30b5\u30b9\u30da\u30f3\u30c9\u6642\u3001\u307e\u305f\u306f\u30a6\u30a7\u30a4\u30af\u30a2\u30c3\u30d7\u691c\u51fa\u6642\u306b\u767a\u751f\u3059\u308b UIF_SUSPEND\u5272\u308a\u8fbc\u307f\u691c\u51fa\u3057\u305f\u5834\u5408\u3001\u30b5\u30b9\u30da\u30f3\u30c9\u4e2d\u3067\u306a\u3051\u308c\u3070 <em>USBStartSuspend()<\/em> \u3092\u547c\u3073\u51fa\u3059\u3002\u30b9\u30ea\u30fc\u30d7\u30e2\u30fc\u30c9\u304b\u3089\u306e\u5fa9\u5e30\u306f\u3001USB\u30a4\u30d9\u30f3\u30c8\u306e\u691c\u51fa\u6642\u306b\u81ea\u52d5\u7684\u306b\u884c\u308f\u308c\u308b\u3088\u3046\u306b\u3057\u305f\u3002\u30c6\u30f3\u30ad\u30fc\u306e\u64cd\u4f5c\u306b\u3088\u308b\u30b9\u30ea\u30fc\u30d7\u89e3\u9664\u306f\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u3002<\/p>\n<h3>\u30ec\u30dd\u30fc\u30c8\u30c7\u30a3\u30b9\u30af\u30ea\u30d7\u30bf\u306e\u5909\u66f4<\/h3>\n<p>USBconstant.c \u5185\u306e uint8_t ReportDescriptor[] \u304c\u3053\u306e\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u30ec\u30dd\u30fc\u30c8\u30c7\u30a3\u30b9\u30af\u30ea\u30d7\u30bf\u3067\u3001\u30d3\u30eb\u30c9\u6642\u306b <strong><em>WITH_MODIFIERS<\/em><\/strong> \u30de\u30af\u30ed\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u306b\u5fdc\u3058\u3066\u5185\u5bb9\u304c\u5909\u5316\u3059\u308b\u3088\u3046\u306b\u3057\u305f\u3002<\/p>\n<pre class=\"nums:true tab-convert:true tab-size:2 lang:default highlight:0 decode:true\">__code uint8_t ReportDescriptor[] = {\r\n\t\t0x05, 0x01, \/\/ USAGE_PAGE (Generic Desktop)\r\n\t\t0x09, 0x06, \/\/ USAGE (Keyboard)\r\n\t\t0xa1, 0x01, \/\/ COLLECTION (Application)\r\n#ifdef WITH_MODIFIERS\r\n\t\t0x05, 0x07, \/\/   USAGE_PAGE (Keyboard)\r\n\t\t0x19, 0xe0, \/\/   USAGE_MINIMUM (Keyboard LeftControl)\r\n\t\t0x29, 0xe7, \/\/   USAGE_MAXIMUM (Keyboard Right GUI)\r\n\t\t0x15, 0x00, \/\/   LOGICAL_MINIMUM (0)\r\n\t\t0x25, 0x01, \/\/   LOGICAL_MAXIMUM (1)\r\n\t\t0x95, 0x08, \/\/   REPORT_COUNT (8)\r\n\t\t0x75, 0x01, \/\/   REPORT_SIZE (1)\r\n\t\t0x81, 0x02, \/\/   INPUT (Data,Var,Abs)\r\n\t\t0x95, 0x01, \/\/   REPORT_COUNT (1)\r\n\t\t0x75, 0x08, \/\/   REPORT_SIZE (8)\r\n\t\t0x81, 0x03, \/\/   INPUT (Cnst,Var,Abs)\r\n#endif\r\n\/\/ Keyboard\r\n\t\t0x05, 0x07, \/\/   USAGE_PAGE (Keyboard)\r\n\t\t0x19, 0x00, \/\/   USAGE_MINIMUM (Reserved (no event indicated))\r\n\t\t0x29, 0xe7, \/\/   USAGE_MAXIMUM (Keyboard Right GUI)\r\n\t\t0x15, 0x00, \/\/   LOGICAL_MINIMUM (0)\r\n\t\t0x25, 0xff, \/\/   LOGICAL_MAXIMUM (255)\r\n\t\t0x95, 0x06, \/\/   REPORT_COUNT (6)\r\n\t\t0x75, 0x08, \/\/   REPORT_SIZE (8)\r\n\t\t0x81, 0x00, \/\/   INPUT (Data,Ary,Abs)\r\n\/\/ LED\r\n\t\t0x05, 0x08, \/\/   USAGE_PAGE (LEDs)\r\n\t\t0x19, 0x01, \/\/   USAGE_MINIMUM (Num Lock)\r\n\t\t0x29, 0x05, \/\/   USAGE_MAXIMUM (Kana)\r\n\t\t0x15, 0x00, \/\/   LOGICAL_MINIMUM (0)\r\n\t\t0x25, 0x01, \/\/   LOGICAL_MAXIMUM (1)\r\n\t\t0x95, 0x05, \/\/   REPORT_COUNT (5)\r\n\t\t0x75, 0x01, \/\/   REPORT_SIZE (1)\r\n\t\t0x91, 0x02, \/\/   OUTPUT (Data,Var,Abs)\r\n\t\t0x95, 0x01, \/\/   REPORT_COUNT (1)\r\n\t\t0x75, 0x03, \/\/   REPORT_SIZE (3)\r\n\t\t0x91, 0x03, \/\/   OUTPUT (Cnst,Var,Abs)\r\n\t\t0xc0        \/\/ END_COLLECTION\r\n};\r\n\r\n<\/pre>\n<p>\u3053\u306e\u30ec\u30dd\u30fc\u30c8\u30c7\u30a3\u30b9\u30af\u30ea\u30d7\u30bf\u306f\u3001\u4e00\u822c\u7684\u306a\u30ad\u30fc\u30dc\u30fc\u30c9\u3068\u540c\u69d8\u306b\u3001\u4fee\u98fe\u30ad\u30fc\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u3001LED\u304b\u3089\u306a\u308b3\u3064\u306e USAGE_PAGE\u306e\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u306b\u306a\u3063\u3066\u3044\u308b\u3002 \u4eca\u56de\u306f\u4fee\u98fe\u30ad\u30fc\u3092\u6301\u305f\u306a\u3044\u30c6\u30f3\u30ad\u30fc\u7528\u306a\u306e\u3067\u3001<strong><em>WITH_MODIFIERS<\/em><\/strong> \u304c<span style=\"text-decoration: underline;\">\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u306a\u3044\u3068\u304d<\/span>\u306f\u4fee\u98fe\u30ad\u30fc\u306b\u95a2\u3059\u308b\u8a18\u8ff0\u3092\u7701\u7565\u3059\u308b\u3088\u3046\u306b\u3057\u305f\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u3057\u305f\u5834\u5408\u3001\u5165\u529b\u30ec\u30dd\u30fc\u30c8\u7528\u306e\u30c7\u30fc\u30bf\u304b\u3089\u3082\u4fee\u98fe\u30ad\u30fc\u3092\u8868\u30598\u30d3\u30c3\u30c8 (11\uff5e13\u884c\u76ee)\u3068\u3001\u3057\u3070\u3057\u3070 <em>reserved<\/em> \u3068\u8868\u73fe\u3055\u308c\u308b8\u30d3\u30c3\u30c8 (14\uff5e16\u884c\u76ee)\u3082\u53d6\u308a\u9664\u3044\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b\u3002\u305d\u306e\u305f\u3081\u5165\u529b\u30ec\u30dd\u30fc\u30c8\u30c7\u30fc\u30bf\u306e\u914d\u5217\u306f ch552_usbhid.h \u5185\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5b9a\u7fa9\u3057\u305f\u3002<\/p>\n<pre class=\"nums:true tab-convert:true tab-size:2 lang:default decode:true\">#ifdef WITH_MODIFIERS\r\n\t#define report_size\t8\r\n\t#define report_start_index\t2\r\n#else\r\n\t#define report_size\t6\r\n\t#define report_start_index\t0\r\n#endif\r\n__data uint8_t hid_report[report_size];\r\n<\/pre>\n<p>WITH_MODIFIERS \u306a\u3089\u3070\u3001\u3088\u304f\u3042\u308b\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u5165\u529b\u30ec\u30dd\u30fc\u30c8\u30c7\u30fc\u30bf\u3068\u540c\u69d8\u306b\u30ec\u30dd\u30fc\u30c8\u306e\u30c7\u30fc\u30bf\u9577\u306f8\u30d0\u30a4\u30c8\u3067\u3001\u30ad\u30fc\u5165\u529b\u30c7\u30fc\u30bf\u306f2\u30d0\u30a4\u30c8\u76ee\u304b\u3089\u683c\u7d0d\u3059\u308b\u3002\u305d\u3046\u3067\u306a\u3051\u308c\u3070\u30c7\u30fc\u30bf\u9577\u306f6\u30d0\u30a4\u30c8\u3067\u3001\u30ad\u30fc\u5165\u529b\u30c7\u30fc\u30bf\u306f\u30ec\u30dd\u30fc\u30c8\u914d\u5217\u306e\u5148\u982d\u304b\u3089\u683c\u7d0d\u3059\u308b\u3002<\/p>\n<h1>\u304d\u3087\u3046\u306e\u307e\u3068\u3081<\/h1>\n<p>CH552\u3084CH55xDuino\u3092\u306f\u3058\u3081\u3066\u4f7f\u3063\u3066\u307f\u305f\u304c\u3001\u7279\u306b\u6238\u60d1\u3046\u3053\u3068\u3082\u306a\u304f\u3001\u3059\u3093\u306a\u308a\u3068\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3067\u304d\u3066\u3001\u3059\u3093\u306a\u308a\u3068\u30ad\u30fc\u30dc\u30fc\u30c9\u306f\u52d5\u4f5c\u3057\u305f\u3002\u5171\u901a\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3068\u3057\u3066\u306eArduino\u306e\u3042\u308a\u304c\u305f\u307f\u3092\u611f\u3058\u308b\u3002<\/p>\n<figure id=\"attachment_15962\" aria-describedby=\"caption-attachment-15962\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2023\/09\/57a921477705a727d1b88fdee7f8e583.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-15962\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2023\/09\/57a921477705a727d1b88fdee7f8e583-552x414.jpg\" alt=\"\" width=\"552\" height=\"414\" \/><\/a><figcaption id=\"caption-attachment-15962\" class=\"wp-caption-text\">ch552_numkeyPad with Low profile keycaps.<\/figcaption><\/figure>\n<p>\u30c6\u30f3\u30ad\u30fc\u30d1\u30c3\u30c9\u3068\u3057\u3066\u306e\u52d5\u4f5c\u306f\u3068\u3066\u3082\u9806\u8abf\u3002\u305f\u3060\u3001\u524d\u306e\u6295\u7a3f\u306b\u66f8\u3044\u305f\u3088\u3046\u306b\u30ed\u30fc\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u306e\u30ad\u30fc\u30ad\u30e3\u30c3\u30d7\u3092\u30b9\u30bf\u30d3\u30e9\u30a4\u30b6\u30fc\u7121\u3057\u3067\u4f7f\u3046\u306e\u306f\u7121\u8b00\u3060\u3063\u305f\u3088\u3046\u3067\u3001+ \u3084 Enter\u3092\u4f7f\u3046\u3068\u304d\u306b\u306f\u610f\u8b58\u3057\u3066\u4e2d\u592e\u90e8\u3092\u53e9\u304f\u3088\u3046\u306b\u3057\u305f\u3002<\/p>\n<p>\u30ed\u30fc\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u4ee5\u5916\u306e\u3001\u305f\u3068\u3048\u3070XDA\u306e\u30ad\u30fc\u30ad\u30e3\u30c3\u30d7\u306a\u3089\u3070\u30b9\u30bf\u30d3\u30e9\u30a4\u30b6\u30fc\u304c\u306a\u3044\u3053\u3068\u306b\u3088\u308b\u30c7\u30e1\u30ea\u30c3\u30c8\u306f\u3055\u307b\u3069\u611f\u3058\u306a\u3044\u3002<\/p>\n<figure id=\"attachment_15963\" aria-describedby=\"caption-attachment-15963\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2023\/09\/4bd9cc3a80e033bf08eba1b966e2dfbf.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-15963\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2023\/09\/4bd9cc3a80e033bf08eba1b966e2dfbf-552x361.jpg\" alt=\"\" width=\"552\" height=\"361\" \/><\/a><figcaption id=\"caption-attachment-15963\" class=\"wp-caption-text\">ch552_numkeyPad with XDA keycaps.<\/figcaption><\/figure>\n<p>\u305f\u3060\u3001\u624b\u5143\u306b\u3042\u3063\u305fXDA\u30ad\u30fc\u30ad\u30e3\u30c3\u30d7\u3068\u30bf\u30af\u30bf\u30a4\u30eb\u611f\u304b\u3089\u9078\u3093\u3060\u8336\u8ef8\u30b9\u30a4\u30c3\u30c1\u306e\u76f8\u6027\u304c\u6700\u60aa\u306a\u611f\u3058\u3067\u3001\u305b\u3081\u3066\u30ea\u30cb\u30a2\u306a\u8d64\u8ef8\u30b9\u30a4\u30c3\u30c1\u306b\u3059\u308c\u3070\u3088\u304b\u3063\u305f\u304b\u3082\u3002\u3053\u306e\u62b9\u8336\u8272\u306e\u3088\u3046\u306a\u30ad\u30fc\u30ad\u30e3\u30c3\u30d7\u30bb\u30c3\u30c8\u3092\u306f\u3081\u308b\u3068\u3001\u3042\u3089\u3086\u308b\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u5b98\u80fd\u6027\u304c\u6700\u60aa\u306b\u306a\u308b\u306e\u3067\u3001\u81ea\u5206\u3068\u306e\u76f8\u6027\u306e\u554f\u984c\u306a\u306e\u304b\u3082\u3057\u308c\u306a\u3044\u304c\u3002<\/p>\n<p>\u307e\u3068\u3081\u308b\u3068\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u9762\u3067\u306f\u6e80\u8db3\u3001\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u9762\u3067\u306f\u3084\u308a\u76f4\u3057\u305f\u3044\u6c17\u5206\u3068\u3044\u3063\u305f\u3068\u3053\u308d\u3067\u3059\u3002<\/p>\n<h2>\u8ffd\u8a18<\/h2>\n<p><strong>CH55xDuino \u306e0.20\u7248<\/strong>\u3067\u306e\u30d3\u30eb\u30c9\u3068\u30bf\u30fc\u30b2\u30c3\u30c8\u52d5\u4f5c\u306f0.18\u7248\u3067\u884c\u3063\u305f\u3068\u304d\u3068\u540c\u69d8\u306b\u554f\u984c\u306a\u304b\u3063\u305f\u3002<\/p>\n<p>0.20\u7248\u3067\u306f\u3001\u4e0b\u56f3\u306e\u3088\u3046\u306b\u30d3\u30eb\u30c9\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u8ffd\u52a0\u3055\u308c\u3066\u3044\u305f\u3002<\/p>\n<figure id=\"attachment_16273\" aria-describedby=\"caption-attachment-16273\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2023\/09\/0d40a5e4a645fc6b96e767d64ac0878e.png\"><img loading=\"lazy\" decoding=\"async\" class=\"waku wp-image-16273 size-large\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2023\/09\/0d40a5e4a645fc6b96e767d64ac0878e-552x378.png\" alt=\"\" width=\"552\" height=\"378\" \/><\/a><figcaption id=\"caption-attachment-16273\" class=\"wp-caption-text\">ch55xDuino build options<\/figcaption><\/figure>\n<p>\u4eca\u56de\u306e\u30ad\u30fc\u30d1\u30c3\u30c9\u3067\u306f\u3001BOOT\u30b9\u30a4\u30c3\u30c1\u3067P3.6\u3092\u30d7\u30eb\u30a2\u30c3\u30d7\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u521d\u671f\u5024\u3068\u3057\u3066\u8868\u793a\u3055\u308c\u308b <strong>P3.6(D+) pull-up<\/strong> \u306e\u307e\u307e\u3067\u3088\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981 CH552 \u3092\u4f7f\u3063\u305f\u30c6\u30f3\u30ad\u30fc\u30d1\u30c3\u30c9\u3092\u4f5c\u3063\u305f\u8a71\u306e\u7d9a\u304d\u3067\u3001\u4eca\u56de\u306f\u3001CH55xDuino\u3092\u4f7f\u3063\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3084\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u4e2d\u8eab\u306e\u8a71\u306a\u3069\u3002 CH55xDuino \u306b\u3064\u3044\u3066 CH55xDuino\u306f\u3001CH55x\u30b7\u30ea\u30fc\u30ba\u30de\u30a4\u30b3 &hellip; <a href=\"https:\/\/okiraku-camera.tokyo\/blog\/?p=15907\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">CH552\u3092\u4f7f\u3063\u305f\u30c6\u30f3\u30ad\u30fc\u30d1\u30c3\u30c9\u306e\u88fd\u4f5c (\u305d\u306e2)<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":15912,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[69],"tags":[65,228,227,150,196,190],"class_list":["post-15907","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programming","tag-arduino","tag-ch552g","tag-ch55x","tag-hid","tag-keyboard","tag-usb"],"_links":{"self":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/posts\/15907","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=15907"}],"version-history":[{"count":0,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/posts\/15907\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/media\/15912"}],"wp:attachment":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=15907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=15907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=15907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}