1 Attachment(s)
I can not stop running of programm when on some point the button is unpressed
TRISB = %11111111
OPTION_REG.7 = 0
loop:
If PORTB.7 =0 THEN
Freqout PORTB.0,4,1700 ;------------- air horn
Freqout PORTB.0,4,850
Freqout PORTB.0,4,1250
Freqout PORTB.0,4,425
Endif
If PORTB.6 = 0 Then
Freqout PORTB.0,8,366 ;------------- pulsar
Freqout PORTB.0,8,483 ;
Freqout PORTB.0,8,591
Freqout PORTB.0,8,664
Freqout PORTB.0,8,760
Freqout PORTB.0,8,886
Freqout PORTB.0,8,967
Freqout PORTB.0,8,1070
Freqout PORTB.0,8,1182
Freqout PORTB.0,8,1330
Endif
If PORTB.5 = 0 Then
Freqout PORTB.0,10,366 ;------------- yelp
Freqout PORTB.0,10,483
Freqout PORTB.0,10,591
Freqout PORTB.0,10,664
Freqout PORTB.0,10,760
Freqout PORTB.0,10,886
Freqout PORTB.0,10,967
Freqout PORTB.0,10,1070
Freqout PORTB.0,10,1182
Freqout PORTB.0,10,1330 ---------- how to check? just to say if in this point button is unpressed and stop running
Freqout PORTB.0,10,1182
Freqout PORTB.0,10,1070
Freqout PORTB.0,10,967
Freqout PORTB.0,10,886
Freqout PORTB.0,10,760
Freqout PORTB.0,10,664
Freqout PORTB.0,10,591
Freqout PORTB.0,10,483
Freqout PORTB.0,10,366
endif
goto loop
end