VFD-x20 Programmer's Reference

DISCONTINUED: REFERENCE ONLY

This page describes the font, screen layout and instruction set of the VFD-420 and VFD-220 serial displays. For hookup, configuration and specifications, please see the hardware reference.

Table of Contents

Serial Communication

VFD-420 and VFD-220 accept asynchronous serial at 2400 or 9600bps, 8 data bits, no parity, 1 or more stop bit(s), often called "N81." They will accept RS-232 input or inverted TTL. See the hardware reference for further information.

Character Set

VFD-420 and VFD-220 display the standard character set for character codes 32 to 127 (0x20-0x7F hex). Character codes 128-135 (0x80-0x87 hex) are custom characters that are used by the VFD-420's "Big-character" mode, and may be redefined for other purposes. Characters 136+ are a variety of symbols and foreign characters. Note that one group of these characters is repeated: 136-159 and 184-207 are identical.

Character Set (Character code= row+column)

BPP-440 Character Set

Screen Layouts

VFD-420 displays four lines of 20 characters; VFD-220, two lines of 20. Printing works as you would expect, flowing left to right and top to bottom (though you can use control-P to print at any position on the screen). Printing wraps from the last character (bottom-right of the screen) back the to first character; the display does not scroll.

Here are a pair of sample screens. Screen positions are numbered sequentially, left-to-right and top-to bottom: 0-79 for the VFD-420 and 0-39 for the VFD-220.

VFD-420 Screen Layout

VFD-420 Screen Layout. Position = row+column.

VFD-220 Screen Layout

VFD-220 Screen Layout. Position = row+column.

VFD-420's "Big-character" mode can generate full-screen-height numbers and letters (uppercase only)—up to four letters/digits per screen. Big-mode symbols—consisting of dot/decimal point (.), hyphen/minus sign (-), colon (:) and space—take up one-half the width of other "big" characters. VFD-220 does not have a Big-character mode.

Big Characters

Big Characters

Big Numbers

Symbols and Spaces are 1/2 Width

Control Codes

VFD-420 and VFD-220 understand a small set of control codes similar to our other text-mode displays (GLO, VFD, ILM, TRM). Codes not listed below (e.g., Null, 0) are ignored by the display.

NOTE: The display must be in factory-default Normal mode (not "Old" mode) for these control codes to work; see the configuration software description for more information.

Items marked with » can be clicked for tips or more detail.

Home (ctrl-A) 01 dec 0x01 hex

Moves the printing position to 0, the first character of the top line. »

Begin Big-Character Mode (ctrl-B) 02 dec 0x02 hex

VFD-420 Only Puts the display into Big-character mode, in which characters are displayed as 4-line tall graphics. The display can show up to four big characters at a time. The big character set includes 0-9, A-Z (uppercase) and symbols dot/decimal point (.), hyphen/minus sign (-), colon (:) and space. The symbols take up one-half the width of the letter/number characters. To end big-character mode, send ctrl-C, another control code, or a character not available in big mode. »

End Big-Character Mode (ctrl-C) 03 dec 0x03 hex

Sets the printing mode to the default size. »

Hide Cursor (ctrl-D) 04 dec 0x04 hex

Turns off the visible cursor. »

Show Blinking-Block Cursor (ctrl-F) 06 dec 0x06 hex

Turns on a blinking-block cursor that tracks the location of the next character to be printed. »

Bell (ctrl-G) 07 dec 0x07 hex

Pulses the Bell output (marked "J4") briefly to beep a 25mA piezo buzzer (if connected). »

Backspace (ctrl-H) 08 dec 0x08 hex

Backs up one character, erases that character, sets the print position to erased character's location. »

Tab (ctrl-I) 09 dec 0x09 hex

Moves the printing position to the next multiple-of-4 screen location: 0→4→8→12→16→20→24→... »

Smart Linefeed (ctrl-J) 10 dec 0x0A hex

Moves the printing position down a line. »

Vertical Tab (ctrl-K) 11 dec 0x0B hex

Moves the printing position up a line. »

Clear Screen (ctrl-L) 12 dec 0x0C hex

Clears the screen and moves the printing position to 0—the first position of the first line. »

Carriage Return (ctrl-M) 13 dec 0x0D hex

Moves to the first printing position of the next line. »

VFD On (ctrl-N) 14 dec 0x0E hex

Turns on the VFD screen after a ctrl-O power-down.»

VFD Off (ctrl-O) 15 dec 0x0F hex

Turns off the VFD driver circuitry to save power. »

Set Printing Position (ctrl-P) 16 dec 0x10 hex

Sets the printing position according to the value of the next byte, position+64 (0x40 hex). For example, to move to the fourth character of the second line (position 23; see the charts above), you would send two bytes, 16 87 (0x10 0x57 hex)»

Right-align Text (ctrl-R) 18 dec 0x12 hex

Displays text (usually numeric) within a field 2 to 8 characters wide. The byte that follows ctrl-R is a text number from '2' to '8' (50-56 dec, 0x32-0x38 hex) that sets the field width. The text after that will be invisibly stored until one of the following is received:

When this happens, the field will be cleared and the received text printed at the righthand end of the field. »

