Page 1 of 1

Using Tera Term (open source) as a colour LCD Display

Posted: Sun Dec 23, 2018 12:31 am
by medelec35
only using ECIO40p, which plugged in to my PC via USB.
Or you could use ECIO28P
Note If this is the fist time you have used USB serial of ECIO and Device manager show error for USB driver then you will need to generate your own Seral USB driver.
This is not the driver for programming, but the driver that's used for USB serial UART communications.
Just make a new folder, e.g. ECIO USB serial driver
Within Flowchart select the USB Serial on the 3D panel.
Right select properties.
Within USB driver, Drive Directory select the down arrow and browse to the newly created folder.
Change the Generate Driver from no to yes.
A new USB serial driver will be generated within the new created folder.
THe new driver is used within Device manager to set up a virtual com port for the ECIO Serial.

Software :
Tera Term which can be downloaded from here.
The great thing about Tera Term is thats it's default mote is compatible with VT100 commands
So for example the above link shows cursor position is

Code: Select all

X=2, Y=10 then you send an escape char = Byte 27 then send string string "[10;2f"
If you want text to be green, then on the link you can see

Code: Select all


So in this case you can use just one attribute i.e green font = 32, so you would first send an escape char =

Code: Select all

 byte 27
then send the following string:

Code: Select all


With the attached flowchart there are two text files and a call macro.
Just set the text file to text number for the colour and Y, X location of text and e.g:

Code: Select all

TextColour = 32 //Green
X = 2 //2 Across
Y = 5 //5 Down
TextString = "Green Font, 2 across & 5 Down"


Code: Select all

TextColour = 31 //Red
X = 5 //5 Across
Y = 10 //10 Down
TextString = "Red Font, 5 across & 10 Down"

Compile to chip and the result on the termial software via ECIO40 USB:
Vt100 Formatted Text.png
Vt100 Formatted Text.png (24.78 KiB) Viewed 2921 times

You can of course have several lines of text fixed.
You can also use it to display information e.g diagnostics or general data without the need for addition hardware like LCD's.
The main advantage is you have a lot more columns and rows than an LCD.
Plus a normal LCD does not have coloured fonts.
You can also increase the font size.
Within Tera Term go to Setup, Font.
As a general guide with the smallest font you have have about 230 chars across.

Re: Using Tera Term (open source) as a colour LCD Display

Posted: Sun Dec 23, 2018 9:09 am
by Steve001
Thanks martin,
Going to have a go with this later

Got a diagnostics problem so will try and use this to see if I can see what is going on


Re: Using Tera Term (open source) as a colour LCD Display

Posted: Sun Dec 23, 2018 12:39 pm
by medelec35
Hi Steve,
The attached version is to start you off with diagnostics:
Vt100 Formatted Text2.png
Vt100 Formatted Text2.png (4.5 KiB) Viewed 2889 times

You don't require ECIO16 or ECIO40 for this to work.
You can use any target device and UART to USB converter.

Re: Using Tera Term (open source) as a colour LCD Display

Posted: Sun Dec 23, 2018 5:18 pm
by Steve001
cheers martin

Will have a go with this later

Re: Using Tera Term (open source) as a colour LCD Display

Posted: Sat Apr 25, 2020 12:04 pm
by Jay Dee
Thanks Martin, I've found this really useful. I was outputing general diagnositc data over UART but being able to write to specific locations on the screen has made it much easier.

I tried the USB slave and it worked just fine but each time I sent a new FC to my ECIO, I would have to restart my TeraTerm connection. (makes sense as the USB connection is open/closed)

I've swapped to UART and used a FTDI Basic to convert the TTL Serial to USB. I think the update is a bit slower but since the PC does not see a change in the connection to the FTDI, it is pretty seemless when developing and sending new code to the ECIO over USB every few minutes.

Attached is a little FC with a couple of VT100 macros I now use quite a bit. (since it needs VT100 interpretation simulation is not very effective)
Each macro requires the line number you want to write to, if you use the macro lots, keep a track of which line your sending your data to and not overwriting the same line.
(27.67 KiB) Downloaded 14 times

UART_VT100 just outputs a string 'Name' and the variable value, to a specific line number.

UART_VT100_Bits, does something similar but outputs the value as binary.

UART_VT100_8Byte, I use for showing CAN data messages; outputs the Name, a value for the CAN ID and then 8 data bytes from a specified ByteArray