Bi-directional parallel printer interface

Abstract: A parallel interface connects a data processor and a printer so that each may transmit information to the other or receive information from the other. The transmitted information from the data processor can be data or status signals. The data or status signals are transmitted over the same eight information lines between the data processor and the printer with a predetermined signal being sent over another line from the data processor to the printer prior to transmission over the eight lines to identify whether the transmitted information is data or status signals. The printer sends status signals to the data processor over the same eight information lines after sending a predetermined signal to the data processor over a further line that it is going to transmit.

Description: This invention relates to a bi-directional parallel interface between two devices and, more particularly, to a bi-directional parallel printer interface between a data processor and a printer in which either may transmit signals to the other or receive signals from the other. A parallel printer interface has previously been used between an IBM PC and a printer. Information was transmitted only from the IBM PC to the printer since the printer was a unidirectional printer, that is, a printer capable of only receiving information. As a result, the unidirectional printer required a printer operator panel at the printer to enable an operator to ascertain why the printer could no longer receive data from the IBM PC, for example. Thus, this prior printer interface could not be efficiently utilized if the printer was remote from the operator such as when driving the printer via a Local Area Network (LAN) or when the printer was shared by a plurality of users. The IBM PS/2 personal computer has a bi-directional parallel interface for using a software program, which is known as Data Migration Facility; in which data can be transferred from a 5 1/4" disk of the IBM PC to a 3 1/2" disk of the PS/2 personal computer to enable transfer of data from an IBM PC to a PS/2 personal computer. However, the PS/2 personal computer has not been capable of receiving information from a printer nor has there been a printer capable of supplying information to the PS/2 computer if the PS/2 computer were capable of receiving the information. Therefore, even with the PS/2 computer, is has been necessary for the operator to be near the printer to allow the operator to view the printer operator panel to determine the problem whenever information could not be sent to the printer. While the PS/2 computer has not been capable of receiving information from a printer, U.S. patent 4,651,278 to Herzog et al has communication from a host system to an all points addressable printer and vice versa by a printer interface to that the printer is bi-directional. However, there does not appear to be communication from the printer to the host system after printing begins. Therefore, information is not sent from the printer to the host system to inform a remote user of why information cannot be sent to the printer, for example. The interface of the aforesaid Herzog et al patent is an independent interface using a specific language. The interface of the aforesaid Herzog et al patent also transmits the information in structured field data streams, which are blocks, and not bytes. Thus, there can be no interruption of each block in the aforesaid Herzog et al patent to permit the printer to communicate with the host system. The interface of the present invention satisfactorily solves the problem of the printer being remote from the operator and the operator still being able to ascertain the status of the printer at any time without the operator having to physically go to the printer. The interface of the present invention transmits information byte by byte so that there can be an interruption at any byte boundary of the transmitted information by the receiver of the information or by the transmitter. This enables the data processor to stop sending information and to inquire of the printer why the printer is no longer accepting the information, for example. The interface of the present invention also enables the printer to send information at any time after the data processor recognizes the printer's request to send information and the data processor stops sending information. This allows the printer to inform the data processor that a font, for example, required by the information transmitted to the printer from the data processor is not available in the printer. The interface of the present invention accomplishes this through providing a first dedicated line between the data processor and the printer in which the data processor can inform the printer as to whether the information to be transmitted is data or status signals. The data signals would be print content signals for the printer to use for printing. The status signals, for example would inquire as to why the printer was not accepting information. By informing the printer that status signals, which are system control signals, are to be transmitted, the printer does not have to save as much memory as is necessary when data signals, which are print content signals, are being sent to the printer. The interface of the present invention also provides a second dedicated line between the data processor and the printer in which the printer can inform the data processor that the printer is going to send information to the data processor. This can be in response to the data processor's question so that the printer can explain to the data processor why the printer is not accepting information from the data processor. All information transmitted between the data processor and the printer is sent over the same eight information lines, which are separate from the dedicated lines. The interface of the present invention also is capable of permitting the printer to communicate to the data processor that it wants to interrupt the incoming stream of data signals from the data processor to tell the data processor something. For example, the printer may want to inform the data processor that it does not have a specific font that has been called out in the data signals being sent to the printer by the data processor. The interface of the present invention also is capable of utilization with unidirectional printers. An initial command signal from the data processor is not accepted by an unidirectional printer so that the unidirectional printer ignores signals usable only with a bi-directional printer, that is, a printer capable of transmitting or receiving information. An advantage of this invention is to provide a parallel interface to enable communications of a data processor with both unidirectional and bi-directional printers. Another advantage of this invention is to provide a parallel interface that enables a data processor to know whether it is communicating with a unidirectional or bi-directional printer. A further advantage of this invention is to provide a dynamic parallel interface that enables communication between a data processor and a bi-directional printer in either directions at any time. Still another advantage of this invention is to provide a parallel interface having a relatively high transfer rate of information. Fig. 1 is perspective view showing a data processor and a printer connected to each other by a parallel printer interface of the present invention. Fig. 2 is a schematic diagram of the parallel printer interface of the present invention showing connections between pins of a connector of the data processor and pins of a connector of the printer. Fig. 3 is a table showing levels of various signals at the data processor or printer producing interface states for the interface control protocols. Fig. 4 is a diagram of the interface states and the conditions under which there may be transition from one state to another. Fig. 5 is a flow chart showing initialization of the printer. Figs. 6-8 are flow charts showing a main loop of the printer. Fig. 9 is a flow chart showing a receiving status channel operation of the data processor or the printer. Fig. 10 is a flow chart showing a receiving data channel operation of the data processor or the printer. Fig. 11 is a flow chart showing a transmit status channel operation of the data processor or the printer. Fig. 12 is a flow chart showing a transmit data channel operation of the data processor. Fig. 13-15 are flow charts showing initialization of the data processor. Fig. 16-18 are flow charts showing a main loop of the data processor. Fig. 19 is a timing diagram showing the relationship between signals driven by the printer and signals driven by the data processor when the data processor initializes the printer through the interface of the present invention. Fig. 20 is a table showing the duration of each timing signal of Fig. 19. Fig. 21 is a timing diagram showing the relationship between signals driven by the data processor and signals driven by the printer when the data processor is seeking use of the interface of the present invention to transmit status signals to the printer. Fig. 22 is a table showing the duration of each timing signal of Fig. 21. Fig. 23 is a timing diagram showing the relationship between signals driven by the data processor and signals driven by the printer when the printer is seeking to use the interface of the present invention to send status signals to the data processor. Fig. 24 is a table showing the duration of each timing signal of Fig. 23. Fig. 25 is a timing diagram showing the relationship between signals from the data processor and signals from the printer when there is a byte by byte transfer from the data processor to the printer or vice versa. Fig. 26 is a table showing the duration of each timing signal of Fig. 25. Fig. 27 is a flow chart showing a sending protocol in the data processor for transmitting bytes. Fig. 28 is a flow chart showing a receiving protocol in the data processor for receiving bytes. Fig. 29 is a block diagram of a driver and receiver circuit in the data processor for producing or receiving information signals over one of the eight information lines between the data processor and the printer. Fig. 30 is a block diagram of a driver circuit in the data processor for producing a -STROBE or -AUTOFD signal as its output. Fig. 31 is a block diagram of a driver circuit in the data processor for producing an -INIT or -SLCTIN signal as its output. Fig. 32 is a block diagram of a receiver circuit in the data processor for receiving a -ERROR, +SLCT, or +PE signal from the printer. Fig. 33 is a block diagram of a receiver circuit in the data processor for receiving a -ACK or +BUSY signal from the printer. Fig. 34 is a block diagram of a driver and receiver circuit in the printer for producing or receiving information signals over one of the eight information lines between the data processor and the printer. Fig. 35 is a block diagram of a driver circuit in the printer for producing a +BUSY signal as its output. Fig. 36 is a block diagram of a driver circuit in the printer for producing a -ACK signal as its output. Fig. 37 is a block diagram of a driver circuit in the printer for producing a -ERROR, +SLCT, or +PE signal as its output. Fig. 38 is a block diagram of a receiver circuit in the printer for receiving a -INIT or -SLCTIN signal from the data processor. Fig. 39 is a block diagram of a receiver circuit in the printer for receiving a -STROBE or -AUTOFD from the data processor. Fig. 40 is a diagram of transmit hardware states for the printer. Fig. 41 is a diagram of receive hardware states for the printer. Referring to the drawings and particularly Fig. 1, there is shown a PS/2 computer 40, which is a data processor, connected to a printer 41 by a cable 42. One suitable example of the cable 42 is sold by International Business Machines Corporation as Part No. 68X3949. The cable 42 has a cable terminal connector 43 on one end connected to a twenty-five pin female D connector 44 of the PS/2 computer 40 and a cable terminal connector 45 at its other end connected to a thirty-six pin Centronics compatible connector 46 of the printer 41. The connections of the various pins of the connectors 44 and 46 are shown in Fig. 2 with the signal between the connected pins being shown at each pin. The direction of each signal is indicated by an arrow if unidirectional and by arrows on opposite ends if bi-directional. Some of the signals also are identified by a different name under the "Bi-Directional Protocol" heading. The interface signals between the PS/2 computer 40 and the printer 41 are: DATA1-8 Information signals for transmitting data or status signals from the PS/2 computer 40 to the printer 41 and status signals from the printer 41 to the PS/2 computer 40. -STROBE Clocks information into the printer 41 a byte at a time. When the PS/2 computer 40 is receiving information from the printer 41, this signal verifies the completed transfer of each byte to the PS/2 computer 40 from the printer 41. Totem pole drivers are used to improve the rise time of this signal. -ACK This signal acknowledges that the information has been received by the printer 41 through producing a negative going pulse to verify the completed transfer of each byte. When the PS/2 computer 40 is receiving information from the printer 41, this signal clocks the information into the PS/2 computer 40. Totem pole drivers are used to improve the rise time of this signal. +BUSY This signal provides a DC level (high) to indicate that the printer 41 cannot receive information, either data or status signals. This signal also is active when the printer 41 is off line or reporting an error. When this signal is low, the printer 41 can receive information. Totem pole drivers are used to improve the rise time of this signal. -AUTOFD This is the mirror image of +BUSY and is from the PS/2 computer 40 so that it is interpreted as +PS/2 Busy. +SLCT This signal from the printer 41 is interpreted as Printer Request to Send (-Prt 25 RTS) when the PS/2 computer 40 is arbitrating for control of the parallel interface. This signal is normally held high by the printer 41 so as not to be requesting to send and goes low only when the printer 41 wants to -SLCTIN This signal from the PS/2 computer 40 is interpreted as -PS/2 Request to Send (-PS/2 RTS) and is transmitted to lock control of the parallel interface for transmitting signal must be set low (-PS/2 RTS = True) to cause the printer 41 to drop its +BUSY signal and receive information, either data or status signals, from the PS/2 computer 40. -INIT This signal is interpreted as -PS/2 Status Qualifier (-PS/2 StQ) when transmitted from the PS/2 computer 40 in the bi-directional mode. When this signal goes low, it causes +BUSY to go high until the printer 41 is prepared to receive status signals from the PS/2 computer 40 at which time the printer 41 will set +BUSY low. This signal must be left low for the duration of transmission of the status signals. Since this signal is used by the PS/2 computer 40 to initialize the printer 41 and the PS/2 computer 40 may initialize the printer 41 at any time with the printer 41 in any mode, the PS/2 computer 40 must not allow -STROBE to fall during a 25 printer initialization sequence. -ERROR This signal from the printer 41 is the mirror image of -INIT. This signal is interpreted as -Printer Status Qualifier (-Prt StQ) when the printer 41 is in the bidirectional mode. +PE This signal is interpreted as -Service Request (-Serv Req) when the printer 41 is in the bi-directional mode. When the printer 41 detects a condition that the PS/2 computer 40 has armed it to detect, this signal will be set low until the PS/2 computer 40 has been informed of the detection. While the connections between the connectors 44 (see Fig. 1) and 46 have been shown in Fig. 2 for use with the lines of the cable 42 (see Fig. 1), it should be understood that a new cable could be utilized instead of the cable 42 in which the pin 25 (see Fig. 2) of the connector 44 (see Fig. 1) of the PS/2 computer 40 can be connected to PARITY rather than to ground. The new cable also would connect the pin 25 of the connector 44 (see Fig. 1) to pin 16 of the connector 46 (see Fig. 1) of the printer 41 rather than pin 30 (see Fig. 2). This arrangement would be utilized when parity is to be generated and checked. When the PS/2 computer 40 (see Fig. 1) and the printer 41 are powered on, each assumes that it is operating in a mode in which the printer 41 is unidirectional rather than bi-directional. The basic assumptions are that data transfer is unidirectional from the PS/2 computer 40 to the printer 41, the printer 41 can accept data as long as +BUSY is not active, the printer 41 will correctly capture data from the PS/2 computer 40 if the correct set up, STROBE width, and hold time requirements are met, the printer 41 will verify receipt of a byte by pulsing -ACK, and the printer 41 may be initialized at any time, whether +BUSY is high or low, by the PS/2 computer 40 sending a -INIT signal active (low) for at least fifty microseconds, and the printer 41 will proceed to print all queued data before setting +BUSY low. To activate the bi-directional mode so that the printer 41 can transmit information as well as receive it, the PS/2 computer 40 must perform the following sequence of operations: 1. Attempt to send any Status Command: a) The PS/2 computer 40 sets -INIT low and the printer 41 will respond by setting +BUSY high (+BUSY need not be low to start); (b) When the printer 41 is prepared to receive the Status Command, it will set +BUSY low to allow the Status Command to be sent. If the printer 41 does not set +BUSY low within 500 microseconds, the PS/2 computer 40 can assume that the printer 41 is uni-directional or bi-directional but cannot respond due to hardware fault. 2. Release control of the interface and wait for response of the printer 41: a) The printer 41 will respond to the Status Command within 0.5 second when it is bi-directional; (b) If no response is received within 0.5 second, the PS/2 computer 40 should assume that the printer 41 is only capable of unidirectional operation. 3. If no response is forthcoming, the printer 41 is initialized by the PS/2 computer 40 setting the -INIT signal low for at least fifty microseconds to assure that the PS/2 computer 40 and the printer 41 will remain in sync if the printer 41 is bi-directional but is unable to respond due to an electrical fault in the interface. 4. If a response is received, the PS/2 computer 40 knows that the printer 41 is in the bi-directional mode and will only return to Receive Only if commanded by the PS/2 computer 40, initialized, or powered off. When operating in the bi-directional mode, interface ownership by the PS/2 computer 40 or the printer 41 and the Data Status Channel transmissions are managed by the use of a state model of the Interface Control protocols (see Fig. 3) in which the allowed states are defined. These states are indicated by examining the levels of Status Qualifier (StQ), Busy, and Request to Send (RTS) signals from the PS/2 computer 40 or the printer 41. The interface states of Fig. 3 are as follows: READY TO RECEIVE When in this state, the PS/2 computer 40 or the printer 41 is completely prepared to receive Data or Status bytes. For example, the PS/2 computer 40 has allocated a buffer for the incoming bytes, is aware if the bytes are Data or Status, and has completely programmed the Direct Memory Access (DMA) or Bus Master (interface) hardware to accept bytes if these facilities are to be used. When a transmitter sees this state in a receiver, it may begin transfer of information immediately. If the PS/2 computer 40 or the printer 41 is in this state and receiving Data or Status Channel bytes, it may return to NOT READY TO RECEIVE when its counterpart leaves the TRANSMIT DATA or TRANSMIT STATUS state. This state is the idle state of a unidirectional printer. NOT READY TO RECEIVE The printer 41 or the PS/2 computer 40 enters this state when it is processing a previously received byte, is off line, is processing a change of the StQ or RTS input signal, is changing to another state, or is idle. When the transmitter sees its receiver in this state, it should not transfer bytes. If the PS/2 computer 40 or the printer 41 enters this state from the READY TO RECEIVE state asynchronously, is must be capable of taking up to one byte because of a race with the other of the PS/2 computer 40 and the printer 41. This is the normal idle state of the PS/2 computer 40 or the bi-directioanl printer 41. REQUEST INTERFACE FOR DATA When the PS/2 computer 40 is in this state, it is attemping to gain control of the interface to transmit data. After waiting a one microsecond minimum "de-race" delay without encountering its RTS input signal going true as long as its StQ signal remains false, the PS/2 computer 40 will transition to the TRANSMIT DATA state as soon as the printer 41 goes READY TO RECEIVE. TRANSMIT DATA When the PS/2 computer 40 is in this state, it has control of the interface and is actively transmitting on the logical Data channel. DMA or Bus Master transmission should not be initiated until this state is reached. The PS/2 computer 40 will exit this state upon completing the transmission requested or if its StQ or RTS input signal goes true. The PS2/ computer 40 must recognize the printer 41 is in the READY TO RECEIVE state and send a byte at least every ten milliseconds. If the PS/2 computer 40 cannot transmit a byte within the required ten milliseconds, it should drop control of the interface until the data is available. SEND A CHANNEL BREAK If the PS/2 computer 40 is in this state, it is attempting to gain control of the interface to transmit Status signals. It will transition to the TRANSMIT STATUS state after waiting a one microsecond minimum "de-race" delay without encountering the StQ input signal going true when the printer 41 is in the READY TO RECEIVE state. If the printer 41 is in this state, it is attempting to gain control of the interface to send a response to a previous request from the PS/2 computer 40. The printer 41 will enter the TRANSMIT STATUS state after waiting the one microsecond minimum "de-race" delay without encountering the StQ input going true when the PS/2 computer 40 enters the READY TO RECEIVE state. TRANSMIT STATUS This state is used to actively send Status information. DMA or Bus Master transmission should not be initiated until this state is reached. The PS/2 computer 40 or the printer 41 will exit this state upon completing the transmission requested or if its StQ input signal goes true. The PS/2 computer 40 or the printer 41 must recognize its counterpart is in its READY TO RECEIVE state and send a byte at lease every ten milliseconds. If it cannot transmit a byte within the required ten milliseconds, it should drop control of the interface until the data is available. The flow chart of Fig. 4 discloses a schematic representation of the defined states, the allowed transitions, and the requirements to make a transition. In Fig. 4, the name of the state in the box describes the condition of the outputs of the PS/2 computer 40 or the printer 41, and the notations on the path lines describe the required state of the inputs that must be present to take that specific path. The following explains the notes referenced on Fig. 4: 1. As the PS/2 computer 40 or the printer 41 enters the READY TO RECEIVE state, the level of the StQ signal should be noted to determine if Data or Status information is being received. For the PS/2 computer 40 receiving in the Programmed Input Output (PIO) mode, the state of -ERROR should be noted as every byte is received. 2. The five millisecond minimum dwell time in the NOT READY TO RECEIVE state is only required when transmitting to the PS/2 computer 40 to assure that the PS/2 computer 40 will not mix data and status transmission. Since the PS/2 computer 40 in the PIO mode has no hardware to cause interrupt upon change of any of its -ERROR (StQ), +SLCT (RTS), or +BUSY (Busy) input, each byte must be noted and compared against expectation of Data or Status information as it is received by checking the level of the -ERROR signal. For the PS/2 computer 40 using DMA Slave or Bus Master capabilities, interrupts may be generated upon change of its -ERROR (StQ), +SLCT (RTS), or +BUSY (Busy) input. The five millisecond dwell time allows the PS/2 computer 40 to properly service these interrupts. 3. While in the NOT READY TO RECEIVE state, the PS/2 computer 40 will prepare a "What" status command in response to the printer 41 posting a Service Request (+PE = low). 4. Unequal delays are used to prevent repeated collision for interface control. 5. The PS/2 computer 40 or the printer 41 must recognize its counterpart is in READY TO RECEIVE and send a byte at least every ten milliseconds. If the PS/2 computer 40 or the printer 41 cannot transmit a byte within the required ten milliseconds, it should drop control of the interface until the information is available. While the printer 41 is not shown and described as transmitting data to the PS/2 computer 40 so that it does not enter the REQUEST INTERFACE FOR DATA or TRANSMIT DATA state, is should be understood that the printer 41 could transmit data to the PS/2 computer 40. Thus, only -ERROR would have to change its level for this to occur, and the REQUEST INTERFACE FOR DATA and TRANSMIT DATA states would be applicable to the printer 41. All of the Interface Control protocols are implemented in the PS/2 computer 40 and the printer 41 in microcode so that they are designed to be tolerant for a wide variance in the times between steps of the protocol. The flow charts of Figs. 5-18 disclose the Interface Control protocols with Fig. 5 showing initialization of the printer 41, Figs. 6-8 disclosing the main loop of the printer 41, Fig. 9 showing the receive status channel, Fig. 10 disclosing the receive data channel, Fig. 11 showing the transmit status channel, Fig. 12 disclosing the transmit data channel, Figs. 13-15 disclosing initialization of the PS/2 computer 40, and Figs. 16-18 showing the main loop of the PS/2 computer 40. Whenever a flow chart has a block referring to another figure, this means to refer to that figure and perform the steps of the flow chart of that figure. Initialization of the printer 41 by the PS/2 computer 40 may occur at any time. Initialization of the printer 41 occurs during power on reset or when certain conditions occur in the flow charts of Figs. 6-8. Fig. 19 shows the timing relationship of the signals driven by the PS/2 computer 40 and the printer 41 during initialization of the printer 41. Fig. 20 discloses the time for each of T1 to T6 in Fig. 19. The printer 41 will print all buffered data before dropping +BUSY after -INIT rises to cause initialization of the printer 41. The printer 41 assumes the falling edge of a -INIT signal is a CHANNEL BREAK signal by the PS/2 computer 40 with -SLCTIN low and +BUSY may be dropped to allow receipt of Status information. The printer 41 sets +BUSY high as a result of the falling or rising edge of -INIT through hardware, but the microcode of the printer 41 sets +BUSY low shortly after it goes high and then +BUSY paces incoming Status information. When the PS/2 computer 40 wants to request the interface for transmission of Status information to the printer 41, the printer 41 must be in its NOT READY TO RECEIVE state to enable this transaction to begin. Fig. 21 shows the timing relationship of the signals driven by the PS/2 computer 40 and the printer 41. Fig. 22 discloses the time for each of T1 to T4 of Fig. 21. When the printer 41 wants to request the interface to transmit Status information to the PS/2 computer 40 (This is called CHANNEL BREAK.), the PS/2 computer 40 must be in its NOT READY TO RECEIVE status. Fig. 23 discloses the timing relationship of the signals driven by the PS/2 computer 40 and the printer 41, and the time for each of T1 to T3 of Fig. 23 is in Fig. 24. Bytes of information are sent from the PS/2 computer 40 to the printer 41 or vice versa through a "Closed Loop Handshake." Fig. 25 discloses the timing relation for transmitting each byte from the PS/2 computer 40 to the printer 41, and the time for each of T1 to T10 of Fig. 25 is in Fig. 26. When bytes of information are being transmitted from the printer 41 to the PS/2 computer 40, -STROBE and -ACK should be swapped in Fig. 25, and +BUSY of Fig. 25 replaced with -AUTOFD. The "Closed Loop Handshake" requires the PS/2 computer 40 to have the sending protocol of Fig. 27 when transmitting from the PS/2 computer 40 to the printer 41; the sending protocol is part of an integrated circuit in the PS/2 computer 40. In the flow chart of Fig. 27, the value for each of Data Setup, Strobe Hold, and Data Hold times is the same as that required for automatic STROBE generation. The "Closed Loop Handshake" requires the PS/2 computer 40 to have the receiving protocol of Fig. 28 when the PS/2 computer 40 is receiving bytes from the printer 41; the receiving protocol is part of the same integrated circuit as the sending protocol of Fig. 27. To produce and receive the various signals, three different drivers and one receiver are utilized in the printer 41 and two of the three drivers and the receiver are employed in the PS/2 computer 40. The drivers are a tri-state (TS) driver, an open collector (OC) driver, and a totem pole (TP) driver. The receiver is an LSTTL (LS) receiver. Each of the devices has key electrical characteristics required by the interface. The tri-state driver must be able to be tri-stated and present a minimum impedance of 20K ohms to +5 volts or ground when tri-stated. When the tri-state driver is enabled, it must be able to sink at least 24 milliamps with a maximum down level of 0.5 volt and must be able to source at least 15 milliamps with a minimum up level of 2 volts. The tri-state driver must be able to sustain a voltage on its output as much as 5.5 volts above its VCC when powered off. Suitable examples of the tri-state driver are 74LS244, 74LS245, 74F125, and 74F126. The open collector driver must or able to sink at least 16 milliamps with a maximum down level of 0.5 volt. When the open collector driver is off, it must present a minimum impedance of 100K ohms to ground. The open collector driver must be able to sustain a voltage on its output as much as 5.5 volts above its VCC when powered off. Suitable examples of the open collector driver are 7406 and 7407. The totem pole driver must be able to sink at least 24 milliamps with a maximum down level of 0.5 volt and must be able to source at least 15 milliamps with a minimum up level of 2 volts. The totem pole driver also must be able to sustain a voltage on its output as much as 5.5 volts above its VCC when powered off. Suitable examples of the totem pole driver are 74LS244, 74LS245, 74F125, and 74F126. The LSTTL receiver must have a minimum high level input voltage of 2 volts and a maximum low level input voltage of 0.8 volt. The LSTTL receiver requires a maximum of 1.6 milliamps of sink current and 40 microamps of source current from its driver. The LSTTL receiver must be able to sustain a voltage on its input as much as 5.5 volts above its VCC when powered off. Suitable examples of the LSTTL receiver are 74LS04, 74LS244, and 74LS245. The PS/2 computer 40 has driver and receiver circuits for receiving and transmitting data and status information. One of the circuits, which are equal in number to eight information lines between the PS/2 computer 40 and the printer 41, is shown in Fig. 29. Each of the -STROBE and -AUTOFD signals is produced by a driver circuit (see Fig. 30) in the PS/2 computer 40. Thus, there are two of the driver circuits of Fig. 30 in the PS/2 computer 40. Each of the -INIT and -SLCTIN signals is produced by a driver circuit (see Fig. 31) in the PS/2 computer 40. Accordingly, there are two of the driver circuits of Fig. 31 in the PS/2 computer 40. The PS/2 computer 40 has three separate receiver circuits (see Fig. 32) for receiving -ERROR, +SLCT, and +PE signals from the printer 41. The PS/2 computer 40 has two separate receiver circuits (see Fig. 33) for receiving -ACK and +BUSY signals from the printer 41. The printer 41 has driver and receiver circuits for receiving and transmitting information. One of the driver and receiver circuits, which are equal in number to the eight information lines between the PS/2 computer 40 and the printer 41, is shown in Fig. 34. The printer 41 has a driver circuit (see Fig. 35) for producing the +BUSY signal. The printer 41 has a driver circuit (see Fig. 36) for producing the -ACK signal. Each of the -ERROR, +SLCT, and +PE signals is produced by a separate driver circuit (see Fig. 37) in the printer 41. Thus, the printer has three of the driver circuits of Fig. 37. Each of the -INIT and -SLCTIN signals from the PS/2 computer 40 is received at the printer 41 through a separate receiver circuit (see Fig. 38). Each of the -STROBE and -AUTOFD signals from the PS/2 computer 40 is received at the printer 41 through a separate receiver circuit (see Fig. 39). The closed loop transmit process, which is performed on a byte to byte basis by the hardware of the printer 41, is shown in a hardware state diagram in Fig. 40. It is assumed that the Direct Memory Access (DMA) ability is in the printer 41 with independent transmit and receive DMA channels. The following are definitions of terms used in conjunction with Fig. 40 with the asterisk (*) meaning AND: TxDMAArm Set or Reset by microcode of the printer 41 to enable or disenable DMA transmit. This bit should be set low before modifying any Transmit DMA controls since this bit is sampled by the Synchronous Control Machine to make branching decisions. TxDMAPar/Ser Set or Reset by the microcode of the printer 41 to set the port for transmit with a logical one for parallel transmission and a logical zero for serial transmission. TxCount=0 This indicates that the Transmit DMA's transfer account has been exhausted. ParOBFull (Parallel Output Buffer Full) Set when the DMA controller loads Parallel Macro to indicate Data Available. Reset when the data is successfully transmitted. ParDMATx TxDMAArm * TxDMAPar/Ser * TxCount = 0 ParTxDone Set when authorized parallel transmit is done. This causes interrupt of a program in the printer 41 so that another program in the printer 41 can execute. Reset by the microcode of the printer 41. Time400 Goes active 400 nanoseconds after started to insure the 400 nanosecond set up time is met. Short AckPulse Drives -ACK low for 500 nanoseconds. The receive process, which is performed on a byte to byte basis by the printer 41, is shown in a hardware state diagram (see Fig. 41). The following are definitions of terms used in conjunctions with Fig. 41 with the asterisk (*) meaning AND: RxDMAArm Set or Reset by microcode of the printer 41 to enable or disable DMA Receive. This byte should be set low before modifying any Receive DMA controls since this bit is sampled by the Synchronous Control Machine to make branching decisions. RxDMAPar/Ser Set or Reset by the microcode of the printer 41 to set the port for receipt with a logical one for parallel transmission and a logical zero for serial transmission. RxCount=0 This indicates that the Receive DMA's transfer count has been exhausted. -INIT Parallel interface signal -INIT. RxData/Status Set or Reset by microcode of the printer 41 to tell the hardware the expected state of the -INIT line during reception. INITMisMatch This indicates that the -INIT signal at the time of the last received -STROBE did not match RxData/Status. ParDMARx RxDMAArm * RxDMAPar/Ser * RxCount = 0 * INITMisMatch * MatchQ ParDMATx Same as for Fig. 40. FastBytes Ser or Reset by the microcode of the printer 41 to enable or disable "Closed Loop Handshake" receiving. SyncBusy Set when a byte is received. Reset when DMA reads the data from the parallel port or when the microcode reads the parallel port and the received hardware is in the "SET ParRxDone" state. DMABusy Used to hold the +BUSY signal to the PS/2 computer 40 at the end of DMA transfers. Reset by hardware or microcode. AbortRx Set if Synchronous Control Machine is waiting for -STROBE(idle) and RxDMAArm is reset. This causes interrupt of a program in the printer 41 so that another program in the printer 41 can execute. Reset by software. ParRxDone Active when authorized parallel reception is done. This causes interrupt of a program in the printer 41 so that another program in the printer 41 can execute. Long AckPulse Drives -ACK low for 2-4 microseconds. ArmDPQ Set or Reset by microcode of the printer 41 to enable or disable the Deselect on Positive Query (DPQ) comparator. MatchESC (Match Escape) Set when data is latched if data = hexadecimal 1B. Reset by hardware or microcode. MatchQ Set when data is latched if data = hexadecimal 51 and MatchESC is set. Reset by hardware or microcode. The following is an example of how bytes are transmitted by the "Closed Loop Handshake": Transmitter (PS/2 Computer 40) Receiver (Printer 41) 1. Place new data on DATA 1-8 pins. 1. Set pacing control signal (+BUSY low) and confirming (-ACK high) inactive. 2. Wait minimum data setup time (T1 of Fig. 26). 3. Wait for receiver's pacing control signal (+BUSY low) and confirming clock (-ACK high to be inactive. 4. Generate leading edge of clock (-STROBE low). 2. Read data from because of - STROBE being 3. Set pacing control signal (+BUSY high) and confirming clock (-ACK low) active. 4. Save the data. 5. Wait for either the clock time out (T7 of Fig.26) to expire or the leading edge of the receveir's confirming clock (-ACK going low). 5. If minimum confirming clock time out (T7 of Fig. 26) has expired and transmitter's clock (-STROBE high) is inactive, set confirming clock (-ACK high) 6. Generate trailing edge of clock (-STROBE high). 7. If not already detected, wait for the leading edge of confirming clock (-ACK going low). 8. If more to transmit, go to Step 1. 6. Process data, and go to Step 1. The PS/2 computer 40 and the printer 41 interact to provide a function or recover from a situation. An example of the PS/2 computer 40 and the printer 41 interacting when the printer 41 informs the PS/2 computer 40 of completion of a job is as follows: PS/2 Computer 40 Printer 41 Send page description for last page of a job via via "Data"channel . Accept, buffer, and process page of a job description as received. Notify printer that job is last ended via "Data" channel by specific sequence of bytes on "Data" channel. Note previous page as page of job. Begin sending first page of another job to printer via "Data" channel. While accepting, buffering and processing incoming page description, last page of a previously received job is completely printed. Activate "Service Request" signal (+PE goes low) while still accepting, buffering, and processing incoming page description. Notice that "Service Request" is active and suspend sending page description via "Data" channel. Continue processing is previously receveid page description. Release interface by going to NOT READY TO RECEIVE state. Request interface for "Status" nel (CHANNEL BREAK) by both RTS (-SLCTIN) and StQ (-INIT) going low simultaneously. Note request for chan-channel by -SLCTIN and -INIT going low simultaneously and prepare to receive a question. Transmit a "What" question via "Status" channel. Accept question. Release interface by going to Request" NOT READY TO RECEIVE SLCTIN and INIT high) state. Deactivate "Service Request" signal (-PE (goes high). Prepare "Job Complete" reply to "What" question from sequence of bytes in memory. Request interface for "Status" channel (CHANNEL BREAK) by +SLCT and -ERROR going down. Note request for "Status" channel and prepare to receive answer by going to READY TO RECEIVE state. Accept answer. Transmit "Job Complete" reply via "Status" channel. Release interface by +SLCT and - ERROR going high. Inform user that job printing is complete by software in the PS/2 computer 40 putting a message on its screen. Request interface for "Data" ta"channel by -SLCTIN going with - INIT staying high. Note request for "Da-channel by -SLCTIN low going low and -INIT staying high and prepare to receive page description. Resume suspended transmission of page description. Another example of interaction between the PS/2 computer 40 and the printer 41 is when the PS/2 computer 40 requests the printer 41 to use a font that is not in the memory of the printer 41. The operations are as follows: A third example of interaction between the PS/2 computer 40 and the printer 41 is when there is a remote operator panel query for paper size. The operations are as follows: PS/2 Computer 40 Printer 41 While page description is being sent to printer, a separate Operator Panel task (a software program) in the PS/2 computer 40 determines it needs to ask the printer a question. Accept, buffer, and process page description. The Operator Panel task causes another software program in the PS/2 computer 40 to suspend sending page description. Continue processing page description already received. Release interface by setting -SLCTIN high. Request Interface for "Status" channel (CHANNEL BREAK) by setting -SLCTIN and -INIT low simultaneously. Note Request for "Status" channel and prepare to receive a question by setting +BUSY low. Transmit "Query Paper Size" question. Accept "Status" channel transmission. Release interface by setting -SLCTIN and -INIT high. Prepare answer to question from memory. Note request for "Status" channel and prepare to receive answer to question by setting -AUTOFD low. Request Interface for "Status" channel by setting +SLCT and -ERROR low. Receive answer via "Status" channel. Transmit answer via "Status" channel. Release Interface by setting -SLCT and -ERROR high. Pass answer to Operator Panel task. Request Interface for "Data" channel by setting -SLCTIN low with -INIT high. Note request for "Data" channel and prepare to receive page description by setting +BUSY low. Resume sending page description via "Data" channel. Receive, buffer, and process page description. An advantage of this invention is that an interface can be used with a unidirectional or bi-directional printer. Another advantage of this invention is that it reduces the amount of memory for a printer to save when it receives a system control signal in comparison with when it receives a printer content signal. A further advantage of this invention is that channel bandwidth is increased so that the printing job is completed faster. Still another advantage of this invention is that the same information lines can be utilized to transmit data or status information between a data processor and a printer. A still further advantage of this invention is that there is requirement for latching any data in a data processor. Yet another advantage of this invention is that there is no removal of information from the information lines until the information has been accepted by the receiver. A yet further advantage of this invention is that printer status can be ascertained by a user without the user being physically present at the printer. Yet still another advantage of this invention is that an inquiry can be sent to a printer from a data processor without interrupting the information stream to the printer. A yet still further advantage of this invention is that a printer can interrupt incoming information. While the invention has been particularly shown and described with reference to a preferred embodiment thereof, it will be understood by those skilled in the art that the foregoing and other changes in form and details may be made therein without departing from the scope of the invention as defined by the claims.

