VT52 Terminal Emulator

Disclaimer: This feature manual is for advanced users with knowledge of serial interfaces.

Option VT52 employs a custom firmware enhancement that allows your Oscilloclock to simulate a vintage DECscope terminal, using VT52 and a selection of VT100 codes. There are also settings such as auto-wrap and auto-scroll that make it easier to drive the terminal without using VT codes. The screen size is 16 columns by 8 rows.

See the OscilloTerm Exo B7S4 post for demos and explanations about this feature.

The serial data source should be 9600 baud (configurable to 4800 in the Comms Setup menu), and supply CMOS or TTL level signals. A 3.3V or 5V output pin is acceptable. Do not attach an RS232 communication-level source directly, as the high voltages involved will damage the Control Board. (To interface with RS232, use an external level converter based on a chip such as the MAX232.)

Note that currently the serial input is not ESD-protected and is therefore sensitive to electrostatic discharge. Be sure to discharge any static electricity built up in the client device or your body.

Setting up the terminal emulator

  1. First unplug the clock from mains.
  2. If an onboard GPS module is plugged in to the Control Board (as shown below), you must first remove it. You must not have two serial data sources plugged in at the same time!
  3. Plug your serial data source into the 8-pin 2-row socket at the end of the serial cable. The pin orientation is shown below. Note the orientation of the pins with respect to the red tape.
  4. Plug the serial cable into the upper socket at the rear of the control unit.
  5. Turn the Oscilloclock on. In the “Config” menu and “Comms Setup”, ensure that Comms is “On”, Terminal mode is “Y”, and the baud rate setting matches your serial data source.

The Terminal Screen

The 16×8 terminal screen is the last screen in the sequence; to manually select this screen, simply rotate the knob counter-clockwise one detent past the splash screen. You should see a blinking cursor at the upper left corner. This screen is formatted using a fixed-width font for realistic effect, unlike all other screens which employ proportional fonts.

When the Oscilloclock receives a valid character or code, it will automatically switch to the terminal screen.

If the “Screen Switch” feature is enabled (Menu -> Settings -> Screen Switch), then after the predefined time, the screen will automatically revert back to the previous face that was being displayed before receipt of the serial data. (If the Screen Switch feature is set to 0 (disabled), the terminal screen will continue to be shown until someone turns the knob to switch faces manually.)

Note that the contents of the terminal screen are persisted between screen switches; if you cycle from the terminal screen and back again, the same content will be visible.

VT52 and VT100 Code Support

Besides the standard ASCII characters 0x20 to 0x7F, the following VT52 and VT100 codes are supported.

; VT52 commands - [ESC] is Escape char 27 (0x1b) and commands are case-insensitive
;   linefeed              Move cursor down one line, scroll      LF (.10)
;   carriagereturn        Move cursor to leftmost column         CR (.13)
;   cursorup              Move cursor up one line                [ESC]A
;   cursordn              Move cursor down one line, no scroll   [ESC]B
;   cursorrt              Move cursor right one char             [ESC]C
;   cursorlf              Move cursor left one char              [ESC]D or BS (.8)
;   cursorhome            Move cursor to upper left corner       [ESC]H
;   cleareos              Erase to end of screen                 [ESC]J
;   cleareol              Erase to end of current line           [ESC]K
;   cursorpos(v,h)        Move cursor to v,h location            [ESC]Y<v><h>
;                            (where v, h = 0x20 for 1st line/char)
;
; VT100 commands:
;   clearscreen ED2       Clear entire screen                    [ESC][2J
;
; Special commands:
; 1. Command to switch to normal receive mode
; (for syntax, see gps.asm and earthquakes.asm)
;   normalrx              Switch back to NMEA or quake til EOL   [ESC]$
; 2. Command to select Terminal screen
;   selectscr             Select Terminal screen to use          [ESC]%<screen>
;                            0: standard screen (default)
;                            1: Unbirthday screen (see unbirthday.asm)

In addition, there is a special command to switch the Oscilloclock into receiving standard NMEA (GPS) statements, to synchronize the clock’s time. At the next LF or CR, the clock will switch back into Terminal mode.

; 1. Command to switch to normal receive mode
; (for syntax, see gps.asm and earthquakes.asm)
;   normalrx              Switch back to NMEA or quake til EOL   [ESC]$

The supported NMEA format statements are:

; NMEA 0183: Only the standard GPRMC string is supported.
;    $GPRMC,223606,A,,,,,,,030317,,*23

(Note that the Oscilloclock’s GPS statement parser does not validate the final checksum value, so any value can be supplied.)

Terminal Settings

There are a number of settings to make the terminal emulator easier to drive. To emulate a VT52 DECscope most accurately, set all of these to ‘N’.

This menu is accessible via Menu -> Config -> Comms Setup -> Terminal setup.

FieldDescription
Wrap colsBehavior when the cursor is at the last column and a character or code is received that would move the cursor right.
– N – DECscope behavior. The cursor remains where it is.
– Y – The cursor will wrap to the first column of the next line.
Wrap linesBehavior when the cursor is on the last line and a character or code is received that would move the cursor down.
– N – DECscope behavior. The screen will scroll up one line.
– Y – No scroll will occur. The cursor will be moved to the first line.
LF with CRBehavior when processing a LF or CR.
– N – DECscope behavior. LF and CR are processed individually.
– Y – Receipt of either a LF or a CR will result in both LF and CR operations.
Hide cursorBehavior of the cursor.
– N – DECscope behavior. The cursor is visible as a blinking underline.
– Y – The cursor is hidden.


Any questions? Just contact your friendly engineers at Oscilloclock!


Discover more from Oscilloclock.com

Subscribe to get the latest posts sent to your email.