Zur Übersicht - INFO - Neueste 50 Beiträge - Neuer Beitrag - Suchen - FAQ - Zum CC1-Forum - Zum CC-Pro-Forum

Re: RS 232 Reading Kategorie: Programmierung (von André H. - 12.08.2003 11:31)
Als Antwort auf RS 232 Reading von Bernard Mulvihill - 11.08.2003 13:23

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.


Antworten bitte nur ins Forum!
Fragen per EMail auf Forum-Postings werden nicht beantwortet!

Das macht meine Heizung gerade


    Antwort schreiben


Antworten:

Re: RS 232 Reading (von Bernard Mulvihill - 13.08.2003 8:39)
    Re: RS 232 Reading (von Tom - 13.08.2003 23:14)