Communications

PcOS Series 150

Programmer's Guide

Serial Port

Print Buffer Flow

The following flow chart illustrates the communication driver getting data from the serial port and placing the data in the buffer using Ready/Busy or XON/XOFF flow control.

Wait for data from the host in high speed FIFO buffer.

Place data in print

buffer.

Is the buffer

 

 

 

Yes

full?

 

 

 

Update buffer pointers.

Is the buffer

 

 

 

 

Clear the DTR signal

past the high

 

Yes

 

 

 

 

 

or transmit XOFF.

watermark?

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

No

DTR - Data Terminal Ready

Figure 22 Serial buffer operation

At the top of the flow chart, the driver is waiting for data. When data is received from the host, the printer checks to see if it is an inquire command. If the data is an inquiry, it is responded to and placed in the buffer. If not, the data is placed directly into the buffer. The buffer is then checked to see if it is full before the internal pointer is incremented. If it is not full, the pointer is incremented in preparation for the next data byte. The buffer is then checked to see if it is getting full by checking the amount of information in the buffer to see if it has passed a high watermark. If it has, the communication driver is notified, and it resets data terminal ready (DTR) to indicate to the host that no more data should be sent.

Page 120

Rev G

12/14/99

Page 130
Image 130
Star Micronics 150 manual Print Buffer Flow, Serial buffer operation