Es klappt. Noch kleines Fehler im Software.
Beim Senden wird bis 255 Byte gesendet. Beim Empfangen bis 63 Byte empfangen, danach wird neue Adresse erzeugt.
Externes Bild anzeigen Externes Bild anzeigen
Sender
Code:'Senden $regfile = "m8def.dat" $crystal = 16000000 $baud = 9600 Dim Togbit As Byte , Adresse As Byte , Command As Byte Adresse = 0 Togbit = 1 Do Incr Command If Command = 0 Then Adresse = Adresse + 1 End If Rc5send Togbit , Adresse , Command Print Adresse ; " | " ; Command ; " (senden)" Loop
Empfänger
Code:'Empfangen $regfile = "m8def.dat" $crystal = 16000000 $baud = 9600 $lib "mcsbyte.lbx" 'INT0 Config Rc5 = Pind.4 , Timer = 2 Config Pind.4 = Input Portd.4 = 1 Enable Interrupts Dim Adresse As Byte , Command As Byte Print "Waiting for RC5..." Do Getrc5(adresse , Command) If Adresse < 255 Then Print Adresse ; " | " ; Command ; " (empfangen)" End If Loop







Zitieren

Lesezeichen