Witam jestem początkujący w programowaniu ! Mam taki problem napisałem prosty program do załączenia i wyłączenia dowolnym przyciskiem na pilota w kodzie rc5 ! Zaprogramowałem i nie działa.
(inne proste programy działały miganie dod itp.) Procesor to AT89c2051 a odbiornik to TSOP 1736 (podłączony zgonie z notą katalogową) a poniżej program ! Prosze Was fachowców o Pomoc
Dim Kod As Bit
Dim Command As Byte , Subadress As Byte
Enable Int0
Enable Interrupts
Reset Tcon.0
On Int0 Sprawdzanie
Do
If Kod = 1 And P1.7 = 0 Then
Disable Int0
Gosub Zgas
Kod = 0
Enable Int0
End If
If Kod = 1 And P1.7 = 1 Then
Disable Int0
Gosub Zapal
Kod = 0
Enable Int0
End If
Loop
Sprawdzanie:
Getrc5(subadress , Command)
Kod = 1
Return
Zapal:
P1.7 = 0
Return
Zgas:
P1.7 = 1
Return
(inne proste programy działały miganie dod itp.) Procesor to AT89c2051 a odbiornik to TSOP 1736 (podłączony zgonie z notą katalogową) a poniżej program ! Prosze Was fachowców o Pomoc
Dim Kod As Bit
Dim Command As Byte , Subadress As Byte
Enable Int0
Enable Interrupts
Reset Tcon.0
On Int0 Sprawdzanie
Do
If Kod = 1 And P1.7 = 0 Then
Disable Int0
Gosub Zgas
Kod = 0
Enable Int0
End If
If Kod = 1 And P1.7 = 1 Then
Disable Int0
Gosub Zapal
Kod = 0
Enable Int0
End If
Loop
Sprawdzanie:
Getrc5(subadress , Command)
Kod = 1
Return
Zapal:
P1.7 = 0
Return
Zgas:
P1.7 = 1
Return