閲覧総計:39169  (本日:2  昨日:4)


モータを高速・中速・低速で回転

高速は、
モータをONするだけ:モータ電圧2.8V
中速は
モータを5ミリ秒回転、5ミリ秒停止:モータ電圧2.1V
低速は
モータを3ミリ秒回転、7ミリ秒停止:モータ電圧1.6V

モータの速度を変化させる、この方法は
PWM(Pulse Width Modulation )と言うそうな。
http://picfun.com/motor04.html
06/11/04

112529348_132.jpg112529348_181.jpg
/** 
* モータを高速・中速・低速で回してみよう。 
* 
* PIC 16F628A 
* 発信器:内臓4MHz 
* 電源:乾電池3本(実測4.5V) 
* モータドライバIC:TA7291P 
* モータ:RB4,5 
*  
* Device Flags: _BODEN_OFF _CP_OFF _PWRTE_ON _WDT_OFF 
*        _LVP_OFF _MCLRE_OFF _INTRC_OSC_NOCLKOUT 
* 
* 言語 MikroC v2.1 
*/ 
void main() { //メイン プログラム 

  PORTB = 0b00000000; //PORTBの中身をきれいにする 
  TRISB = 0b00000010; //RB1は1:入力、他のPORTBは0:出力に設定 

  do { //doとwhileの間を繰り返す 

    //モータ低速 duty(効率):30% 
    PORTB.F4 = 1; //RB4をON(モーター回転) 
    delay_ms(3); // 3ミリ秒待つ 

    PORTB.F4 = 0; //RB4をOFF(モーター停止) 
    delay_ms(7); // 7ミリ秒待つ 

  } while(1); //doとwhileの間を繰り返す 
} //メイン プログラム終了

★この情報は役に立ちましたか?

選択肢 投票
はい 6  
いいえ 6  


*1 ( http://www.jamesbondwiki.com/account/Buy-Percocet-Online what is percocet %]]] http://www.sqoop.co.ug/main/pg/profile/Buy-Norco-Pills norco 10-325 yyo http://jupiter.gfm-ljutomer.si/moodle/user/view.php?id=3751 lorazepam drug >:-PP http://hustlenomics.com/forum/topics/where-can-i-get-lunesta ambien vs lunesta zmrnzf http://community.wreg.com/service/displayKickPlace.kickAction?u=26995249&as=96304 clonazepam and alcohol =-PPP http://www.redstate.com/users/buycheapzolpidem/ zolpidem tartrate 8-
*2 http://www.sarahwilliamsmusic.com/profiles/blogs/get-aciphex-no-prescription aciphex dosage lzqpnn http://xpefiles.com/cs/members/buy-oxycodone.aspx oxycodone vs hydrocodone :-DDD http://adp.moniquewooten.com/elgg/html/pg/profile/Buy_Cheap_Pills_Online clonazepam 1mg wejdu http://www.britemic.com/profiles/blogs/get-cheapest-percocet-tablets buy percocet online 87966 http://therealtaylormomsen.com/forum/topics/buy-cheapest-ambien-visit-our ambien dosage uqtez http://www.mypetmove.com/profiles/blogs/purchase-provigil-special provigil 200mg %
*3 http://community.myfoxatlanta.com/buy-cheap-adipex/blog/2010/10/18/without_prescription adipex retard sprzedam 54037 http://www.swishtalk.com/member.php?u=111913 order ambien 339188 http://www.bingohotspot.com/forum/topics/cheapest-ativan-prices-in ativan no prescription 760 http://www.thinkfashion.com/members/buy+generic+accutane.aspx accutane generic cost 06817 http://sn.chess-online.ru/profiles/blogs/we-offer-viagra-pills-online buy viagra in canada 558648 http://www.thebestsportsvideo.com/profiles/blogs/cheapest-female-viagra-without female viagra =((( http://www.mypetmove.com/forum/topics/buy-female-viagra-special vaigra for women %-OO http://ecmchamps.com/mynetwork/pg/profile/Buy-PERCOCET-Online percocet 30mg 8OOO http://www.recessioncrusher.com/forum/topics/buy-cheap-modafinil-tablets modafinil brasil =-
*4 ( http://buendato.ning.com/profiles/blogs/buy-cheap-norco-drugs-at norco 335 http://singlefathernetwork.com/forum/topics/no-prescription-vicodin-buy percocet vs vicodin 0398 http://www.g5click.com/profiles/blogs/take-female-viagra-without-a natural viagra for woman 451202 http://turkfriends.ning.com/profiles/blogs/lowest-phentermine-prices-in buy phentermine on line 8[ http://gospeltoday.ning.com/profiles/blogs/where-can-i-take-phentermine phentermine 37.5 without prescription 620 http://www.young-dro.com/profiles/blogs/order-phentermine-online-3 phentermine uk ugv http://martinatopleybird.com/forum/topics/cheap-modalert-tabs-online-for modalert online >:
*5 ( http://www.startupspace.com/profiles/blogs/we-offer-lorazepam-online-for lorazepam without prescription =-OO http://demo.upupo-soft.com/members/buy-hydrocodone-canada-no-prescription/default.aspx buy hydrocodone 8-PP http://creativemeetups.com/pg/profile/Cheap_Pills zolpidem 5 mg 471248 http://jupiter.gfm-ljutomer.si/moodle/user/view.php?id=3876 diazepam dosage 19056 http://www.youthcabinet.org/profiles/blogs/lowest-rivotril-prices-in rivotril tablet 8-O http://www.britemic.com/profiles/blogs/purchase-cheap-adderall adderall online >:-
*6 ( http://www.young-dro.com/profiles/blogs/cheapest-abilify-tabs-buy-it abilify canada 24473 http://www.skyyhighondeck.com/forum/topics/get-low-cost-hydrocodone-drugs hydrocodone lortab jjbf http://www.recessioncrusher.com/forum/topics/take-low-priced-pills-with-no zopiclone 42736 http://www.britemic.com/profiles/blogs/purchase-aciphex-online-buy aciphex precaution %
*7 ( http://www.britemic.com/profiles/blogs/klonopin-no-prescription snorting klonopin :