Tido
24.10.2011, 15:38
Hallo,
ich sende mit diesem Programm den String "F99223344567Y":
$regfile "m32def.dat"
$framesize = 42
$swstack = 62
$hwstack = 62
$crystal = 16000000
$baud = 9600
Enable Interrupts
Config Serialout = Buffered , Size = 13
Do
Print "F99223344567Y"
Loop
Empfangen wird aber das, was zwischen dem "-" steht:
F-
-99-
-22-
-33-
-44-
-56-
-7Y-
-
-
-F9-
-92-
-23-
-34-
-45-
-67-
-Y
-
Das ist das Programm:
$regfile = "m2560def.dat"
$hwstack = 82
$framesize = 68
$swstack = 68
$baud = 9600
$crystal = 16000000
Config Com3 = 9600 , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
Open "com3:" For Binary As #3 'Uplink
Config Serialin3 = Buffered , Size = 13
Dim Zeichen As String * 1
Dim Empfang As String * 13
Dim Count As Byte
Do
If Ischarwaiting(#3) = 1 Then
Empfang = ""
Count = 0
For Count = 1 To 13
Zeichen = Inkey(#3)
Empfang = Empfang + Zeichen
Next
Print "-" ; Empfang ; "-"
End If
Loop
Was mache ich da schon wieder falsch?
ich sende mit diesem Programm den String "F99223344567Y":
$regfile "m32def.dat"
$framesize = 42
$swstack = 62
$hwstack = 62
$crystal = 16000000
$baud = 9600
Enable Interrupts
Config Serialout = Buffered , Size = 13
Do
Print "F99223344567Y"
Loop
Empfangen wird aber das, was zwischen dem "-" steht:
F-
-99-
-22-
-33-
-44-
-56-
-7Y-
-
-
-F9-
-92-
-23-
-34-
-45-
-67-
-Y
-
Das ist das Programm:
$regfile = "m2560def.dat"
$hwstack = 82
$framesize = 68
$swstack = 68
$baud = 9600
$crystal = 16000000
Config Com3 = 9600 , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
Open "com3:" For Binary As #3 'Uplink
Config Serialin3 = Buffered , Size = 13
Dim Zeichen As String * 1
Dim Empfang As String * 13
Dim Count As Byte
Do
If Ischarwaiting(#3) = 1 Then
Empfang = ""
Count = 0
For Count = 1 To 13
Zeichen = Inkey(#3)
Empfang = Empfang + Zeichen
Next
Print "-" ; Empfang ; "-"
End If
Loop
Was mache ich da schon wieder falsch?