²óž·×Àß·×´ë²è³µÍ×Æþ¼ê¤·¤¿¥Õ¥é¥¤¥¹Èפϡ¢¼ç¼´²óž®ÅÙ¤¬Ê¬¤«¤ê¤Þ¤»¤ó¡£¤Ê¤Î¤Ç¡¢²óž·×¤òºî¤ë¤³¤È¤Ë¤·¤Þ¤¹¡£ ¥Û¡¼¥ë¥»¥ó¥µ¡¼IC¤Ç¼ç¼´¥×¡¼¥ê¡¼¤Î²óž¤ò¸¡½Ð¤·¡¢7Seg LED¤Ëɽ¼¨¤¹¤ë¤³¤È¤Ë¤·¤Þ¤¹¡£ ¥Õ¥é¥¤¥¹ÈפʤΤǡ¢1Ëürpm¤Þ¤Ç·×¬¤Ç¤¤ë¤è¤¦¤Ë¤¹¤ë¤Î¤Ç¡¢5·åɽ¼¨¤È¤·¤Þ¤¹¡£ ²óÏ©Àß·×PIC¤ò»È¤Ã¤Æºî¤ë¤³¤È¤ò¹Í¤¨¤Þ¤¹¡£ 7Seg LED¤ò5·å¥À¥¤¥Ê¥ß¥Ã¥¯ÅÀÅô¤µ¤»¤ë¤¿¤á¤Ë¤Ï¡¢¥»¥°¥á¥ó¥ÈÀ©¸æ¤¬7ËܤÈ+·åÀ©¸æ¤Î5ËÜ = ¹ç·×12ËܤνÐÎϤ¬É¬ÍפȤʤê¤Þ¤¹¡£ ÆþÎϤϡ¢¥Û¡¼¥ë¥»¥ó¥µ¡¼IC¤À¤±¤Ê¤Î¤Ç¡¢1ËܤǤê¤Þ¤¹¡£ ÀºÅ٤Τ¿¤á¡¢³°Éô¿å¾½È¯¿¶¤ò»È¤Ã¤Æ¤â¡¢18¥Ô¥ó¤Ç¤ê¤Þ¤¹¡£ ¥¹¥È¥Ã¥¯¤·¤Æ¤¢¤ëPIC16F628A¤Ç½½Ê¬¤È¤¤¤¦¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡£ ¥Û¡¼¥ë¥»¥ó¥µ¡¼IC¤«¤é¤ÎÆþÎϤò³ä¤ê¹þ¤ß¤Ç½¦¤¦¤¿¤á¡¢¥Û¡¼¥ë¥»¥ó¥µ¡¼¤ÏRB0/INT¤ËÀܳ¤µ¤ì¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ PIC16F628A¤Ç³°Éôȯ¿¶´ï¤ò»È¤¦¤È¡¢RA6¤ÈRA7¤ÏCLK¤Ë¤Ê¤ê¡¢½ÐÎϤˤϻÈÍѤǤ¤Þ¤»¤ó¡£RA5/MCLR/VPP¤Ï¡¢ICSP¤Ç»ÈÍѤ·¤Þ¤¹¡£ ¤è¤Ã¤Æ¡¢RB1¡Á7¤Ç¥»¥°¥á¥ó¥È¤òÀ©¸æ¤·¡¢RA0¡ÁRA4¤Ç·åÀ©¸æ¤ò¤¹¤ë¤Î¤¬¼«Á³¤Ç¤¹¡£PIC16F628A¤Ï¡¢RA4¤¬¥ª¡¼¥×¥ó¥É¥ì¥¤¥ó¤Ê¤Î¤Ç¡¢¥×¥ë¥¢¥Ã¥×¤·¤Þ¤¹¡£ 7¥»¥°LED¤Ï¡¢¥«¥½¡¼¥É¥³¥â¥ó¤¬¥¹¥È¥Ã¥¯¤·¤Æ¤¢¤ë¤Î¤Ç¡¢¥É¥é¥¤¥ÖTR¤Ï¤³¤ì¤â¥¹¥È¥Ã¥¯¤Î2SC1815¤È¤·¤Þ¤¹¡£ ÅŸ»¤Ï5V¥¹¥¤¥Ã¥Á¥ó¥°AC¥¢¥À¥×¥¿¡¼¤ò»ÈÍѤ¹¤ë¤Î¤Ç¡¢LED¤ÎÅÅήÀ©¸ÂÄñ¹³¤Ï220¦¸¡¢TR¤Î¥Ù¡¼¥¹¤Ï¼ê»ý¤Á47k¦¸¤Ç¥É¥é¥¤¥Ö¤¹¤ë¤³¤È¤Ë¤·¤Þ¤¹¡£ ȯ¿¶´ï¤Ï¡¢¥¹¥È¥Ã¥¯ÉôÉʤ¬Ìµ¤¤¤Î¤Ç¡¢½©·î¤Ç¤Ä¤Ê¤°¤À¤±¤Çȯ¿¶¤¹¤ë11.776MHz¤Î3ËÜ¿徽¤ò¹ØÆþ¤·¤Þ¤·¤¿¡£¥¹¥È¥Ã¥¯¤È¤·¤Æ2¥Ñ¥Ã¥¯Ç㤤¤Þ¤·¤¿¡£ ¥½¥Õ¥È¥¦¥§¥¢À߷ײ󞼫ÂΤϡ¢¥Û¡¼¥ë¥»¥ó¥µ¡¼¤«¤é¥Ñ¥ë¥¹¤È¤·¤ÆÆÀ¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¤«¤éÁ´¤¯ÌäÂê¤Ï¤¢¤ê¤Þ¤»¤ó¡£ ²óž¿ô¤ËÊÑ´¹¤¹¤ë¤Ë¤Ï¡¢°ìÄê»þ´Ö¤Î¥Ñ¥ë¥¹¿ô¤ò¥«¥¦¥ó¥È¤¹¤ëÊýË¡(ľÀܷ׿ôÊý¼°)¤È¡¢È¯À¸¤¹¤ë¥Ñ¥ë¥¹´Ö¤Î»þ´Ö¤ò·×¬¤¹¤ëÊýË¡(¥ì¥·¥×¥í¥«¥ëÊý¼°)¤¬¹Í¤¨¤é¤ì¤Þ¤¹¡£ ľÀܷ׿ôÊý¼°¤Ç¤Ï¡¢·×¬»þ´Ö¤è¤ê¤â¥Ñ¥ë¥¹´Ö³Ö¤¬¹¤¯¤Ê¤ë¤È·×¬¤Ç¤¤Þ¤»¤ó¤«¤éÄ㮲󞤬¬¤ì¤Ê¤¤¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡£°ìÊý¡¢¥ì¥·¥×¥í¥«¥ëÊý¼°¤Ç¤Ï¡¢»þ´Ö·×¬¤Îʬ²òǽ¤Î¸Â³¦¤¬·×¬²Äǽ¤ÊºÇÂç²óž¿ô¤Ë¤Ê¤ê¤Þ¤¹¡£ ľÀܷ׿ôÊý¼°¤Ç·×¬»þ´Ö¤ò0.5ÉäȤ¹¤ë¤È¡¢0.5ÉäÇ1²óž¤¹¤ë²óž¿ô¡¢¤¹¤Ê¤ï¤Á120rpm°Ê²¼¤ËÂбþ¤¹¤ë¤Î¤¬ÂçÊѤˤʤê¤Þ¤¹¡£ ÃÙ¤¤»þ¤Ë·×¬»þ´Ö¤ò±ä¤Ð¤¹¤È¤«¤¹¤ì¤Ð¤Ç¤¤Þ¤¹¤¬¡¦¡¦¡¦ ¥ì¥·¥×¥í¥«¥ëÊý¼°¤Ç¤Ï¡¢PIC¤Ç11.776MHz¤Î¥¯¥í¥Ã¥¯¤È¤·¤¿¾ì¹ç¡¢INT³ä¤ê¹þ¤ß¤Î´Ö³Ö¤ò·×¬¤Ç¤¤ëºÇ¾¯¤Î¼þ´ü¤Ï¡¢Fosc/4 = 11.776MHz/4 = 2.944*10^6 Hz¤È¤Ê¤ê¤Þ¤¹¡£ r(rpm)¤Î¤È¤¡¢1²óž¤Î½êÍ×»þ´Ö¤Ï60/rÉäǤ¢¤ê¡¢r+1(rpm)¤È¤Î½êÍ×»þ´Öº¹¤¬ºÇÂçʬ²òǽùt(=1/(2.944*10^6)¤È¤Ê¤ë²óž¿ô¤Þ¤Ç1rpm¤Îº¹¤òÊá¤é¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¤Î¤Ç¡¢ 60 60 1 ¡½ - ¡½¡½ = ¡½¡½ ¤È¤Ê¤ër¤òµá¤á¤ë¤È¡¢ r r+1 ùt r^2 + r - 60*ùt = 0; ùt¤Ï½½Ê¬¤ËÂ礤¤¤Î¤Ç¡¢r¤Ï¤ª¤è¤½¢å(60*ùt) = 13290rpm¤È¤Ê¤ê¤Þ¤¹¡£ ¤³¤Î¸¡Æ¤¤«¤é¡¢¥ì¥·¥×¥í¥«¥ëÊý¼°¤Ç¹Ô¤¯¤³¤È¤Ë¤·¤Þ¤¹¡£ ʸ¸¥Ä´ºº¥Í¥Ã¥È¤Ç¤¤¤í¤¤¤íÄ´¤Ù¤Æ¤ß¤ë¤È¡¢¼Ì¿¿¤Ç¸«¤ë¹©ºî¼¼¤µ¤ó¤¬´ðËÜ¡¢Á´¤¯Æ±¤¸¥í¥¸¥Ã¥¯¤Ç²óž·×¤òºîÀ®¤·¤Æ¤¤¤Þ¤·¤¿¡£ Â礤¤Ë»²¹Í¤Ë¤µ¤»¤Æ¤¤¤¿¤À¤¤Þ¤·¤¿¡£ À©ºî¥Ï¡¼¥É¥¦¥§¥¢½©·î¤Î»æ¥¨¥Ý¤Î¾®¤µ¤¤¥æ¥Ë¥Ð¡¼¥µ¥ë´ðÈפˡ¢¥Ý¥ê¥¦¥ì¥¿¥óÀþ¤ÇÇÛÀþ¤·ºîÀ®¤·¤Þ¤·¤¿¡£¤Á¤ç¤¦¤ÉLED¤¬5·åºÜ¤ê¤Þ¤·¤¿¡£ ¥Ý¥ê¥¦¥ì¥¿¥óÀþ¤Ç¤ÎÇÛÀþ¤Ï¡¢Èïʤ¤¬ÍϤ±¤ë¤Þ¤ÇȾÅĤòÇ®¤·¤Æ¤ª¤¯É¬Íפ¬¤¢¤ê¤Þ¤¹¤¬¡¢Ç®¤·¤¹¤®¤ë¤È¥é¥ó¥É¤¬Çí¤¬¤ì¤ë¤Î¤Ç¤Á¤ç¤Ã¤È¤À¤±´·¤ì¤¬É¬Íפ«¤â¤·¤ì¤Þ¤»¤ó¡£ °ìÊý¤Ç¡¢ÇÛÀþ¤ò¼«Í³¤Ë¸òº¹¤µ¤»¤é¤ì¤ë¤Î¤Ç¡¢ÉôÉʤÎÇÛÃ֤ϼ«Í³¤Ê¤Î¤Ç¡¢¥Ñ¥¿¡¼¥óÀ߷פϾÊά¤·¤Æ¡¢²óÏ©¿Þį¤á¤Æ¤Ê¤ó¤È¤Ê¤¯ÉôÉʤòÇÛÃÖ¤·¤Æ¤âºî¤ì¤Þ¤¹¡£ ÅŸ»¤È¥»¥ó¥µ¡¼¤Ø¤ÎÀܳ¤Ï¡¢¥³¥Í¥¯¥¿¤Ç¤Ï¤Ê¤¯¥Ô¥ó¥Ø¥Ã¥À¤òΩ¤Æ¤Æ¤Ï¤ó¤ÀÉÕ¤±¡£±¦²¼¤Î¥Ô¥ó¥Ø¥Ã¥À¤ÏICSP¤Ç¤¹¡£Àܳ¤·¤Ê¤¤ICSP¤ÎVcc¤Ï¡¢¥Ô¥ó¤òÀÚÃǤ·¤ÆÀܳ»þ¤ÎÊý¸þ»Ø¼¨¤Ë¤·¤Æ¤¤¤Þ¤¹¡£ ¥½¥Õ¥È¥¦¥§¥¢¥Õ¥ê¡¼¤Ç»È¤¨¤ë HITEC PICC Lite¤ÇºîÀ®¤·¤Þ¤·¤¿¡£ »ä¤Î¥Æ¥ó¥×¥ì¡¼¥È¤Ï¡¢³Æ¥ì¥¸¥¹¥¿¤ÎÀâÌÀ¤¬½ñ¤¹þ¤ó¤Ç¤¢¤ê¤Þ¤¹¡£ Åö½é¡¢·åʬ³ä¤òTMR0³ä¤ê¹þ¤ß¤ÎÃæ¤Ç¹Ô¤Ã¤Æ¤·¤Þ¤Ã¤Æ¤Þ¤È¤â¤ËÆ°ºî¤·¤Ê¤«¤Ã¤¿¤Î¤Ç¤¹¤¬¡¢¥á¥¤¥ó¥ë¡¼¥×¤Îɽ¼¨¹¹¿·»þ¤Ë¹Ô¤¦¤è¤¦¤Ë¤·¤Æ¤¦¤Þ¤¯¹Ô¤¤Þ¤·¤¿¡£³ä¤ê»»¤Ï»þ´Ö¤¬¤«¤«¤ê¤Þ¤¹¡£ 1²óž¤Î»þ´Ö¤Ï¡¢INT³ä¤ê¹þ¤ß¤Î´Ö³Ö¤ò¡¢TMR1¤Î¥«¥¦¥ó¥È¤È¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤Î²ó¿ô¤Ç·×¬¤·¤Æ¤¤¤Þ¤¹¡£TMR0¤Î³ä¤ê¹þ¤ß¤Çɽ¼¨¤ò¹¹¿·¤·¤Æ¤¤¤Þ¤¹¡£ ·×¬¤·¤¿»þ´Ö¤òrpm¤ËÊÑ´¹¤·¡¢³Æ·å¤Î¿ôÃͤËʬ³ä¤¹¤ë½èÍý¤Ï¥á¥¤¥ó¥ë¡¼¥×¤Ë¤¢¤ê¤Þ¤¹¡£ ¥±¡¼¥¹¤ÈÀßÃÖ¥±¡¼¥¹¤ËÆþ¤ì¤Æ¡¢¥Õ¥é¥¤¥¹ÈפËÀßÃÖ¤·¤Þ¤·¤¿¡£ ¥Û¡¼¥ë¥»¥ó¥µ¡¼IC¤Ï¡¢¥æ¥Ë¥Ð¡¼¥µ¥ë´ðÈפ˼è¤êÉÕ¤±¤Æ¡¢¥¢¥ë¥ß¥Õ¥é¥Ã¥È¥Ð¡¼¤Ç¥â¡¼¥¿¡¼¤Î´ðÂæ¤Ë¼è¤êÉÕ¤±¤Æ¤¤¤Þ¤¹¡£¥Ý¥ê¥«¡¼¥Ü¥Í¡¼¥È¥Í¥¸¤ò»ÈÍѤ·¤Æ¼§²½¤µ¤ì¤Ê¤¤¤è¤¦¤Ë¤·¤Æ¤ß¤Þ¤·¤¿¡£¼§ÀФȥ»¥ó¥µ¡¼¤È¤Î´Ö³Ö¤Ï2mm¤¯¤é¤¤¤Ç¤¹¡£ ¥±¡¼¥¹¤Î³Ñ·ê²Ã¹©¤Ï¡¢¥Õ¥é¥¤¥¹ÈפǤϤʤ¯»å¤Î¤³¤ò»ÈÍѤ·¤Þ¤·¤¿¡£ ¥½¡¼¥¹¥³¡¼¥É
FirstUpload 10/05/17-11:07 : LastUpdate 10/05/17-12:27
|