Printer buffer size, Serial mode plug and play, Using dsr – TransAct Technologies ITHERM 280 User Manual

Page 315

Advertising
background image

iTherm

®

280 Programmer’s Guide

Communications

28-07764

Rev C

Page 313

When the printer is on, the print controller looks for data. If there is data, it processes it.
Flow control is done when the data is taken from the buffer and the amount of data in the
buffer is less than a prescribed amount. The low watermark is set based on the
expected environment. The iTherm

®

280 Printer sets the low watermark at half the

buffer size or 1024 characters whichever is smaller. The low watermark gives the host
application time to get more data to the printer before the printer uses up what it has.

When XON/XOFF protocol is implemented, it is possible for the host to miss an XON or
an XOFF. To prevent this from causing a communication lockup, the printer sends an
XOFF for every character received after the high watermark is reached. If the printer
detects that the serial data link is inactive, it sends out an XON about every two
seconds. When the printer cover is opened, an XOFF is sent. An XOFF is sent even
when the internal data buffer is past the high watermark and is done to allow the host to
know that the printer is not ready.

Printer Buffer Size

The size of the iTherm

®

280 buffer is configurable, which allows an application to control

how far ahead of the printer it can get before being asked to wait. The buffer size can be
set from 256 to 6144 bytes (not including the 64-character high-speed buffer). The
smaller the buffer, the tighter the control will be. It is up to the developer to select the
optimal buffer size for an application.

Serial Mode Plug and Play

Microsoft has defined a Plug and Play (PnP) protocol to identify devices on serial links.
The enumeration process is designed to find and automatically configure a device driver
for the printer. It is done by toggling the control lines in a specific sequence that is
recognized by the printer. The peripheral then responds such that Windows can identify
the device.

To allow the printer to look for and respond to the sequence, EISA PnP must be
enabled. When enabled in serial mode, the flow control is forced to Request to Send
(RTS) with Data Terminal Ready (DTR) static.

Using DSR

Windows uses the host’s Data Set Ready (DSR) line (the printer’s DTR line) on the
serial port to determine whether a device is attached to the port. When Windows is
booted (or does PnP), the system sets the host’s DTR and RTS to zero and waits
approximately 200 milliseconds. It then sets the DTR to one and waits another 200
milliseconds. After 200 milliseconds, the system checks to see whether the DSR line is
high. This indicates that a serial device is attached to the serial port. The system
responds by setting RTS high and waits to receive the device identification string.

In some devices, such as the serial mouse, the DSR line can be held high by tying it
directly to the DTR line. When the mouse is connected to the serial port on the personal
computer, the power supplied through the DTR line also raises DSR high. For Plug and
Play compatibility, RTS flow control is used at the printer, because DSR must stay high
as long as the device is attached to the serial port.

Advertising