sending escape codes to Serial VFD with terminal program? - Page 1
Forum section: electronics / beginners

author: dentaku
author_rank: Frequent Contributor
timestamp: October 23, 2017, 10:38:29 pm
content: Most of the time, salvaged VFDs aren't terribly useful because you need to figure out the right voltages then some way to drive it but I just salvaged a nice Samsung 20m101da1 VFD that's simple, only needs 5V DC and accepts serial or parallel data.I powered it from a 5V adapter and sent text to it at 19200 baud from TeraTerm using a little USB to Serial TTL adapter and it worked.At first the text would start at the right side of the display and scroll to the left but after messing with it for a while the text comes in from the left of the display the wraps around back to the start when it hits the right edge of the 20 characters. This is what the datasheet calls Normal Mode."5.2.7 DC1 (11 Hex) : Normal Display ModeAfter writing a character, the write-in position is shifted to the right one digit automatically.When the write-in position is on the least significant digit, the cursor moves to the mostsignificant digit."I'd like to make it go back to how it was the first time but I need to send it the right ESC codes.QUESTION:What would be the simplest way to sendESC (1B Hex) + DC3 (13 Hex)to switch to Horizontal Scroll Mode using something like TeraTerm?I suppose I could connect the TX of an Arduino to it and send data to it that way but I'd like to see if it's possible with just the USB to Serial TTL adapter.I can easily set this back to defaults by doing ESC (1B Hex) + "I" (49 Hex) because 0x49 is part of the standard ASCII characters but the setting I want to change requires me to send Hex values BELOW 0x20 which means that I can't just type it on a keyboard.https://www.maltepoeggel.de/data/vfd/20m101da1.pdf

author: Ian.M
author_rank: Super Contributor
timestamp: October 24, 2017, 01:39:37 am
content: Try Esc Ctrl-S. Ctrl-A to Ctrl-Z send the ASCII codes 0x01 to 0x1A in *most* PC terminal programs, provided the terminal isn't reserving keys for Windows or its own use.Alternatively use a terminal package likeRealTermthat supports entering characters to be sent as HEX.

author: dentaku
author_rank: Frequent Contributor
timestamp: October 26, 2017, 02:55:18 pm
content: Aha! That's another thing out of many things I didn't know about old terminal software.Doing Esc Ctrl-S actually DOES work (most of the time) and sets it to Horizontal scroll mode.ALSO... This morning I found that there are Noritake Itron VFDs that work in exactly the same way. Reading the code on this pagehttp://tronixstuff.com/2013/08/23/using-older-noritake-itron-vfd-modules/I also see what I was doing wrong when trying to control it with an Arduino.I was assuming ALL the codes needed an ESC before them but now I see that it's only the ones that include ASCII characters that are typable on a keyboard.Something like 0x13 doesn't need the ESC before it.For the last few days I was doing stuff like...Serial.write(0x1B); //ESCSerial.write(0x49); //Iand it worked fine and reset the displayBUT I was then doingSerial.write(0x1B); //ESCSerial.write(0x13); //Horizontal Scroll Modewhen I didn't need to be doing the ESC at allThis seems to work as I expected.While programming the Arduino lots of random junk gets written to the VDF so I do a Clear display first then set Horizontal scroll mode.Code:void setup(){Serial.begin(19200, SERIAL_8E1); // initialize serialSerial.write(0x0E); //Clear displaySerial.write(0x13); //Horizontal Scroll Mode}void loop(){if (Serial.available()){char serialInput = Serial.read();Serial.write(serialInput);}}

author: dentaku
author_rank: Frequent Contributor
timestamp: October 28, 2017, 01:02:14 am
content: This doesn't use Horizontal Scroll mode but I thought I'd post a link to a video of this VFD displaying the output of my modified Chinese calipers.I like that all it needs is +5V, GND and data from the TX pin of a Leonardo which is reading the data and clock pins of the calipers.https://1drv.ms/v/s!ArYn6kcDECISkgoV-y_5XRAzU0Ec