so ich hab jetzt mal was hier:
Code:
$regfile = "m8def.dat"
$crystal = 1000000
$baud = 9600
Config Portd.2 = Output
Config Portb.0 = Output
Config Pinc.0 = Input
Config Portb.1 = Output
Config Pinc.1 = Input
Portc.0 = 1
Portc.1 = 1
Portc.2 = 1
Portc.3 = 1
Dim I As Bit
On Timer0 On Timer0
Config Timer0 = Timer , Prescale = 8
Enable Timer0
Enable Interrupts
Do
If Pinc.0 = 1 Then
Portb.0 = 1
Portb.1 = 0
Portb.1 = 0
Else
Portb.0 = 0
Wait 3
Portb.1 = 1
Wait 5
Portb.1 = 0
Wait 3
End If
If Pinc.1 = 1 Then
Portb.2 = 1
Portb.3 = 0
Portb.3 = 0
Else
Portb.2 = 0
Wait 3
Portb.3 = 1
Wait 5
Portb.3 = 0
Wait 3
End If
Loop
On Timer0
I = Not I
Portd.2 = I
Return
ich hab zwar keine ahnung was des jetzt bewirkt aber auf jedenfall wird mir im programm ein fehler angezeigt:
label not fount [ontimer0 ]
weiß jemmand was des is und was dieser timer jetzt macht. weiß nur dass er ein signal über den speaker abgibt wenn er überläuft.[/code]
Lesezeichen