من این دیمر را ساختم اما کار نمیکنه کسی میدونه مشکل اون کجاست؟

اینم برنامه:
$regfile = "m8def.dat"
$crystal = 4000000
Config Pinb.1 = Output
Config Pind.7 = Input
Config Pinb.0 = Input
Config Int0 = Rising
On Int0 Int0_int
Enable Interrupts
Enable Int0
Dim E As Eram Byte
Dim B As Byte
Dim D As Byte
If E > 9 Then E = 9
B = E
D = 0
Set Portb.1
Do
If Pind.7 = 0 Then
If B > 0 Then Decr B
Waitms 10
E = B
End If
If Pinb.0 = 0 Then
If B < 9 Then Incr B
Waitms 10
E = B
End If
Loop
End
Int0_int:
Set Portb.1
For D = 0 To B
Waitus 200
Next D
Reset Portb.1
Return

اینم برنامه:
$regfile = "m8def.dat"
$crystal = 4000000
Config Pinb.1 = Output
Config Pind.7 = Input
Config Pinb.0 = Input
Config Int0 = Rising
On Int0 Int0_int
Enable Interrupts
Enable Int0
Dim E As Eram Byte
Dim B As Byte
Dim D As Byte
If E > 9 Then E = 9
B = E
D = 0
Set Portb.1
Do
If Pind.7 = 0 Then
If B > 0 Then Decr B
Waitms 10
E = B
End If
If Pinb.0 = 0 Then
If B < 9 Then Incr B
Waitms 10
E = B
End If
Loop
End
Int0_int:
Set Portb.1
For D = 0 To B
Waitus 200
Next D
Reset Portb.1
Return
دیدگاه