Re: RS 232 Reading Kategorie: Programmierung (von Bernard Mulvihill - 13.08.2003 8:39) | |
Als Antwort auf Re: RS 232 Reading von André H. - 12.08.2003 11:31
| |
Hello Andre I tried to compile the programme for ASCII-codes and I got the following error messages. main (4): unknown identifier "speed" main (13): unknown identifier "line" Could you tell me what the problem is. I am using the original files of hwcom and lcdext. Could this be the problem. Regards, Bernard. > Hallo Bernard, > > What should be shown on the LC-Display ? > The Byte-Values or a string if there is sent the data > as an ASCII-string, by the PH-meter ? > > For Bytevalues you can use this: > > thread main > {byte i; // charcounter > hwcom.init(); > hwcom.setspeed(speed); > lcdext.init(); > i=0; > loop > { > wait hwcom.rxd(); > lcdext.zahl3(hwcom.get()); > i=i+1; > if i>=32 i=0; // for 2x16 LCD, sets charcounter to 0 past 32 Chars > if (i%16)==0 lcdext.line((i/16)+1); //for 2x16 LCD, changes line past 16 Chars > } > } > > For ASCII-codes you can use this: > > thread main > {byte i; // charcounter > hwcom.init(); > hwcom.setspeed(speed); > lcdext.init(); > i=0; > loop > { > wait hwcom.rxd(); > lcdext.put(hwcom.get()); > i=i+4; > if i>=32 i=0; // for 2x16 LCD, sets charcounter to 0 past 32 Chars > if (i%16)==0 lcdext.line((i/16)+1); //for 2x16 LCD, changes line past 16 Chars > } > } > > regards, André H. > > > > Hello, > > I have conrads c-controller station 2 and I have a question. > > Could someone please show me a programme that will read the input of the RS232 serial interface and output it > > onto the LCD screen. > > I have a pH meter connected to the serial interface and would like to read its output. > > Thank you, > > Bernard. | |
Antwort schreiben Antworten: Re: RS 232 Reading (von Tom - 13.08.2003 23:14) |