Instruction manual
A758 Owner’s Guide Chapter 6: Communiction Interface
September 1999 90
Communication Overview
In order for the printer to communicate with the host, a communication link must
be set up. The A758 printer supports either the RS-232C or the IEEE 1284 parallel
communication interfaces. Other communication interfaces may be available as
options.
The RS-232C interface has a protocol associated with it that the host must
understand and adhere to. Only when the interface parameters match and the
proper protocol is used will the host and the printer be able to communicate.
Once the communication link is established, commands can be sent to the printer.
This section describes how to send commands to the printer using DOS and
BASIC. This section does not take into account the necessary protocol, but is
meant as a general introduction to how the printer functions.
Using DOS to Send Commands
One way of getting commands to the printer is to send them directly from DOS.
For example, assuming that the printer and computer are set to the same
communications parameters, the command:
COPY CON: COM1:
sets the computer up such that the hexadecimal code corresponding to any key
that was pressed would be sent to the communication port COM1 when the
COPY mode is exited. If the printer is connected to COM1, then the data will go
to the printer.
Exit the COPY mode by typing:
CTRL Z
and then pressing the ENTER key. Once the computer knows to direct data from
print commands to the proper port, commands can be sent from any software
program.
Using BASIC to Send Commands
In BASIC, printer commands are sent as a string of characters preceded by the
LPRINT command. For example:
LPRINT CHR$(&H0A)
sends the hexadecimal number 0A to the printer, which causes the printer to
print the contents of its print buffer. Commands sent prior to 0A tell the printer
exactly how data should appear on the paper. For example:
LPRINT CHR$(&H12); "ABC"; CHR$(&H0A)
sends the hexadecimal numbers 12 41 42 43 0A to the printer. This causes the
printer to set itself to double wide mode (12), load the print buffer with “ABC”
(41 42 43), and finally, print (0A). Again, the communication link that the BASIC
program configures to must be matched to that of the printer.