Pages: [1]   Go Down
Author Topic: How to update only a portion of the PuTTY serial display  (Read 939 times)
0 Members and 1 Guest are viewing this topic.
San Jose, CA
Offline Offline
Newbie
*
Karma: 0
Posts: 1
FPGA engineer by day, Arduino beginner by night
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I've been looking around and cannot find an answer to my question so please forgive me if this is a repost, which it likely is.

I'm trying to automate my home brewery and I want to get a proof of concept working with a serial connection to a (Windows 7) laptop before I start to mess with a GLCD.  I have a screen that is always present in the serial display that looks like the attached picture and I want to be able to update fields like "TIME LEFT: " and "Current Temp: " without printing out a whole new screen every second.  Is there a way to move the "cursor" to the field I want and only change a few characters?  How do people normally do this with menu based, DOS-like programs?

I mostly use the Arduino Serial Monitor, but I also use PuTTY or TeraTerm.  I understand they all behave slightly differently.

Thank you so much for any help.

-Ken




* serial display.png (40.83 KB, 500x408 - viewed 25 times.)
Logged

USA
Offline Offline
Full Member
***
Karma: 0
Posts: 238
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It cannot be done with the Arduino Serial Monitor because it isn't a VT100 emulator but PuTTY is.  The answer is use VT100 escape codes.

http://ascii-table.com/ansi-escape-sequences-vt-100.php
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As mkwired said, the ANSI/VT100 escape sequences are the general way to arbitrarily position text on a display.  Historically, the display was a hardware serial terminal like the DEC VT100 and Wyse 50.  These days, it is typically a software terminal emulator such as HyperTerminal, Tera Term, Terminal.app, xterm, Gnome Terminal and so on.

If you want to use the ANSI escape sequences with a GLCD, you will need to select one that supports them.  Most out there have their own interface for controlling the display.  Here is one manufacturer I found with a quick websearch (no endorsement): http://www.acscontrol.com/Pages/Products/Lcd/index.htm

Here's an Arduino library that can control KS0108-based GLCDs natively, without the ANSI escape sequences: http://www.arduino.cc/playground/Code/GLCDks0108

You will have a wider range of GLCDS to choose from if you don't go the ANSI-compatible route, but I don't know how you will be able to do your development using just your host machine and then add the GLCD later without using ANSI escapes.

Homebrew automation sounds like a fun project!  Good luck!
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 72
Posts: 7171
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I look up this link now and then:

http://en.wikipedia.org/wiki/ANSI_escape_code

My phi-panel serial LCD keypad supports most of these escape codes but they are not yet glcd, biggest being 20*4 character display.

Do you intend to eventually use an LCD on board your display or a PC window? If you use a PC window, just get xterm and start using escape code to set your cursor.
Logged


Pages: [1]   Go Up
Jump to: