CoolTerm and Carriage Return

If you have specific questions or problems with any of my Freeware applications, post them here.
Post Reply
teddyfox
Posts: 1
Joined: Mon Oct 08, 2012 6:49 am

CoolTerm and Carriage Return

Post by teddyfox »

Hi Roger,

I'm using CoolTerm on Mac to communicate with Arduino (Mega 2560). I faced the problem: I need to print in CoolTerm' window on the same line (without Line Feed).
In my Arduino sketch I did:
".........
Serial.print("CH1="); Serial.print(AcVal1); Serial.print("\r");
........."
In the CoolTerm' window I got:
".........
CH1=0
CH1=0
CH1=0

.........." (CoolTerm added LF himself while printing)
I tried diff CoolTerm settings without results. Could you please help on this?
Thanks.
User avatar
roger
Site Admin
Posts: 431
Joined: Fri Apr 24, 2009 12:41 am
Contact:

Re: CoolTerm and Carriage Return

Post by roger »

Hi,

Try removing the Serial.print("\r"); statement from your Arduino code. I believe that this is what is causing the LF.

Roger
nkp07
Posts: 2
Joined: Sat Nov 01, 2014 9:13 pm

Re: CoolTerm and Carriage Return

Post by nkp07 »

Have found this topic. It seems the problem is not solved. Or am I wrong?
Output in HyperTerminal after the code Serial.print ("\ r"); remains in the same row.
But Coolterm adds LF.
Please see screen shot for different programs, but the same output Serial.print ("\ r");
http://www.triumph.ru/coolterm/Terminals.jpg


Could you help me solve this problem?
User avatar
roger
Site Admin
Posts: 431
Joined: Fri Apr 24, 2009 12:41 am
Contact:

Re: CoolTerm and Carriage Return

Post by roger »

What you are seeing is actually expected behavior. CoolTerm is not designed to behave like applications that support terminal emulation. It was specifically designed to display ALL the data that is received. Thus, a CR character causes a new line to be displayed rather than the previous line being overwritten.
However, if it is important to you that only the last line of data is displayed, the you can reduce the receive buffer size to the number of bytes the line contains. It appears your data is always exactly 16 bytes long. If you set the receive buffer size to 16, CoolTerm will only show the last 16 bytes it received.
You can also turn off the option to convert non-readable characters so that the TAB characters don't show as dots.
nkp07
Posts: 2
Joined: Sat Nov 01, 2014 9:13 pm

Re: CoolTerm and Carriage Return

Post by nkp07 »

Thank you for your answer.
It is a pity that it is impossible to stay on the same row.
User avatar
roger
Site Admin
Posts: 431
Joined: Fri Apr 24, 2009 12:41 am
Contact:

Re: CoolTerm and Carriage Return

Post by roger »

nkp07 wrote:Thank you for your answer.
It is a pity that it is impossible to stay on the same row.
I'm currently working on a new feature that might solve your problem. It won't implement a carriage return to go back to the beginning of the current line, but it will let you clear the screen before sending new data. This would eventually produce the same visual result. Send me a private message if you're interested in testing this.
crawler009
Posts: 2
Joined: Fri Aug 28, 2015 12:10 am

Re: CoolTerm and Carriage Return

Post by crawler009 »

Hello Roger
CoolTerm for me is really the best terminal program out there. Thank you very much for it.
Would it be possible that you implement the "carriage return" or "backspace" please.
Maybe with a option to enable it in the "receive options".
Its the only reason why i sometimes have to use another terminal program, because
sometimes i want to refresh some data, instead of adding new one.

Best regards
crawler009
User avatar
roger
Site Admin
Posts: 431
Joined: Fri Apr 24, 2009 12:41 am
Contact:

Re: CoolTerm and Carriage Return

Post by roger »

Can you elaborate as to what you mean by "implement backspace and carriage return"?
crawler009
Posts: 2
Joined: Fri Aug 28, 2015 12:10 am

Re: CoolTerm and Carriage Return

Post by crawler009 »

roger wrote:Can you elaborate as to what you mean by "implement backspace and carriage return"?
Hello Roger
what i mean is that if i send a CR to CoolTerm, it would be great if it isnt displayed,
instead the data that follows a CR, overwrites the last line chars (like hyperterminal does),
or maybe (for simplificatin) CR clears all the chars in the last line.
I'm just seeing in the Connetion Options -> Terminal -> "Handle BS and DEL Characters". It would be nice if a "Handle CR Characters" option would be there also.
Post Reply