Hallo ich habs mit einem Beispielprogramm hinbekommen ein String zu übertragen. Doch wenn ich nun ein Byte senden will funktioniert das nicht. was hab ich da falsch gemacht?
Code:$regfile = "m32def.dat" $crystal = 16000000 $baud = 19200 Config Portb = Input Config Portd = Output Rs485 Alias Portd.2 Rs485 = 1 Dim A As Byte A = 123 Cls ' Clear the LCD display Cursor Off Do Print A Wait 1 Loop Endwie macht man das dann überhaupt mit den Adressen wenn man mehrere Slaves hat?Code:$regfile = "m32def.dat" $crystal = 16000000 $baud = 19200 Config Lcdpin = Pin , Db4 = Portc.5 , Db5 = Portc.2 , Db6 = Portc.4 , Db7 = Portc.3 , E = Portc.7 , Rs = Portc.6 Config Lcd = 20 * 4 Config Portb = Input Config Portd = Output Rs485 Alias Portd.2 Rs485 = 0 Dim Test As Byte Cls ' Clear the LCD display Cursor Off Do Inputbin Test Locate 1 , 1 Lcd Test Loop End







Zitieren

Lesezeichen