Zitat Zitat von MiniMax
Zitat Zitat von Richard
Deshalb hatte ich auch vorgeschlagen einfach in (EINEM) AVR mehrere RS232 Verbindungen parallel laufen zu lassen.
Tag, wie kann ich denn z.B. auf nem Mega 32 mehrere Uarts Laufen lassen?
Code:
Mybaud = 19200
Do
  'first get some data
  Serin S , 0 , D , 0 , Mybaud , 0 , 8 , 1
  'now send it
  Serout S , 0 , D , 1 , Mybaud , 0 , 8 , 1
  '                                      ^ 1 stop bit
  '                                  ^---- 8 data bits
  '                                ^------ even parity (0=N, 1 = E, 2=O)
  '                        ^-------------- baud rate
  '                  ^-------------------- pin number
  '               ^----------------------- port so PORTA.0 and PORTA.1 are used
  '           ^--------------------------- for strings pass 0
  '      ^-------------------------------- variable
Oder....

Code:
'open channel for output
Open "comd.1:19200,8,n,1" For Output As #1
Print #1 , "serial output"



Open "comd.0:19200,8,n,1" For Input As #2
'since there is no relation between the input and output pin
'there is NO ECHO while keys are typed
Print #1 , "Number"
'get a number
Input #2 , B
'print the number
Print #1 , B
Gruß Richard