SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
User avatar
By Chupa
#76151
I need to make a hyperterm "console" for a project. Standard RS232 to the computer, incoming data being displayed in hyperterm. But instead of just having a scrolling log of incoming data I would like to have a console type thing, as if you were looking at the dash in your Car. All the measurements remain in the same place but the values change. Im trying to figure out how to go about doing this. Do i use a special type of terminal emulation in hyperterm? My assumption is that updating the values on the console would be similar to updating values on an LCD. You designate the address of which cell you want to change then write to it. No?
By jasonharper
#76164
Any terminal emulation (such as VT-100) is going to give you access to various command sequences (typically starting with ESC) for doing things like cursor positioning and clearing to the end of the line or the screen.

If you've got lots of memory on your target processor, you might consider porting an existing console text library such as ncurses. That would give you a quite high-level view of the display, including individually scrollable text windows.
By ezflyr
#76168
Hi Chupa,

To answer your specific question, you can put this code at the top of your display loop, and it will clear the Hyperterminal display screen so your display values will not scroll.

The code is 'C' so you mayhave to translate it to whatever you are using!
Code: Select all

//Here we clear the Hyperterminal display screen	
printf("\x1B[2J");

John
By Mike, K8LH
#76235
Other useful ANSI control strings you may need are;
Code: Select all
"\x1B[yy;xxf"     // move cursor to yy(00..23),xx(00..79)
"\x1B[A"          // move cursor up
"\x1B[B"          // move cursor down
"\x1B[C"          // move cursor left
"\x1B[D"          // move cursor right
You need to replace the 'yy' and 'xx' with ascii characters in the range of '00'..'23' and '00'..'79', respectively.

Good luck.

Kind regards, Mike, K8LH
By newbie123
#76265
Chupa wrote:I need to make a hyperterm "console" for a project. Standard RS232 to the computer, incoming data being displayed in hyperterm. But instead of just having a scrolling log of incoming data I would like to have a console type thing, as if you were looking at the dash in your Car. All the measurements remain in the same place but the values change. Im trying to figure out how to go about doing this. Do i use a special type of terminal emulation in hyperterm? My assumption is that updating the values on the console would be similar to updating values on an LCD. You designate the address of which cell you want to change then write to it. No?
How does the data have to be formatted? You can just clear the screen before printing so that it appears that the new values replace the old ones or the new values appear to change when nothing else changes.

So every time you clear the screen and print something like this:
Code: Select all
volts = 13           temp = 140  
speed = 60 mph       oil pressure = 35
keep the strings the same including the spaces between, just change the new values for each. Some terminal programs do not support the clear screen commands.