beautypg.com

Serial port flow control, Using dtr, Communications pcos series 150 programmer's guide – Star Micronics 150 User Manual

Page 128: Serial port protocol

background image

Communications

PcOS Series 150

Programmer's Guide

Serial Port

Page 118

Rev G

12/14/99

Serial Port Protocol

The serial port supports two flow control standards, XON/XOFF and Ready/Busy (sometimes
called DTR or hardware handshake.)

When Ready/Busy flow control is selected, the printer can be configured to use DTR, RTS, or
both for flow control. If only DTR is selected for flow control, RTS will indicate that the printer
has faulted. The following discussions will assume the DTR is being used for flow control.

The Ready/Busy protocol generally uses the DTR signal to indicate to the host computer that the
printer is not ready to accept data. The host should stop sending data to the printer as soon as
possible. Because the host may not notice the DTR signal until it has transmitted several bytes of
data to the printer, the printer will continue to except up to 255

15

bytes of data after it indicates

that it is not ready. The figure below illustrates how the Ready/Busy protocol works.

Serial

Communications

port

Data

Buffer emptying

Select key

Printer
control

software

Print

buffer

Serial Port Flow Control

Using DTR

RTS -> Request to send

DTR -> Data terminal ready

data in

Serial

data out

(Not used for

flow control)

DTR

RTS

DTR

Clear

Set

Inquire

response

256 - 6K

Data

Buffer filling up

Data

High

speed

FIFO

ENQ response

Data

ENQ

proc.

Figure 20 Serial port flow control using DTR

15

The buffer always signals it is full before it overflows. The size of the reserve depends on the buffer size

selected. It is always at least 255 bytes.