Mein problem war, das nie was angekommen ist. Beim m32 musste ich halt soft UART benutzen, da der hardwareuart ja auf dem RN-Control schon besetzt ist.
Die codes:
Code:
$regfile = "m32def.dat"
$crystal = 16000000
$baud = 2400
Print "funktioniert rs232"
Waitms 1000
Config Portc.0 = Output
Portc.0 = 0
Open "Comd.6:2400,8,n,1" For Output As #1
Open "Comd.3:2400,8,n,1" For Input As #2
Dim Text As String * 16
Dim Textneu As String * 16
Input "Zeichen eingeben " , Text
Print "RN sagt " ; Text
Print #1 , "RN sagt " ; Text
Input #2 , Textneu
Print "RN sagt " ; Textneu
End
Code:
$regfile = "m8def.dat"
$crystal = 1000000
$baud = 2400
Do
Dim Text As String * 16
Config Portb.0 = Output
Portb.0 = 1
Input , Text
Portb.0 = 0
Print "M8 sagt " ; Text
Loop
End
Und was im Terminal ankommt:
funktioniert RS232
Zeichen eingeben abcd
RN sagt abcd
RN sagt
M8 sagt RN sagt
Das ganze ist sehr merkwürdig, da ganz eindeutig eine stabile Kommunikation stattfindet (RN sagt M8 sagt RN sagt), aber der eigentliche String abcd, den ich eingebe, nicht übertragen wird. Auch kann ich mir den Zeilenumbruch nicht erklären. Bin aber auch grad zu müde.
Lesezeichen