Claims: A printer for a data processor having an interface allowing bidirectional communication, said interface comprising: a group of information lines for carrying information between the printer and the data processor; characterized in that it further comprises: a first dedicated line between the data processor and said printer in which the data processor can inform the printer as to whether the information to be transmitted through said group of information line is data or control signals; a second dedicated line between the data processor and said printer in which the printer can inform the data processor that the printer is going to send control signals to the data processor; means for causing transmission of control signals to said data processor byte by byte so that there can be an interruption at any byte boundary of the information being transmitted. A data processor having an interface for a bidirectional printer as defined in claim 1, said interface comprising: a group of information lines for carrying information between the printer and the data processor; characterized in that it further comprises: a first dedicated line between the data processor and said printer in which the data processor can inform the printer as to whether the information to be transmitted through said group of information line is data or control signals; a second dedicated line between the data processor and said printer in which the printer can inform the data processor that the printer is going to send control signals to the data processor; means for causing transmission of data or control signals to said printer byte by byte so that there can be an interruption at any byte boundary of the information being transmitted. Data processor according to claim 2 characterized in that it further comprises means for determining whether said printer is bi-directional and is responsive to said control signals. Data processor according to claim 3 characterized in that it further comprises means for determining whether a response signal is received from said printer within a predetermined period of time after a control signal is transmitted to said printer.

Inventors: BECK JAMES L, BOOTH JAMES R, BUCHANAN JAMES C, CLAFFEY-COHEN MARGARET E, COLE CARL P, LOUIE TIMOTHY J, NEEL II ALAN F, OLIVER LYNN M, WARD JAMES P, WEBB JAMES F, BECK, JAMES LEE, BOOTH, JAMES RONALD, BUCHANAN, JAMES, CLAFFEY-COHEN, MARGARET ELIZABETH, COLE, CARL PRICE, LOUIE, TIMOTHY JUNG-MING, NEEL II, ALAN FOBES, OLIVER, LYNN MARVIN, WARD, JAMES PETER, WEBB, JAMES FRANCIS, BUCHANAN, JAMES CLOYD
Applicants: IBM, INTERNATIONAL BUSINESS MACHINES CORPORATION
Application year: 1992
Main classification: G06F3
IPC codes: B41J29, G06F3, G06F13