;梵天丸モータ回転試験 ;走行制御の場合はこのプログラムで確認すること ;Clock=8MHZ 秋月通商PICライター対応アセンブラ ;一関工業高等専門学校機械工学科 佐藤清忠 ; include 16f84.h .osc hs .pwrt on .wdt off .protect off ; org 0ch tm1 ds 1 tm2 ds 1 tm3 ds 1 ; org 0 goto start ; start clr rb mov !ra,#10h mov !rb,#0h ; main mov ra,#00000011b ;F-F(左前進-右前進) call wait mov ra,#00000010b ;F-.(左前進-右停止) call wait mov ra,#00000001b ;.-F(左停止-右前進) call wait mov ra,#00000000b ;.-.(左停止-右停止) call wait goto main ; wait mov tm1,#20 ;走行距離(時間)を定める値 wait0 clr tm2 wait1 clr tm3 wait2 nop djnz tm3,wait2 djnz tm2,wait1 djnz tm1,wait0 ret ;