Hi programmers, can you please advise me why the Getrc5 command on Arduino Uno (Mega 328p) is not working for me. I am using Bascom 1.8 series. I uninstalled it and tried to compile with demo 2.0.7.9 + RC5.lib library (2.07.5).Still the same result = it only prints 255 + 127. If any of you have a working sample code, could you please send it to me (hex) by email (kokosovo@seznam.cz). Thank you for your help.
'-------------------------------------------------------------------
' RC5.BAS
'-------------------------------------------------------------------
$regfile = "m328pdef.dat"
$crystal = 16000000
$hwstack = 40
$swstack = 16
$framesize = 32
$baud = 19200
Config Rc5 = Pind.2 , Wait = 2000
Config Timer1 = Timer , Prescale = 1
Enable Interrupts
Dim Address As Byte , Command As Byte
Print "Waiting for RC5..."
Do
Getrc5(address , Command)
' If Address = 0 Then Condition removed for better visibility
Command = Command And &B01111111
Print Address ; " " ; Command
Waitms 200
' End If
Loop
End
'-------------------------------------------------------------------
' RC5.BAS
'-------------------------------------------------------------------
$regfile = "m328pdef.dat"
$crystal = 16000000
$hwstack = 40
$swstack = 16
$framesize = 32
$baud = 19200
Config Rc5 = Pind.2 , Wait = 2000
Config Timer1 = Timer , Prescale = 1
Enable Interrupts
Dim Address As Byte , Command As Byte
Print "Waiting for RC5..."
Do
Getrc5(address , Command)
' If Address = 0 Then Condition removed for better visibility
Command = Command And &B01111111
Print Address ; " " ; Command
Waitms 200
' End If
Loop
End