{"id":161,"date":"2011-09-10T18:33:51","date_gmt":"2011-09-10T09:33:51","guid":{"rendered":"http:\/\/morecatlab.akiba.coocan.jp\/lab\/?page_id=161"},"modified":"2012-10-29T06:19:19","modified_gmt":"2012-10-28T21:19:19","slug":"rcduino","status":"publish","type":"page","link":"http:\/\/morecatlab.akiba.coocan.jp\/lab\/index.php\/aruino\/rcduino\/","title":{"rendered":"RCduino"},"content":{"rendered":"<p><!--:ja--><\/p>\n<h1>RCduino<\/h1>\n<div id=\"attachment_167\" style=\"width: 410px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/09\/IMGP5294.jpg\"><img aria-describedby=\"caption-attachment-167\" loading=\"lazy\" class=\"size-medium wp-image-167\" title=\"RCduino LED\" src=\"http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/09\/IMGP5294-400x265.jpg\" alt=\"RCduino\u3067PB6\/PB7(Port20\/21)\u306bLED\u3092\u63a5\u7d9a\" width=\"400\" height=\"265\" srcset=\"http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/09\/IMGP5294-400x265.jpg 400w, http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/09\/IMGP5294.jpg 1024w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/a><p id=\"caption-attachment-167\" class=\"wp-caption-text\">RCduino\u3067Port20\/21\u306bLED\u3092\u63a5\u7d9a<\/p><\/div>\n<p>RCduino\u3068\u3044\u3046\u547c\u3073\u540d\u306f\u30dc\u30fc\u30c9\u306e\u540d\u524d\u3067\u306f\u306a\u304f\u3001Arduino  IDE\u306e\u8a8d\u8b58\u3059\u308bArduino\u306e\u30b3\u30a2\uff08\u30bd\u30d5\u30c8\u30a6\u30a8\u30a2\uff09\u306e\u540d\u79f0\u3067\u3059\u3002RCduino\u306f\u5185\u90e8RC\u767a\u4fe1\u5668\u3067\u52d5\u4f5c\u3055\u305b\u308b\u3053\u3068\u3067\u3001\u3053\u308c\u307e\u3067\u306eArduino\u306e\u6a5f\u80fd \u306b\u52a0\u3048\u3066\u3001PB6\/PB7\u304c\u30c7\u30b8\u30bf\u30eb20\/21\u30d4\u30f3\u3068\u3057\u3066\u4f7f\u3048\u307e\u3059\u3002<\/p>\n<p>\u8868\u7d19\u306e\u5199\u771f\u306fEMSL\u306eDiavolino\u3068\u3044\u3046\u4e92\u63db\u6a5f\u57fa\u677f\u306e\u30af\u30ea\u30b9\u30bf\u30eb\u306e\u7aef\u5b50\u306b\u30d4\u30f3\u30b3\u30cd\u30af\u30bf\u3092\u4ed8\u3051\u3066\u5b9f\u9a13\u3092\u3057\u3066\u3044\u308b\u3068\u3053\u308d\u3067\u3059\u3002LED\u306e\u70b9\u6ec5\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<h2>1. \u306f\u3058\u3081\u306b<\/h2>\n<p>Arduino\u306f\u30af\u30ed\u30c3\u30af\u3068\u3057\u3066\u6c34\u6676\u767a\u4fe1\u5668\u307e\u305f\u306f\u30bb\u30e9\u30ed\u30c3\u30af\u3092\u4f7f\u3046\u306e\u304c\u4e00\u822c\u7684\u3067\u3059\u3002\u30b3\u30b9\u30c8\u3092\u4e0b\u3052\u308b\u305f\u3081\u3001AVR\u5185\u8535\u306eRC\u767a\u4fe1\u5668\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002\u4f8b\u3048\u3070\u3001\u5b66\u7814\u306e\u5927\u4eba\u306e\u79d1\u5b66\u4ed8\u9332\u306e\u300cJapanino\u300d\u306f\u5916\u90e8\u767a\u4fe1\u5668\u3092\u6301\u3063\u3066\u3044\u308b\u306b\u3082\u95a2\u308f\u3089\u305a\u3001\u521d\u671f\u8a2d\u5b9a\u3067\u306f\u5185\u90e8\u767a\u632f\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u305d\u308c\u3067\u3082\u6b63\u5e38\u306b\u52d5\u4f5c\u3057\u307e\u3059\u3002<br \/>\nRC\u767a\u632f\u306e\u5834\u5408\u306b\u306f\u3001\u52d5\u4f5c\u30af\u30ed\u30c3\u30af\u304c8Mhz\u306b\u306a\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u767a\u632f\u5468\u6ce2\u6570\u306e\u7cbe\u5ea6\u304c\u60aa\u304f\u306a\u3063\u305f\u308a\u3001\u6e29\u5ea6\u7279\u6027\u304c\u60aa\u5316\u3057\u305f\u308a\u3044\u308d\u3044\u308d\u3068\u5236\u9650\u304c\u3042\u308a\u307e\u3059\u3002 7segduino\u3082\u57fa\u672c\u56de\u8def\u3068\u3057\u3066RC\u767a\u632f\u3092\u63a1\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>7segduino\u306e\u5c0f\u578b\u7248\u3092\u4f5c\u6210\u9014\u4e2d\u3067\u3001RCduino\u3068\u3044\u3046\u30a2\u30a4\u30c7\u30a2\u3092\u601d\u3044\u3064\u304d\u307e\u3057\u305f\u3002\u5185\u8535\u306eRC\u767a\u632f\u5668\u3092\u4f7f\u3046\u5834\u5408\u3001\u6c34\u6676\u767a\u632f\u5668\u3092\u3064\u306a\u3044\u3067\u3044\u305f\u7aef\u5b50(PB6\/PB7)\u3082\u6d3b\u7528\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002\u73fe\u5728\u306eArduino\u3067\u306f\u3001\u30e6\u30fc\u30b6\u30d7\u30ed\u30b0\u30e9\u30e0\u304b\u3089PB6\/PB7\u3092\u4f7f\u3046\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u304c\u3001\u30e9\u30a4\u30d6\u30e9\u30ea\u306a\u3069\u306f\u305d\u306e\u307e\u307e\u5229\u7528\u51fa\u6765\u307e\u305b\u3093\u3002\u305d\u3053\u3067\u3001Arduino\u306e\u30b3\u30a2\u3092\u62e1\u5f35\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<h2>2. \u62e1\u5f35\u3059\u308b<\/h2>\n<p>RCduino\u3068\u3044\u3046\u540d\u79f0\u3067\u65b0\u3057\u3044Arduino\u306e\u30b3\u30a2\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002\u3068\u306f\u3044\u3063\u3066\u3082\u3001\uff12\u30d4\u30f3\u3092\u65b0\u3057\u304f\u5b9a\u7fa9\u3059\u308b\u3060\u3051\u306a\u306e\u3067\u975e\u5e38\u306b\u7c21\u5358\u3067\u3059\u3002\u3053\u306e\u62e1\u5f35\u3092\u884c\u3046\u3053\u3068\u3067\u3001\u30c7\u30b8\u30bf\u30eb\u30d4\u30f3\u304c\uff12\u672c\u8ffd\u52a0\u306b\u306a\u308a\u307e\u3059\u3002\u62e1\u5f35\u65b9\u6cd5\u306f\u6b21\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<p>\u30b3\u30a2\u3092\u62e1\u5f35\u3059\u308b<br \/>\n(1) hardware\/arduino\/cores\/arduino\u3092\u30b3\u30d4\u30fc\u3057\u3066\u5225\u306e\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<br \/>\nhardware\/arduino\/cores\/RCduino<\/p>\n<p>(2) \u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306bPB6\/PB7\u306e\u5b9a\u7fa9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<br \/>\npins_arduino.c\u306e\u6700\u5f8c\u306e\u90e8\u5206\u306b\u4ee5\u4e0b\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: cpp; highlight: [22,23,47,48,87,88]; title: ; notranslate\" title=\"\">\r\nconst uint8_t PROGMEM digital_pin_to_port_PGM&#x5B;] = {\r\nPD, \/* 0 *\/\r\nPD,\r\nPD,\r\nPD,\r\nPD,\r\nPD,\r\nPD,\r\nPD,\r\nPB, \/* 8 *\/\r\nPB,\r\nPB,\r\nPB,\r\nPB,\r\nPB,\r\nPC, \/* 14 *\/\r\nPC,\r\nPC,\r\nPC,\r\nPC,\r\nPC,\r\nPB, \/* 20 *\/\r\nPB, \/* 21 *\/\r\n};\r\n\r\nconst uint8_t PROGMEM digital_pin_to_bit_mask_PGM&#x5B;] = {\r\n_BV(0), \/* 0, port D *\/\r\n_BV(1),\r\n_BV(2),\r\n_BV(3),\r\n_BV(4),\r\n_BV(5),\r\n_BV(6),\r\n_BV(7),\r\n_BV(0), \/* 8, port B *\/\r\n_BV(1),\r\n_BV(2),\r\n_BV(3),\r\n_BV(4),\r\n_BV(5),\r\n_BV(0), \/* 14, port C *\/\r\n_BV(1),\r\n_BV(2),\r\n_BV(3),\r\n_BV(4),\r\n_BV(5),\r\n_BV(6), \/* 20 port B *\/\r\n_BV(7), \/* 21 port B *\/\r\n};\r\n\r\nconst uint8_t PROGMEM digital_pin_to_timer_PGM&#x5B;] = {\r\nNOT_ON_TIMER, \/* 0 - port D *\/\r\nNOT_ON_TIMER,\r\nNOT_ON_TIMER,\r\n\/\/ on the ATmega168, digital pin 3 has hardware pwm\r\n#if defined(__AVR_ATmega8__)\r\nNOT_ON_TIMER,\r\n#else\r\nTIMER2B,\r\n#endif\r\nNOT_ON_TIMER,\r\n\/\/ on the ATmega168, digital pins 5 and 6 have hardware pwm\r\n#if defined(__AVR_ATmega8__)\r\nNOT_ON_TIMER,\r\nNOT_ON_TIMER,\r\n#else\r\nTIMER0B,\r\nTIMER0A,\r\n#endif\r\nNOT_ON_TIMER,\r\nNOT_ON_TIMER, \/* 8 - port B *\/\r\nTIMER1A,\r\nTIMER1B,\r\n#if defined(__AVR_ATmega8__)\r\nTIMER2,\r\n#else\r\nTIMER2A,\r\n#endif\r\nNOT_ON_TIMER,\r\nNOT_ON_TIMER,\r\nNOT_ON_TIMER,\r\nNOT_ON_TIMER, \/* 14 - port C *\/\r\nNOT_ON_TIMER,\r\nNOT_ON_TIMER,\r\nNOT_ON_TIMER,\r\nNOT_ON_TIMER,\r\nNOT_ON_TIMER, \/* 20 *\/\r\nNOT_ON_TIMER, \/* 21 *\/\r\n};\r\n#endif\r\n\r\n<\/pre>\n<p>(3) \u30dc\u30fc\u30c9\u306e\u5b9a\u7fa9\u3092\u8ffd\u52a0\u3059\u308b<\/p>\n<p>boards.txt\u306b\u4ee5\u4e0b\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\nRCduino.name=RCduino \/ atmega328p\r\n\r\nRCduino.upload.protocol=stk500\r\nRCduino.upload.maximum_size=30720\r\nRCduino.upload.speed=57600\r\n\r\nRCduino.bootloader.low_fuses=0xf2\r\nRCduino.bootloader.high_fuses=0xda\r\nRCduino.bootloader.path=atmega\r\nRCduino.bootloader.file=ATmegaBOOT_168_atmega328_rc_8MHz.hex\r\nRCduino.bootloader.unlock_bits=0x3F\r\nRCduino.bootloader.lock_bits=0x0F\r\n\r\nRCduino.build.mcu=atmega328p\r\nRCduino.build.f_cpu=8000000L\r\nRCduino.build.core=RCduino\r\n\r\n<\/pre>\n<h2>3. \u5229\u7528\u3059\u308b<\/h2>\n<p>(1) Arduino\u306e\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u306e\u8a2d\u5b9a<br \/>\n\u4e88\u3081\u3001\u5229\u7528\u3059\u308bArduino\u306eMega328\u306b\u306fRC\u767a\u632f\u7528\u306e\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u3092\u66f8\u304d\u8fbc\u3093\u3067\u304a\u3044\u3066\u4e0b\u3055\u3044\u3002<\/p>\n<p>RC\u767a\u632f\u7528\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u306f\u4f8b\u3048\u3070<a href=\"http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/09\/ATmegaBOOT_168_atmega328_rc_8MHz.hex\">\u3053\u3093\u306a\u7269<\/a>\u3067\u3059\u3002<br \/>\n\u307e\u305f\u3001\u30d2\u30e5\u30fc\u30ba\u30d3\u30c3\u30c8\u306e\u8a2d\u5b9a\u3082\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\nHFUSE = DA\r\nLFUSE = F2\r\nEFUSE = 05\r\n<\/pre>\n<p>(2) Arduino IDE<br \/>\nArduino IDE\u3092\u7acb\u3061\u4e0a\u3052\u306a\u304a\u3059\u3068\u3001\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u3067RCduino\u304c\u9078\u629e\u3067\u304d\u307e\u3059\u3002<br \/>\n\u30b9\u30b1\u30c3\u30c1\u306e\u4e2d\u304b\u3089\u3001PB6\/PB7\u3092PORT20\/PORT21\u3068\u3057\u3066\u5229\u7528\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u30dd\u30fc\u30c8\u3092\u5c11\u3057\u3067\u3082\u591a\u304f\u5229\u7528\u3057\u305f\u3044\u5834\u5408\u3001\u914d\u7f6e\u306e\u90fd\u5408\u3067\u3069\u3046\u3057\u3066\u3082PB6\/PB7\u3092\u5229\u7528\u3057\u305f\u3044\u5834\u5408\u306b\u306f\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<p><div class=\"note\"><div class=\"notewarning\"><br \/>\n\u4e00\u822c\u306b\u8ca9\u58f2\u3055\u308c\u3066\u3044\u308bArduino\u3067\u306fPB6\/PB7\u306b\u30af\u30ea\u30b9\u30bf\u30eb\u304c\u63a5\u7d9a\u3055\u308c\u3066\u3044\u3066\u5229\u7528\u51fa\u6765\u307e\u305b\u3093\u3002\u30af\u30ea\u30b9\u30bf\u30eb\u3092\u53d6\u308a\u9664\u304f\u5fc5\u8981\u304c\u6709\u308a\u307e\u3059\u3002<br \/>\n<\/div><\/div><\/p>\n<p>7segduino\u306e\u5c0f\u578b\u7248\u306f\u306a\u308b\u3079\u304f7\u30bb\u30b0\u30e1\u30f3\u30c8\u30e6\u30cb\u30c3\u30c8\u306e\u30d4\u30f3\u306b\u8fd1\u3044\u4f4d\u7f6e\u306eAVR\u306e\u30d4\u30f3\u3092\u5272\u308a\u5f53\u3066\u305f\u304b\u3063\u305f\u305f\u3081\u3001PB6,PB7\u3082\u4f7f\u3048\u308bRCduino\u3092\u63a1\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<div id=\"attachment_168\" style=\"width: 410px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/09\/IMGP5405.jpg\"><img aria-describedby=\"caption-attachment-168\" loading=\"lazy\" class=\"size-medium wp-image-168\" title=\"7segduino mini\" src=\"http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/09\/IMGP5405-400x266.jpg\" alt=\"7segduino mini\" width=\"400\" height=\"266\" srcset=\"http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/09\/IMGP5405-400x266.jpg 400w, http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/09\/IMGP5405.jpg 1024w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/a><p id=\"caption-attachment-168\" class=\"wp-caption-text\">7segduino mini<\/p><\/div>\n<h2>4. \u30ea\u30f3\u30af<\/h2>\n<p>\u3053\u3061\u3089\u306e\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u3067\u8a66\u3057\u3066\u9802\u304d\u307e\u3057\u305f\u3002<\/p>\n<p id=\"sites-page-title-header\"><a href=\"http:\/\/arduino.densikit.com\/home\/geki-yasu-arduino\"><span id=\"sites-page-title\" dir=\"ltr\">\u6fc0\u5b89Arduino<\/span><\/a><\/p>\n<p><a href=\"http:\/\/swikis.ddo.jp\/WorldStethoscope\/48\">NanoBoardAG\u30672\u3064\u306e\u30e2\u30fc\u30bf\u30fc\u3092\u4f7f\u3046\u65b9\u6cd5@WorldStethoscope Swiki<\/a><\/p>\n<p><a href=\"http:\/\/chum-up.blogspot.jp\/2012\/07\/arduino-100-nanoboardag2.html\">\u6db5\u990a\u587e\u3000arduino 1.0.1 \u3067\u3000NanoBoardAG\u30672\u3064\u306e\u30e2\u30fc\u30bf\u30fc\u3092\u4f7f\u3046\u65b9\u6cd5<\/a><\/p>\n<p>Arduino 1.0\u3067\u3082\u540c\u69d8\u306e\u6539\u9020\u3067\u52d5\u4f5c\u3059\u308b\u69d8\u3067\u3059\u3002<\/p>\n<p>\u304a\u8a66\u3057\u3042\u308c\u3002<!--:--><!--:en--><\/p>\n<h1>RCduino<\/h1>\n<div id=\"attachment_167\" style=\"width: 410px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/09\/IMGP5294.jpg\"><img aria-describedby=\"caption-attachment-167\" loading=\"lazy\" class=\"size-medium wp-image-167\" title=\"RCduino LED\" src=\"http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/09\/IMGP5294-400x265.jpg\" alt=\"RCduino\u3067PB6\/PB7(Port20\/21)\u306bLED\u3092\u63a5\u7d9a\" width=\"400\" height=\"265\" srcset=\"http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/09\/IMGP5294-400x265.jpg 400w, http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/09\/IMGP5294.jpg 1024w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/a><p id=\"caption-attachment-167\" class=\"wp-caption-text\">RCduino\u3067Port20\/21\u306bLED\u3092\u63a5\u7d9a<\/p><\/div>\n<p>RCduino\u3068\u3044\u3046\u547c\u3073\u540d\u306f\u30dc\u30fc\u30c9\u306e\u540d\u524d\u3067\u306f\u306a\u304f\u3001Arduino  IDE\u306e\u8a8d\u8b58\u3059\u308bArduino\u306e\u30b3\u30a2\uff08\u30bd\u30d5\u30c8\u30a6\u30a8\u30a2\uff09\u306e\u540d\u79f0\u3067\u3059\u3002RCduino\u306f\u5185\u90e8RC\u767a\u4fe1\u5668\u3067\u52d5\u4f5c\u3055\u305b\u308b\u3053\u3068\u3067\u3001\u3053\u308c\u307e\u3067\u306eArduino\u306e\u6a5f\u80fd \u306b\u52a0\u3048\u3066\u3001PB6\/PB7\u304c\u30c7\u30b8\u30bf\u30eb20\/21\u30d4\u30f3\u3068\u3057\u3066\u4f7f\u3048\u307e\u3059\u3002<\/p>\n<p>\u8868\u7d19\u306e\u5199\u771f\u306fEMSL\u306eDiavolino\u3068\u3044\u3046\u4e92\u63db\u6a5f\u57fa\u677f\u306e\u30af\u30ea\u30b9\u30bf\u30eb\u306e\u7aef\u5b50\u306b\u30d4\u30f3\u30b3\u30cd\u30af\u30bf\u3092\u4ed8\u3051\u3066\u5b9f\u9a13\u3092\u3057\u3066\u3044\u308b\u3068\u3053\u308d\u3067\u3059\u3002LED\u306e\u70b9\u6ec5\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<h2>1. \u306f\u3058\u3081\u306b<\/h2>\n<p>Arduino\u306f\u30af\u30ed\u30c3\u30af\u3068\u3057\u3066\u6c34\u6676\u767a\u4fe1\u5668\u307e\u305f\u306f\u30bb\u30e9\u30ed\u30c3\u30af\u3092\u4f7f\u3046\u306e\u304c\u4e00\u822c\u7684\u3067\u3059\u3002\u30b3\u30b9\u30c8\u3092\u4e0b\u3052\u308b\u305f\u3081\u3001AVR\u5185\u8535\u306eRC\u767a\u4fe1\u5668\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002\u4f8b\u3048\u3070\u3001\u5b66\u7814\u306e\u5927\u4eba\u306e\u79d1\u5b66\u4ed8\u9332\u306e\u300cJapanino\u300d\u306f\u5916\u90e8\u767a\u4fe1\u5668\u3092\u6301\u3063\u3066\u3044\u308b\u306b\u3082\u95a2\u308f\u3089\u305a\u3001\u521d\u671f\u8a2d\u5b9a\u3067\u306f\u5185\u90e8\u767a\u632f\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u305d\u308c\u3067\u3082\u6b63\u5e38\u306b\u52d5\u4f5c\u3057\u307e\u3059\u3002<br \/>\nRC\u767a\u632f\u306e\u5834\u5408\u306b\u306f\u3001\u52d5\u4f5c\u30af\u30ed\u30c3\u30af\u304c8Mhz\u306b\u306a\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u767a\u632f\u5468\u6ce2\u6570\u306e\u7cbe\u5ea6\u304c\u60aa\u304f\u306a\u3063\u305f\u308a\u3001\u6e29\u5ea6\u7279\u6027\u304c\u60aa\u5316\u3057\u305f\u308a\u3044\u308d\u3044\u308d\u3068\u5236\u9650\u304c\u3042\u308a\u307e\u3059\u3002 7segduino\u3082\u57fa\u672c\u56de\u8def\u3068\u3057\u3066RC\u767a\u632f\u3092\u63a1\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>7segduino\u306e\u5c0f\u578b\u7248\u3092\u4f5c\u6210\u9014\u4e2d\u3067\u3001RCduino\u3068\u3044\u3046\u30a2\u30a4\u30c7\u30a2\u3092\u601d\u3044\u3064\u304d\u307e\u3057\u305f\u3002\u5185\u8535\u306eRC\u767a\u632f\u5668\u3092\u4f7f\u3046\u5834\u5408\u3001\u6c34\u6676\u767a\u632f\u5668\u3092\u3064\u306a\u3044\u3067\u3044\u305f\u7aef\u5b50(PB6\/PB7)\u3082\u6d3b\u7528\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002\u73fe\u5728\u306eArduino\u3067\u306f\u3001\u30e6\u30fc\u30b6\u30d7\u30ed\u30b0\u30e9\u30e0\u304b\u3089PB6\/PB7\u3092\u4f7f\u3046\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u304c\u3001\u30e9\u30a4\u30d6\u30e9\u30ea\u306a\u3069\u306f\u305d\u306e\u307e\u307e\u5229\u7528\u51fa\u6765\u307e\u305b\u3093\u3002\u305d\u3053\u3067\u3001Arduino\u306e\u30b3\u30a2\u3092\u62e1\u5f35\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<h2>2. \u62e1\u5f35\u3059\u308b<\/h2>\n<p>RCduino\u3068\u3044\u3046\u540d\u79f0\u3067\u65b0\u3057\u3044Arduino\u306e\u30b3\u30a2\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002\u3068\u306f\u3044\u3063\u3066\u3082\u3001\uff12\u30d4\u30f3\u3092\u65b0\u3057\u304f\u5b9a\u7fa9\u3059\u308b\u3060\u3051\u306a\u306e\u3067\u975e\u5e38\u306b\u7c21\u5358\u3067\u3059\u3002\u3053\u306e\u62e1\u5f35\u3092\u884c\u3046\u3053\u3068\u3067\u3001\u30c7\u30b8\u30bf\u30eb\u30d4\u30f3\u304c\uff12\u672c\u8ffd\u52a0\u306b\u306a\u308a\u307e\u3059\u3002\u62e1\u5f35\u65b9\u6cd5\u306f\u6b21\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<p>\u30b3\u30a2\u3092\u62e1\u5f35\u3059\u308b<br \/>\n(1) hardware\/arduino\/cores\/arduino\u3092\u30b3\u30d4\u30fc\u3057\u3066\u5225\u306e\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<br \/>\nhardware\/arduino\/cores\/RCduino<\/p>\n<p>(2) \u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306bPB6\/PB7\u306e\u5b9a\u7fa9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<br \/>\npins_arduino.c\u306e\u6700\u5f8c\u306e\u90e8\u5206\u306b\u4ee5\u4e0b\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: cpp; highlight: [22,23,47,48,87,88]; title: ; notranslate\" title=\"\">\r\nconst uint8_t PROGMEM digital_pin_to_port_PGM&#x5B;] = {\r\nPD, \/* 0 *\/\r\nPD,\r\nPD,\r\nPD,\r\nPD,\r\nPD,\r\nPD,\r\nPD,\r\nPB, \/* 8 *\/\r\nPB,\r\nPB,\r\nPB,\r\nPB,\r\nPB,\r\nPC, \/* 14 *\/\r\nPC,\r\nPC,\r\nPC,\r\nPC,\r\nPC,\r\nPB, \/* 20 *\/\r\nPB, \/* 21 *\/\r\n};\r\n\r\nconst uint8_t PROGMEM digital_pin_to_bit_mask_PGM&#x5B;] = {\r\n_BV(0), \/* 0, port D *\/\r\n_BV(1),\r\n_BV(2),\r\n_BV(3),\r\n_BV(4),\r\n_BV(5),\r\n_BV(6),\r\n_BV(7),\r\n_BV(0), \/* 8, port B *\/\r\n_BV(1),\r\n_BV(2),\r\n_BV(3),\r\n_BV(4),\r\n_BV(5),\r\n_BV(0), \/* 14, port C *\/\r\n_BV(1),\r\n_BV(2),\r\n_BV(3),\r\n_BV(4),\r\n_BV(5),\r\n_BV(6), \/* 20 port B *\/\r\n_BV(7), \/* 21 port B *\/\r\n};\r\n\r\nconst uint8_t PROGMEM digital_pin_to_timer_PGM&#x5B;] = {\r\nNOT_ON_TIMER, \/* 0 - port D *\/\r\nNOT_ON_TIMER,\r\nNOT_ON_TIMER,\r\n\/\/ on the ATmega168, digital pin 3 has hardware pwm\r\n#if defined(__AVR_ATmega8__)\r\nNOT_ON_TIMER,\r\n#else\r\nTIMER2B,\r\n#endif\r\nNOT_ON_TIMER,\r\n\/\/ on the ATmega168, digital pins 5 and 6 have hardware pwm\r\n#if defined(__AVR_ATmega8__)\r\nNOT_ON_TIMER,\r\nNOT_ON_TIMER,\r\n#else\r\nTIMER0B,\r\nTIMER0A,\r\n#endif\r\nNOT_ON_TIMER,\r\nNOT_ON_TIMER, \/* 8 - port B *\/\r\nTIMER1A,\r\nTIMER1B,\r\n#if defined(__AVR_ATmega8__)\r\nTIMER2,\r\n#else\r\nTIMER2A,\r\n#endif\r\nNOT_ON_TIMER,\r\nNOT_ON_TIMER,\r\nNOT_ON_TIMER,\r\nNOT_ON_TIMER, \/* 14 - port C *\/\r\nNOT_ON_TIMER,\r\nNOT_ON_TIMER,\r\nNOT_ON_TIMER,\r\nNOT_ON_TIMER,\r\nNOT_ON_TIMER, \/* 20 *\/\r\nNOT_ON_TIMER, \/* 21 *\/\r\n};\r\n#endif\r\n\r\n<\/pre>\n<p>(3) \u30dc\u30fc\u30c9\u306e\u5b9a\u7fa9\u3092\u8ffd\u52a0\u3059\u308b<\/p>\n<p>boards.txt\u306b\u4ee5\u4e0b\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\nRCduino.name=RCduino \/ atmega328p\r\n\r\nRCduino.upload.protocol=stk500\r\nRCduino.upload.maximum_size=30720\r\nRCduino.upload.speed=57600\r\n\r\nRCduino.bootloader.low_fuses=0xf2\r\nRCduino.bootloader.high_fuses=0xda\r\nRCduino.bootloader.path=atmega\r\nRCduino.bootloader.file=ATmegaBOOT_168_atmega328_rc_8MHz.hex\r\nRCduino.bootloader.unlock_bits=0x3F\r\nRCduino.bootloader.lock_bits=0x0F\r\n\r\nRCduino.build.mcu=atmega328p\r\nRCduino.build.f_cpu=8000000L\r\nRCduino.build.core=RCduino\r\n\r\n<\/pre>\n<h2>3. \u5229\u7528\u3059\u308b<\/h2>\n<p>(1) Arduino\u306e\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u306e\u8a2d\u5b9a<br \/>\n\u4e88\u3081\u3001\u5229\u7528\u3059\u308bArduino\u306eMega328\u306b\u306fRC\u767a\u632f\u7528\u306e\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u3092\u66f8\u304d\u8fbc\u3093\u3067\u304a\u3044\u3066\u4e0b\u3055\u3044\u3002<\/p>\n<p>RC\u767a\u632f\u7528\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u306f\u4f8b\u3048\u3070<a href=\"http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/09\/ATmegaBOOT_168_atmega328_rc_8MHz.hex\">\u3053\u3093\u306a\u7269<\/a>\u3067\u3059\u3002<br \/>\n\u307e\u305f\u3001\u30d2\u30e5\u30fc\u30ba\u30d3\u30c3\u30c8\u306e\u8a2d\u5b9a\u3082\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\nHFUSE = DA\r\nLFUSE = F2\r\nEFUSE = 05\r\n<\/pre>\n<p>(2) Arduino IDE<br \/>\nArduino IDE\u3092\u7acb\u3061\u4e0a\u3052\u306a\u304a\u3059\u3068\u3001\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u3067RCduino\u304c\u9078\u629e\u3067\u304d\u307e\u3059\u3002<br \/>\n\u30b9\u30b1\u30c3\u30c1\u306e\u4e2d\u304b\u3089\u3001PB6\/PB7\u3092PORT20\/PORT21\u3068\u3057\u3066\u5229\u7528\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u30dd\u30fc\u30c8\u3092\u5c11\u3057\u3067\u3082\u591a\u304f\u5229\u7528\u3057\u305f\u3044\u5834\u5408\u3001\u914d\u7f6e\u306e\u90fd\u5408\u3067\u3069\u3046\u3057\u3066\u3082PB6\/PB7\u3092\u5229\u7528\u3057\u305f\u3044\u5834\u5408\u306b\u306f\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<p><div class=\"note\"><div class=\"notewarning\"><br \/>\n\u4e00\u822c\u306b\u8ca9\u58f2\u3055\u308c\u3066\u3044\u308bArduino\u3067\u306fPB6\/PB7\u306b\u30af\u30ea\u30b9\u30bf\u30eb\u304c\u63a5\u7d9a\u3055\u308c\u3066\u3044\u3066\u5229\u7528\u51fa\u6765\u307e\u305b\u3093\u3002\u30af\u30ea\u30b9\u30bf\u30eb\u3092\u53d6\u308a\u9664\u304f\u5fc5\u8981\u304c\u6709\u308a\u307e\u3059\u3002<br \/>\n<\/div><\/div><\/p>\n<p>7segduino\u306e\u5c0f\u578b\u7248\u306f\u306a\u308b\u3079\u304f7\u30bb\u30b0\u30e1\u30f3\u30c8\u30e6\u30cb\u30c3\u30c8\u306e\u30d4\u30f3\u306b\u8fd1\u3044\u4f4d\u7f6e\u306eAVR\u306e\u30d4\u30f3\u3092\u5272\u308a\u5f53\u3066\u305f\u304b\u3063\u305f\u305f\u3081\u3001PB6,PB7\u3082\u4f7f\u3048\u308bRCduino\u3092\u63a1\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<div id=\"attachment_168\" style=\"width: 410px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/09\/IMGP5405.jpg\"><img aria-describedby=\"caption-attachment-168\" loading=\"lazy\" class=\"size-medium wp-image-168\" title=\"7segduino mini\" src=\"http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/09\/IMGP5405-400x266.jpg\" alt=\"7segduino mini\" width=\"400\" height=\"266\" srcset=\"http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/09\/IMGP5405-400x266.jpg 400w, http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/09\/IMGP5405.jpg 1024w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/a><p id=\"caption-attachment-168\" class=\"wp-caption-text\">7segduino mini<\/p><\/div>\n<p>\u304a\u8a66\u3057\u3042\u308c\u3002<!--:--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>RCduino RCduino\u3068\u3044\u3046\u547c\u3073\u540d\u306f\u30dc\u30fc\u30c9\u306e\u540d\u524d\u3067\u306f\u306a\u304f\u3001Arduino IDE\u306e\u8a8d\u8b58\u3059\u308bArduino\u306e\u30b3\u30a2\uff08\u30bd\u30d5\u30c8\u30a6\u30a8\u30a2\uff09\u306e\u540d\u79f0\u3067\u3059\u3002RCduino\u306f\u5185\u90e8RC\u767a\u4fe1\u5668\u3067\u52d5\u4f5c\u3055\u305b\u308b\u3053\u3068\u3067\u3001\u3053\u308c\u307e\u3067\u306eArduino [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":26,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/morecatlab.akiba.coocan.jp\/lab\/index.php\/wp-json\/wp\/v2\/pages\/161"}],"collection":[{"href":"http:\/\/morecatlab.akiba.coocan.jp\/lab\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/morecatlab.akiba.coocan.jp\/lab\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/morecatlab.akiba.coocan.jp\/lab\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/morecatlab.akiba.coocan.jp\/lab\/index.php\/wp-json\/wp\/v2\/comments?post=161"}],"version-history":[{"count":24,"href":"http:\/\/morecatlab.akiba.coocan.jp\/lab\/index.php\/wp-json\/wp\/v2\/pages\/161\/revisions"}],"predecessor-version":[{"id":800,"href":"http:\/\/morecatlab.akiba.coocan.jp\/lab\/index.php\/wp-json\/wp\/v2\/pages\/161\/revisions\/800"}],"up":[{"embeddable":true,"href":"http:\/\/morecatlab.akiba.coocan.jp\/lab\/index.php\/wp-json\/wp\/v2\/pages\/26"}],"wp:attachment":[{"href":"http:\/\/morecatlab.akiba.coocan.jp\/lab\/index.php\/wp-json\/wp\/v2\/media?parent=161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}