bVT100 Description
As suggested by the name this system is based on the VT100 command set. It consists of a physical electrical interface and also a software interface, both are described below.
Serial Interface
The serial interface will accept 3.3V or 5V logic levels. A direct connection to RS232 signals is not available. A suitable device for translation such as a MAX232 for RS232 signals or the BV101 range for a USB interface.
Serial Connector
The serial connector is a 2x5 pin at the back of the device. Pin 1 is marked with 1, odd pins are down one side and even pins down the other.
|
Pin |
Function |
Function |
Pin |
|
1 |
RX |
nDD |
2 |
|
3 |
TX |
|
4 |
|
5 |
+5V |
|
6 |
|
7 |
|
|
8 |
|
9 |
Gnd |
nRTS |
10 |
This bVT100 serial connector will mate directly with the BV103. For correct operation the RTS & CTS lines are required and would normally be connected to the host.

The pinout is shown here as it would appear on the PCB.
RX This is the serial receive and expects signals 0 to 5V. The idle state is high (5V).
TX This signal is not used for this device as it is read a read only device.
+5V Is the main power supply for the device which should be capable of providing 40mA if the back light is going to be used.
nRTS (output) Hardware handshaking is an essential part of this interface. Without it the device will work but delays must be included after each character otherwise information will be lost. This line is held low (0V) by the device when it is ready to accept data, it will put this line high when it is busy, the host transmitter should monitor this and only send characters when the line is low. This signal is normally connected to the CTS line of the transmitting device.
nDD This is called the Device Disable and if left disconnected the line is pulled high by an internal pull up resistor, thus enabling the device. If the line is taken low then the device becomes disconnected from the serial interface. This is so that more than one device can be connected to the same serial bus. If the line is pulled low, the devices UART will be disabled and the RTS line will also be disconnected, effectively removing the device from the circuitry. This will take a finite time to accomplish (approximately 10uS) and so this must be taken into account when switching between displays.
Connection to a PC
There are several options for connecting providing the serial interface is not directly connected to the RS232 signals directly. Typically some form of level translation is required. Not all devices require both RTS and CTS lines, displays for example that are read only will only require the RTS from the device connecting to the CTS of the host.

A better method is to use a USB to TTL or similar translator. The BV103 from ByVac is directly plug compatible and will simply mate with the pins on a bVT100 device.

The BV103 as shown above is pin for pin compatible, it can also provide for a 3.3V or 5V power supply to the device. Shown here is the 5V power connection in red.
Connection to Microcontroller
The bVT100 interface will connect directly to to the TX and RX lines of a microcontroller UART. Handshaking should be arranged so that the microcontroller will place the RTS as an output and the CTS as an input.
Recieve
The Microcontroller should indicate to the host that it is ready to receive data
by placing the RTS line low. When the microcontroller is busy it should set the
RTS line high and the host will stop sending data.
Transmit
The microcontroller should check its CTS input. If it is low then it is okay to
send data to the host, if not then it should wait for the line to become low.
Several devices can be connected to the same serial bus because the bVT100 specifies a device disable line. This line (pin 2) is normally held high by the device itself. When it is high the serial interface is enabled. If this line is pulled low by an external device the serial interface is disconnected (all pins on the device become input). Using this line will enable more then one device to be connected at the same time.

There is a delay before the device can respond to this request so this must be taken into account, see nDD above.
Using
A standard terminal emulator is required such as BV-Com or HyperTerminal. Alternatively a microcontroller can be used. BV-Com can be obtained from www.asi.byvac.com and is a standard terminal emulator. Providing the nRTS line has been connected and a suitable method of connection as above has been established then the following settings are required:

1) make sure the CTS Flow control is checked or leave the nRTS line disconnected. Leaving the nRTS disconnected will seriously degrade the performance.

2) not essential but having the echo ticked will enable you to see what is typed.
HyperTerminal could also be used with these settings:

