Witam
mam taki kod:
i po zwarciu PB0 do masy timer staje, ale niestety po zwarciu PB1 nic się nie dzieje (choć na 100% to co jest w ifie się wykonuje) i timer nie startuje...
co jest nie tak?
przy zmianie wszystkiego na timer2 wszystko działa jak należy...
proszę o pomoc
mam taki kod:
$regfile = "m1280def.dat"
$crystal = 16000000
$baud = 9600
Dim A As Integer , B As Single
Dim S As String * 7
A = 0
Config Portb = Input
Portb = 255
Waitms 1
Enable Interrupts
Config Timer0 = Timer , Prescale = 1024
Enable Timer0
On Timer0 Prze_timer0
Do
B = A * 256
B = B + Timer0
B = B / 15625
S = Fusing(b , "#.###")
S = Format(s , "0000000")
Print S ; " s (Timer0= " ; A ; " *256 + " ; Timer0 ; ")"
Wait 1
If Pinb.0 = 0 Then Stop Timer0
If Pinb.1 = 0 Then
'Timer0 = 0
Start Timer0
End If
Loop
End
Prze_timer0:
Incr A
If A < 0 Then A = 0
Return
i po zwarciu PB0 do masy timer staje, ale niestety po zwarciu PB1 nic się nie dzieje (choć na 100% to co jest w ifie się wykonuje) i timer nie startuje...
co jest nie tak?
przy zmianie wszystkiego na timer2 wszystko działa jak należy...
proszę o pomoc
