Well, post your whole code, and schematic, we could help further.
Well, post your whole code, and schematic, we could help further.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
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
One of the several way to do it, untested though
Code:Frequency var word CounterA var Byte If PORTB.5 = 0 Then CounterA = 0 Yelp: Lookup2 CounterA,[366,483,591,664,760,886,967,1070,1182,1330,1182,1070,967,886,_ 760,664,591,483,366],Frequency Freqout PORTB.0,10,Frequency if PORTB.5=0 then CounterA = CounterA + 1 if Countera < 19 then goto Yelp endif endif
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Can anybody show different way of doing the same???
Well yes, but why? It doesn't work or what?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
But if just to say I want to add pause i cannot.
I added a coulpe of 0 to get silence but it gives whistle.
so i need something with supporting pause command
thanks in advance
Bookmarks