Escape: Start Multipart Instruction (ctrl-[) 27 dec 0x1B hex

See the Escape-code descriptions below.

Escape Instructions

These are multipart instructions that begin with the Escape character; 27 dec, 0x1B hex. Escape instructions affect memory: writing bitmaps to RAM to define custom characters, or storing/recalling text or character patterns to/from EEPROM.

Define Custom Character Pattern ESC D n B0 B1 B2 B3 B4 B5 B6 B7

Change the pattern of custom character n to the bitmap made up of bytes B0 through B7. The value n is a text number '0' to '7' (48-55 dec, 0x30-0x37 hex) specifying the custom character to be defined. Custom characters are located at 128-135 (0x80-0x87) in the character set; i.e., custom character 0 is 128, 1 is 129...

The default set of custom characters is used for big-character mode. Do not redefine custom characters if you're using big characters.

The figure below shows how the bits of bytes B0 through B7 define the shape of the custom character. The upper three bits of the pattern bytes are ignored. A tool for calculating custom-character bytes is online at seetron.com.

custom character scheme

Bitmap Layout for Custom Characters.

An example: To define custom-character 3 (which maps to character code 131) to the °F pattern in the example above, you'd send the sequence of 11 bytes shown below.

  ESC D '3' B0 B1 B2 B3 B4 B5 B6 B7
Dec: 27 68 51 8 20 8 7 4 6 4 4
Hex: 0x1B 0x44 0x33 0x08 0x14 0x08 0x07 0x04 0x06 0x04 0x04

Recall Screen or Custom Characters from EEPROM ESC E 0 and ESC E 1

ESC E 0 recalls a custom screen from EEPROM. The factory-set screen is the part number and "seetron.com," but you can redefine this screen using either ESC X below, or the configuration software. Sending ESC E 0 (27 69 48 dec, 0x1B 0x45 0x30 hex) causes the screen contents to be replaced with the memorized screen.

ESC E 1 recalls the factory custom characters (shown above) from EEPROM. Sending ESC E 1 (27 69 49 dec, dec, 0x1B 0x45 0x31 hex) undoes any changes you have made to the custom characters via ESC D. If you have redefined custom characters, you must send this instruction before using Big-character mode.

Write Configuration Data to EEPROM ESC W B0 B1 B2 B3 B4 B5 B6 B7

ESC W accepts 8 bytes of configuration data and writes it to the EEPROM. This instruction works only when switch 1 on the interface board is in the ON position at startup. When this switch is correctly set, the screen will display Configuration Mode when power is applied.

The easiest way to perform ESC W configuration is by using the configuration program. However, you may also configure the display with any computer capable of sending the appropriate data serially.

Timing: Allow at least 20ms after sending configuration data before sending anything else. This is the time required for the display to write its internal EEPROM.

Here is a byte-by-byte description of the configuration data:

Byte Configuration Option
B0

Initial Brightness, 128 (0x80 hex)
+ brightness setting (0-3):

  • 128 (0x80 hex) = 25% (dim)
  • 129 (0x81 hex) = 50%
  • 130 (0x82 hex) = 75%
  • 131 (0x83 hex) = 25% (full brightness)
B1

Startup Screen, 128 (0x80 hex)
+ 1 (ON) or 0 (OFF)

B2

Power up delay (in 0.5-second units)
1-120 (0x01-0x78 hex)

  • 128 (0x80 hex) = No power-up delay
B3

Mode settings, 128 (0x80 hex)
+ mode options:

  • 1 = "Old" mode (emulates BPK/BPI)
  • 2 = Write-protect EEPROM
  • 4 = Automatically dim VFD after 100 seconds w/o serial input
B4-B7

Reserved for future use; send 128 (0x80 hex)

Save Screen to EEPROM ESC X 0

ESC X 0 copies the current contents of the screen to EEPROM for later recall as a startup screen or via ESC E 0. Sending ESC X 0 (27 88 48 dec, 0x1B 0x58 0x30 hex) copies the screen to EEPROM.

Set VFD Brightness ESC n

ESC n sets the brightness of the display in four steps from 25% to 100%. The value of n is specified by the printable numbers "0" to "3" (48-51 dec, 0x30-0x33 hex ). Sending ESC 2 (27 50 dec, 0x1B 0x32 hex) sets 75% brightness.

Draw Horizontal Bar Graph ESC = style width value

ESC = draws a horizontal bar graph from the current cursor location, then returns the cursor to that location. You must specify the style, width (in characters) and value (in units of 3 or 5 bars/character) as follows:

Bargraph style A Bargraph style B Bargraph styles

Bar graph styles

Example:

•Draw a 4-pixel-high by 20-character bar representing a value of 38 (out of 60; 3 units per character space):

  ESC = 'E' 20 (+64) 38 (+64)
Dec: 27 61 69 84 102
Hex: 0x1B 0x3D 0x49 0x54 0x66

Custom Characters and Bar Graphs Bar graph styles B-H (and b-h) use custom characters and will garble the Big-character font. To avoid problems with big characters, either use A- or a-style bargraphs, or use ESC E 1 to restore the default custom characters before using Big-character mode.

Keep Shopping
 
Checkout Now

If placed now, this order will ship (checking...).

Updating Cart