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

Tips, Tricks and methods for programming, learn ways of making your programming life easier, and share your knowledge with others.

Moderators: Benj, Mods

Post Reply
medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

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

Post by medelec35 »

Hardware:
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

ESC>[{ROW};{COLUMN}H
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

<ESC>[{attr1};...;{attrn}m
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

"[32m"
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
(24.78 KiB) Downloaded 2960 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.
Attachments
ECIO40 Tera Term as a dispaly1.fcfx
(14.21 KiB) Downloaded 353 times
Martin

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

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

Post 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

Steve
Success always occurs in private and failure in full view.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

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

Post by medelec35 »

Hi Steve,
The attached version is to start you off with diagnostics:
Vt100 Formatted Text2.png
(4.5 KiB) Downloaded 2928 times
You don't require ECIO16 or ECIO40 for this to work.
You can use any target device and UART to USB converter.
Attachments
ECIO40 Tera Term as a dispaly2.fcfx
(14.1 KiB) Downloaded 357 times
Martin

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

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

Post by Steve001 »

cheers martin

Will have a go with this later
Success always occurs in private and failure in full view.

User avatar
Jay Dee
Posts: 398
Joined: Tue Aug 18, 2009 6:42 pm
Has thanked: 121 times
Been thanked: 154 times
Contact:

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

Post 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.
VT100_UART.fcfx
(27.67 KiB) Downloaded 292 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

Post Reply