include 16f84.h .osc hs .wdt off org 0ch aa ds 1 bb ds 1 cc ds 1 led ds 1 int nop ; 初期設定 clr ra ; raをすべてクリア clr rb ; rbをすべてクリア mov !ra,#11111b ; ポートA all入力 mov !rb,#0 ; ポートB all出力 start mov led,#30 ledon nop mov rb,#11111111b ;ポートB全点灯 call wait ;点灯時間 mov rb,#00000000b ;ポートB全消灯 call wait ;消灯時間 djnz led,ledon ;変数が0ならば、ラベルledに移動 nop jmp start wait mov cc,#75 L1 nop djnz cc,L1 ret ;なんでこんなカンタンなプログラムをPICに書くか?というと ;連続ボリュームアップコマンド連続送信とか、 ;メーカー無差別パワーオンコマンドなどを送信できるように ;スペースがたくさんあるのですよ。