LaserWriter 2.0 ROM: Parity & Hardware Handshaking Change (2/95)



The LaserWriter's serial communication capability has been enhanced. The DTR flow control protocol has been introduced as an alternative to the XOn/XOff protocol.

DTR flow control makes use of a control signal, Data Terminal Ready, which is available through the DB-25 connector (but not through the DB-9 connector). Normally the LaserWriter leaves this signal turned on. However, when it needs to stop the flow of characters from the host, it turns DTR off. The host must immediately stop sending characters until the LaserWriter turns DTR back on again. Similarly, another signal, Data Set Ready, (DSR) may be used by the host to control the flow of data sent to it from the LaserWriter.

Failure of the host to conform to the selected flow control protocol may result in unexpected occurrences of 'ioerror', caused by overflow of the LaserWriter's input buffer. Note that only one flow control protocol can be used at a time, and for flow control to work correctly, the LaserWriter and the host must agree on which protocol is in use.

The parity parameter of 'setsccbatch' or 'setsccinteractive' has been changed to an options parameter that encodes both the treatment of the parity bit (as before) and the choice between Xon/Xoff and DTR flow control. The values of the options parameter now have the following meanings:

Xon/Xoff Flow Control

0 Ignore parity: (RCV high order bit ignored, XMIT high order bit is zero).
1 Odd parity: (RCV checked for odd parity, XMIT each character has odd parity)
2 Even parity: like odd but for even parity.
3 No parity: all eight bits are data and no checking is performed.

DTR Flow Control

4 Ignore parity (see 0 above)
5 Odd parity (see 1 above)
6 Even parity (see 2 above)
7 No parity (see 3 above)

The 9 pin connector's signal pin assignments are unchanged from before.
The set of signals on the DB-25 have been slightly expanded as follows:

2 Transmit Data
3 Receive Data
4 Request to Send (RTS) (optional)
6 Data Set Ready (DSR) (optional)
7 Signal Ground
20 Data Terminal Ready (DTR) (optional)

A cable diagram for connecting a LaserWriter to an RS-232 port might look
like this:

. RS-232 Port Pin -- Pin on LaserWriter

. 2 2
. 3 3
. 6 6
. 7 7
. 20 20

The optional signals need to be connected only if the host computer requires them. If DTR flow control is used, the DTR and DSR lines must be connected.

Availability of DTR flow control considerably simplifies use of the LaserWriter from some computer systems, including the IBM PC. To set up the IBM PC for communication with the LaserWriter over serial port 1 using DTR flow control, issue the commands:

MODE COM1:9600,n,8,1,p
MODE LPT1:COM1

To set up the LaserWriter, connect your serial cable from the LaserWriter to the RS-232 port, set the server mode switch on the LaserWriter to the '9600' position and send from the host computer to the LaserWriter the following
PostScript Code:

Caution:
--------
If you choose to use the PostScript code provided in this article, you assume all risks involved in making these changes. PostScript code, if not entered correctly, can place the LaserWriter into a condition requiring service.

%=========================================================
% Begin PostScript Code
%
serverdict begin 0 exitserver
statusdict begin
25 9600 4 setsccbatch
end
%
% end PostScript Code
%=========================================================

This changes the LaserWriter over to DTR flow control when executing in PostScript batch mode over the 25 pin connector. The LaserWriter will now be communicating with the RS-232 port using DTR (hardware) handshaking. This status is written into EEROM and will be permanent until changed.

To set up the LaserWriter to use DTR flow control during Diablo 630 emulation, send it the same program with 'setsccinteractive' substituted for 'setsccbatch'.

To change back to Xon/Xoff (software) handshaking, send this PostScript code to the printer:

%=========================================================
% Begin PostScript Code
%
serverdict begin 0 exitserver
statusdict begin
25 9600 0 setsccbatch
end
%
% end PostScript Code
%=========================================================

These programs need to be sent to the LaserWriter with the server mode switch set to '9600' even if setting up Diablo mode communications protocols. Once the handshake mode is changed, the user may then switch to Diablo mode (switch in 'Special') if desired.


Article Change History:
23 Feb 1995 - Reviewed for technical accuracy. Added PostScript caution.

Support Information Services

Published Date: Feb 18, 2012