LAMBDA 10-3 OPERATION MANUAL – REV. 3.03 (20110829)
81
8.5.3
8.5.3
8.5.3
8.5.3
Output Command Structure: BUSY and ERROR Lines
Output Command Structure: BUSY and ERROR Lines
Output Command Structure: BUSY and ERROR Lines
Output Command Structure: BUSY and ERROR Lines
The section Output Commands has a detailed explanation of the BUSY
BUSY
BUSY
BUSY and ERROR
ERROR
ERROR
ERROR signals.
That section also describes some of the factors to consider in deciding whether to read the
BUSY
BUSY
BUSY
BUSY and ERROR
ERROR
ERROR
ERROR signals. If you wish to read the status of the unit from your PC, this can
be done through the 4-bit input port on the printer adapter. The address of this port will be
the base address of the printer adapter, plus 1.
Table 8-4. PC printer adapter addresses
Address
Address
Address
Address
Base
Base
Base
Base
Input
Input
Input
Input Port
Port
Port
Port
LPT1 on Graphics Adapter
LPT1 on Graphics Adapter
LPT1 on Graphics Adapter
LPT1 on Graphics Adapter
956 (3BC hex)
957 (3BD hex)
LPT1 on Printer Adapter
LPT1 on Printer Adapter
LPT1 on Printer Adapter
LPT1 on Printer Adapter
888 (378 hex)
889 (379 hex)
LPT2 on Printer Adapter
LPT2 on Printer Adapter
LPT2 on Printer Adapter
LPT2 on Printer Adapter
632 (278 hex)
633 (279 hex)
The 4-bit input port only uses the 4 most significant bits at that address: bits 4, 5, 6, and 7.
Bits 0, 1, 2, and 3 are not used by the printer adapter and will normally read as 1. Bit 7 in
this input port is normally used by the printer to signal that it is “busy”. That bit is set by
the data signal from the printer to Pin 11 of the DB-25 parallel port connector on the back of
the computer. The Lambda 10-3 uses this same bit in the computer’s printer adapter to
indicate that it is BUSY, although the polarity of this signal may differ from the
corresponding printer BUSY signal.
With the Lambda 10-3 BUSY line connected to Pin 11 of the computer’s parallel printer port,
the input port can be read to obtain the status of the Lambda 10-3. Using Microsoft
QuickBasic, this would be done as follows:
Listing 8-2. Program to obtain the Lambda 10-3 status on the PC parallel port.
BUSY: OUT B2, 16
‘Required on some computers
‘before data can be read
FOR U = 0 TO 5
‘Delay to allow Lambda 10-3
NEXT U
‘to set busy flag
LOOK: STATUS = INP(INPORT)
‘Read in from printer port
STATUS = STATUS AND 128
‘Mask to read only bit 7
IF STATUS <> 128 THEN GOTO LOOK ‘Still Busy so loop
RETURN
‘Not Busy so return
The example given will loop until the BUSY signal is low. When developing a program, it is
advisable to insert an escape device in this loop, such as:
IF INKEY$<>”” THEN RETURN
If you are stuck in a tight, endless loop without an escape device, you will have to reset the
computer. This statement may be removed once the program is operating correctly.
An alternative command to use in Microsoft QuickBasic is WAIT. This statement has the
form:
WAIT
port
, AND
data
, XOR
data
Where the port is the address of the input port, and data is an integer in the range 0 to 255.
When the WAIT statement executes, program execution halts until the input port indicated
Summary of Contents for Lambda 10-3
Page 12: ...LAMBDA 10 3 OPERATION MANUAL REV 3 03 20110829 xii This page intentionally blank ...
Page 46: ...LAMBDA 10 3 OPERATION MANUAL REV 3 03 20110829 34 This page intentionally blank ...
Page 72: ...LAMBDA 10 3 OPERATION MANUAL REV 3 03 20110829 60 This page intentionally blank ...
Page 84: ...LAMBDA 10 3 OPERATION MANUAL REV 3 03 20110829 72 This page intentionally blank ...
Page 96: ...LAMBDA 10 3 OPERATION MANUAL REV 3 03 20110829 84 This page intentionally blank ...
Page 102: ...LAMBDA 10 3 OPERATION MANUAL REV 3 03 20110829 90 This page intentionally blank ...
Page 106: ...LAMBDA 10 3 OPERATION MANUAL REV 3 03 20110829 94 This page intentionally blank ...
Page 108: ...LAMBDA 10 3 OPERATION MANUAL REV 3 03 20110829 96 This page intentionally blank ...
Page 112: ...LAMBDA 10 3 OPERATION MANUAL REV 3 03 20110829 100 This page intentionally blank ...
Page 128: ...LAMBDA 10 3 OPERATION MANUAL REV 3 03 20110829 116 This page intentionally blank ...
Page 132: ...LAMBDA 10 3 OPERATION MANUAL REV 3 03 20110829 120 NOTES NOTES NOTES NOTES ...