Star Micronics 150 User Manual

Page of 151
Communications
PcOS Series 150
Programmer's Guide
Serial Port
Page 120
Rev G
12/14/99
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.
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.
Wait for data from the
host in high speed
FIFO buffer.
Place data in print
buffer.
Is the buffer
past the high
watermark?
Yes
Clear the DTR signal
or transmit XOFF.
DTR - Data Terminal Ready
No
Update buffer pointers.
Is the buffer
full?
Yes
Figure 22 Serial buffer operation