Mam pilota URC22B-3 UNIVERSAL REMOTE CONTROLLER. Czy mogę za jego pomocą sterować odbiornikiem, rc5? Jeśli tak to trzeba go jakoś konfigurować (adres)? ma ktoś może pod ręką jakiś krótki program wykorzystujący odbiornik SFH506? Podłączyłem go do pinu B.0 i chciałem coś na nim wyświetlić ale dupa. Poniżej zamieszczam program który próbowałem wprogramować miał to być tester pilotów ale nie działa.
Config Portb = &B1111110
Portd.1 = 0
Config Rc5 = Pinb.0
Config Lcd = 16 * 2
Cursor Off
Cls
Lcd "adres: "
Lowerline
Lcd "komenda: "
Dim Address As Byte , Command As Byte
Enable Interrupts
Do
Getrc5(address , Command)
Waitms 50
Command = Command And &B0111111
If Address < 32 Then
Locate 1 , 10
Lcd " "
Locate 1 , 10
Lcd Address
Locate 2 , 10
Lcd " "
Locate 2 , 10
Lcd Command
If Command = 16 Then
Portd.1 = 1
Waitms 20
Portd.1 = 0
Waitms 100
Portd.1 = 1
Waitms 20
Portd.1 = 0
End If
End If
Loop
End
Dodam że jedyne co mi się wyświetla to napis adres2
Config Portb = &B1111110
Portd.1 = 0
Config Rc5 = Pinb.0
Config Lcd = 16 * 2
Cursor Off
Cls
Lcd "adres: "
Lowerline
Lcd "komenda: "
Dim Address As Byte , Command As Byte
Enable Interrupts
Do
Getrc5(address , Command)
Waitms 50
Command = Command And &B0111111
If Address < 32 Then
Locate 1 , 10
Lcd " "
Locate 1 , 10
Lcd Address
Locate 2 , 10
Lcd " "
Locate 2 , 10
Lcd Command
If Command = 16 Then
Portd.1 = 1
Waitms 20
Portd.1 = 0
Waitms 100
Portd.1 = 1
Waitms 20
Portd.1 = 0
End If
End If
Loop
End
Dodam że jedyne co mi się wyświetla to napis adres2