Communications

PcOS Series 150

Programmer's Guide

Serial Port

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 25515 bytes of data after it indicates that it is not ready. The figure below illustrates how the Ready/Busy protocol works.

Serial Port Flow Control

 

 

 

 

 

 

 

 

 

 

Using DTR

 

 

 

Printer

 

 

Communications

 

 

 

 

control

 

 

 

 

port

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

software

 

Serial

 

 

 

 

 

 

 

 

 

 

ENQ

 

 

 

 

 

 

 

 

 

 

 

 

 

 

High

 

 

 

 

 

Print

 

 

 

 

 

data in

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Data

 

 

 

 

speed

Data

 

proc.

Data

Data

 

 

 

 

 

 

 

 

 

 

 

 

 

 

buffer

 

 

 

 

 

 

 

 

 

 

FIFO

 

 

 

 

 

 

 

Serial

 

 

Inquire

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

response

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

data out

 

 

 

ENQ response

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(Not used for

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

flow control)

 

 

Clear

 

 

 

 

Buffer filling up

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

256 - 6K

 

 

 

 

 

 

 

 

DTR

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

DTR

 

 

Set

 

 

 

 

Buffer emptying

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RTS

 

 

 

 

 

 

 

Select key

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RTS -> Request to send

 

DTR -> Data terminal ready

 

 

 

 

Figure 20 Serial port flow control using DTR

15The 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.

Page 118

Rev G

12/14/99

Page 128
Image 128
Star Micronics 150 manual Serial Port Flow Control Using DTR, Serial Port Protocol