Screen shot from HyperTerminal settings.
Automatic Baud Rate
When the display is first switched on or has been reset with the appropriate VT100 command, the FIRST byte that MUST be sent is a Carriage Return (enter on the keyboard) this is byte value 13 or 0x0d in hex. The device will be able to establish the Baud rate from this single byte. Until this happens the device cannot be used.
The Baud rate is determined form the following standard rates and select one of these based on that first byte:
9600, 14400, 19200, 38400, 57600, 115200
The transmitting terminal must be set at one of those rates. In some situations the transmitter may not be accurate and give unreliable results on the higher baud rates. If this is the case the rates can be fine tuned. See the appropriate commands in the VT100 section
VT100
Once connected the display simply accepts text and duplicates it to the screen. Connecting a terminal emulator such as BV_Comm or HyperTerminal will enable anything typed into it to be duplicated on the display.
To control the display, for example clearing the screen or placing letters in a certain location escape codes are used. An escape code is the escape key (byte 27) followed by various symbols, numbers and letters.
Escape codes have been used for many years and were a feature of the early terminals. The most popular set of codes is called VT100 used by old DEC terminals. It was so popular that it became a standard way to control terminal screens before the days of the PC. This display wherever possible uses the most common of these codes.
Escape Codes
In the table the left hand column indicates:
S is the VT100 standard
P is partially standard
N is non-standard
Not all devices support all of these codes, see the datasheet for the particular device.
|
S |
Code |
Bytes
decimal |
Description |
|
Y |
LF |
10 |
Line feed
(10) |
|
Y |
CR |
13 |
Carriage
return (13) |
|
Y |
BS |
8 |
Back space
(8) |
|
P |
esc(1 |
27,40, |
Normal font |
|
P |
esc(2 |
27,40, |
Bold font |
|
Y |
esc[?25I |
27,91, |
Hide cursor |
|
Y |
esc[?25h |
27,91, |
Show cursor |
|
N |
esc[?26I |
27,91, |
Back light
off |
|
N |
esc[?26h |
27,91, |
Back light on |
|
N |
esc[?29 numa |
Writes to
EEPROM Baud rate fine tune: 38,400 |
|
|
N |
esc[?29 numb |
Writes to
EEPROM Baud rate fine tune: 57,600 |
|
|
N |
esc[?29 numc |
Writes to
EEPROM Baud rate fine tune: 115,200 |
|
|
N |
esc[?30a |
27,91, |
Displays
current status of display |
|
N |
esc[8h |
27,91, |
Clear screen
on bottom scroll (default) |
|
N |
esc[8l |
27,91, |
Don’t clear
screen [1] |
|
N |
esc[?27D |
Write
defaults to EEPROM |
|
|
N |
esc[?27M |
Write sign on
message to EEPROM |
|
|
Y |
esc[2J |
27,63, |
Clear screen
using default background colour |
|
N |
esc[3J |
27,63, |
Clear screen
and reset all defaults |
|
Y |
esc[<line>;<col>H |
Move cursor to line and column |
|
|
Y |
esc[<num>A |
Move cursor
up one or more lines, <num> is optional |
|
|
Y |
esc[<num>B |
Move cursor
down one or more lines, <num> is optional |
|
|
Y |
esc[<num>C |
Move cursor
right one or more lines, <num> is optional |
|
|
Y |
esc[<num>D |
Move cursor
left one or more lines, <num> is optional |
|
|
Y |
escD |
27,68 |
Move cursor
down one line |
|
Y |
escM |
27,77 |
Move cursor
up one line |
|
Y |
esc[H |
27,63, |
Cursor home |
|
P |
escc |
27,99 |
Reset device |
|
N |
escb |
|
Load bitmap |
|
N |
esc[numf |
Sets
foreground colour |
|
|
N |
esc[numb |
Sets
background colour |
|
|
N |
esc[numV |
|
Sets contrast |
|
Y |
esc[K |
27,63, |
Clear line
from cursor right |
|
Y |
esc[1K |
27,63, |
Clear line
from cursor left |
|
Y |
esc[2K |
27,63, |
Clear entire
line |
|
N |
esc{<row>;<col>P |
Places single
pixel in current foreground colour |
|
|
N |
esc{<row>;<col>p |
Places pixel
without showing it. |
|
|
N |
esc{y0 x0 y1
x1L |
Draws a line
in the current foreground colour |
|
|
N |
esc{y0 x0 y1
x1B |
Draws a box
in the current foreground colour |
|
|
N |
esc{y0 x0 y1
x1F |
Draws a
filled box in the current foreground colour |
|
|
N |
esc{ y0 x0 <dia>C |
|
Draws a
circle in the current forground colour |
Notes
[1] the letter
following number in the escape code is lower case L
All VT100 commands begin with escape, this is byte decimal 27 or hex 0x1b. The commands are interpreted immediately as they are typed in, there is no need to follow with CR or LF. Most of the time the command is determined by the final character, for example turning the back light on and off is exactly the same command except for the final character.
Some commands are obvious and so will not be covered in detail. The less obvious commands are covered in detail below.
esc[
This command is used to position the cursor on the display. The cursor whether
visible or not determines where the next character is placed. Line is a number
generally beginning at 0 and ending with one less then the number of lines
available on a display.
On an 8 line display the first line would be 0 and the last line would be 7. Column is the number of characters across the display, also starting at 0. It is calculated using the current font so some unexpected results could occur if the font has been changed within the line. Either the line or column values can be left out.
As an example for the BV4141 the line and column values are:
Line 0-15
Column
0-24 (font 1) 0-15 (font 2)
esc[0;5H Moves the cursor to the first line 6th character along
esc[4;H Moves the cursor to line 5 retaining the current horizontal (column) position
esc[;3H Moves the cursor to the 4th character position on
the current line. See also esc{
esc[<num>A Move Cursor Up
Also commands:
esc[<num>B (down)
esc[<num>C (right)
esc[<num>D (left)
Moves the cursor by one or more character spaces or lines. The character space
(horizontal) is calculated form the current font.
The number specifies how many character spaces to move and is optional, if left
out a default of 1 is taken so:
esc[1B is the same as esc[B
esc[numf Set Foreground
Colour
Also command:
esc[numb (background colour)
This command will depend on the type of display, some are monochrome and some
colour so refer to the datasheet for this command.
esc{<row>;<col>P (Place Pixel)
Places a single pixel drawn in the foreground colour at the position given. The
row is the vertical height and the column is the horizontal position, accepted
values depend on the display type.
1,1 or 0,0 is the top left corner of the screen.
To erase a pixel the change the foreground colour and use this command.
esc{<row>;<col>p (Move to
Pixel)
The functionality of this command is similar to that of placing a pixel except
that it does not draw the pixel. It is mainly used for positioning and can be
used to position text in the horizontal direction more accurately than the ‘H’
command.
Specifying a row value within the character height will place text on that line.
For example a row height of 0-7 will place the text on the first line, 8-15 the
second line etc. Assuming an 8 pixel character height.
The column value however will place the text horizontally on a pixel, this can
be very useful for centering text titles or producing special effects by
overlapping characters.
esc{y0 x0 y1 x1L Draw Line
This will draw a line in any direction, the starting co-ordinates are given by
y0,x0 and the ending co-ordinates by y1,x1.
Y is the vertical co-ordinate (height or row), 0 or 1 top most.
X is the horizontal direction (column or width) 0 or 1 left most
esc{y0 x0 y1 x1B Draws
a Filled Box
Draws a box, y0,x0 specify the top left corner of the box and y1,x1 specify the
bottom right corner of the box. y1 must be greater then y0 and x1 must be
greater then x0 otherwise unexpected results may occur.
Y is the vertical co-ordinate (height or row), 0 or 1 top most.
X is the horizontal direction (column or width) 0 or 1 left most
Y0,X0 is the top left of the box and Y1,X1 is the bottom right.
The box will be filled in the current foreground colour.
Graphics Considerations
It is up to the user not to specify co-ordinates that are outside the available range. Some checking is done and can be tolerated, trial an error will give the best results. Be prepared to cycle the power as some incorrect commands will crash the display and stop it working until the power is cycled.
The circle drawing is not perfect as an attempt is made to fit into the pixels available. A very small diameter will produce a diamond rather then a circle.
esc[?29 numa Fine Tune
Baud Rates
At higher Baud rates some hosts are not particularly accurate in the Baud rate
timing. To prevent any mismatch between the host and this device the Baud rates
can be fine tuned using this and its sister commands:
esc[?29 numa Fine tune 38,400 (51)
esc[?29 numb Fine tune 57,600 (34)
esc[?29 numc Fine tune 115,200 (16)
The number in the brackets gives an accurate timing for the respective Baud rates, the lower the number the faster the baud rate. The command writes a number to the EEPROM for use with the Autobaud detect. As detection only occurs at reset, the effect on any of these commands will not be seen until reset.
As an example suppose that the Baud rate of 115,200 gave unreliable results,
the first try may be to slow it down and so these commands could be used:
esc[?29 17c (writes 17 to EEPROM)
escc (resets device)
Set the host to 115,200 and press enter (CR), see if the results are any better.
esc[?27D Write EEPROM
Defaults
Some settings can be stored to EEPROM so that these become the default at start
up. This command will write the settings to the EEPROM which will be used when
the device is reset. The actual settings that are saved depends on the device
and so the datasheet should be consulted.
esc[?27D Sign On
This only applies mainly to display devices. The sign on message is stored in
EEPROM and there are approximately 220 bytes available for a message that will
be displayed at start up or reset. This message is displayed BEFORE the autobaud
detect.
The message is made up of exactly the same escape codes and text that would form a normal display. The only difference is that it must end with CTRL z (^z or byte value 26)
esc[?27D
… message body and formatting codes
^z
The above is what the message should look like in order to be written to EEPROM. The final ^z is important. This command if not properly used may cause the display to stop working, if this happens then a Hardware reset is required. Because the message is made up of normal text and escape codes it is probably wise to test it before committing to EEPROM with this command.
Hardware Reset
The purpose of the hardware reset is to reset the EEPROM back to a known position so that the display will work correctly. The procedure is:
- Disconnect the display from power
- Connect the reset pins together (see below)
- Apply power
- Disconnect power
The display will now work correctly. The hardware reset can be found by
looking for 5 holes in a line, one of the holes will have a square copper pad
and marked with either 1 or FR or both. Connect this copper pad to the one next
to it with a bit of wire.
