debug
setfreq m32
main:
if pinC.5 = 1 then goto CODMW2
if pinC.4 = 1 then goto CODBO
goto main
UNACTIVE:
let dirsc = %000000
if pinC.5 = 1 then goto interupt1
goto UNACTIVE
Interupt1:
if pinC.5 = 0 then goto Rapid_Fire_Wait
if pinC.4 = 1 then goto Adjust
goto Interupt1
Rapid_Fire_Wait:
readadc C.1,b1
if b1 >25 then goto Rapid_Fire_Engaged
if pinC.5 = 1 then goto interupt2
goto Rapid_Fire_Wait
Rapid_Fire_Engaged:
High C.1
pause b2
Low C.1
pause b2
readadc C.1,b1
if b1 >25 then goto Rapid_Fire_Engaged
goto Rapid_Fire_Wait
Interupt2:
if pinC.5 = 0 then goto Dual_Rapid_Fire_Wait
if pinC.4 = 1 then goto Adjust
goto Interupt2
Dual_Rapid_Fire_Wait:
readadc C.1,b1
if b1 >25 then goto Dual_Rapid_Fire_Engaged
if pinC.5 = 1 then goto interupt3
goto Dual_Rapid_Fire_Wait
Dual_Rapid_Fire_engaged:
High C.1
Low C.2
pause b2
Low C.1
High C.2
pause b2
readadc C.1,b1
if b1 >25 then goto Dual_Rapid_Fire_Engaged
goto Dual_Rapid_Fire_Wait
Interupt3:
if pinC.5 = 0 then goto Jitter_Wait
if pinC.4 = 1 then goto Adjust
goto Interupt3
Jitter_Wait:
readadc C.1,b1
if b1 >25 then goto Jitter_Engaged
if pinC.5 = 1 then goto interupt1
goto Jitter_wait
Jitter_engaged:
High C.1
pause b3
Low C.1
High C.0
pause b3
High C.4
pause b3
low c.4
pause b3
high c.4
pause b3
low c.4
pause b3
readadc C.1,b1
if b1 >25 then goto Jitter_Engaged
goto Jitter_Wait
Adjust:
goto interupt1
CODMW2:
b2 = 400 ; this value sets the rate of the Rapid_Fire
b3 = 100 ; this value sets the rate of the Jitter
goto UNACTIVE
CODBO:
b2 = 500 ; this value sets the rate of the Rapid_Fire
b3 = 100 ; this value sets the rate of the Jitter
goto UNACTIVE