Beijer Electronics Fax 801-466-8792 Web www.beijerelectronicsinc.com Phone 801-466-8770
C
HAPTER
2.
QTERM S
OFTWARE
2.1
Operation
The operation of the QTERM is quite simple:
•
Power is applied to the QTERM.
•
Commands or data can be transmitted to the QTERM.
Commands are executed as required; data is displayed.
•
When a key is pressed, the QTERM transmits the
appropriate character(s) to the host.
The QTERM has many additional capabilities which are
accessed in three ways:
•
Power-On Setup (see Chapter 1)
•
Software commands from host (this chapter)
•
Configuration-file download (see Chapter 3)
2.1.1
Handshaking
The QTERM has buffers for both receiving and transmit-
ting characters. However, these buffers may not be large
enough for some applications. If this is the case for your
application, then your host must use XON/XOFF hand-
shaking to make optimal use of the QTERM's capabilities.
The QTERM's transmit buffer (16 bytes long) is used when
a host does not wish to receive characters for a period of
time. The host sends an XOFF character to the QTERM.
The QTERM starts placing keycodes (one character per
keystroke, regardless of how many characters are in the
string assigned to the key) into the transmit buffer rather
than transmitting them. When the host is ready to receive
characters, it sends an XON character, at which time the
QTERM will start transmitting the characters in the buffer.
The QTERM's receive buffer is large enough to accept a
full screen of text at the maximum baud rate (9600) without
overrunning the buffer. However, some operations can take
a longer time to execute, such as scrolling the entire screen
down one line. In this case, the QTERM will send an XOFF
to the host when it has only six bytes empty in its buffer.
When it has processed input data to the point that the buffer
only has six bytes used, it will send an XON and the host
can resume transmitting.
The command summary in Appendix C shows approximate
execution time for each of the various operations of the
QTERM.
XON/XOFF handshaking can also be disabled (by software
command or the QDATA file) if you do not wish to use it.
However, if you do not use handshaking, you must take
extra care that you do not overrun the QTERM's receive
buffer. The two easiest ways to do this are to use a slower
baud rate (which gives the QTERM more time to process
each byte), or add delays to your code after each write to
the QTERM.
2.1.2
Commands vs. QDATA Parameters
There are numerous parameters which are set by the
QDATA configuration file (see Chapter 3), but which can
be overridden by a software command. For example, tab
spacing is set in the QDATA file but can be changed by the
Set Tab Spacing command.
In all such cases, the software command overrides the
QDATA configuration file setting but does not store the
new setting into EEPROM. Therefore, when power is
turned off, the overriding value is lost, and when the termi-
nal is turned on, the QDATA parameter will be used again.
If you wish to have the software command permanently
override the QDATA configuration file setting, you can use
the Store Parameters to EEPROM command. This saves
all currently-set parameters to the EEPROM which makes
them the current power-on defaults.
2.1.3
User Data Memory Organization
The QTERM has about 22 Kbytes of storage for user data.
Some of this is used for the information from the QDATA
file, so the exact amount depends on how much data you
put into key strings, macro strings. Typically, you will have
about 20 to 21 kbytes available for user data.