IBM Proprinter Emulation

Graphics

Graphics mode gives the user complete control over every dot position on the paper. Graphics may be printed with various horizontal densities from 60 to 240 dpi, and a vertical density of 72 dpi.

Each byte of graphics data represents a vertical column of eight dots, with the MSB (most significant bit) corresponding to the top wire of the print head. Turning a bit on causes a dot to be printed. The bit values corresponding to each wire of the print head are shown below:

wire 1

128

(80 hex)

wire 2

64

(40 hex)

wire 3

32

(20 hex)

wire 4

16

(10 hex)

wire 5

8

(08 hex)

wire 6

4

(04 hex)

wire 7

2

(02 hex)

wire 8

1

(01 hex)

The appropriate bit values are added together to fire the desired wires. For example, a byte of graphics data with the value 128 (80 hex) will fire the top wire, wire 1. A value of 192 (C0 hex) will fire the top two wires, wires 1 and 2. A value of 11 (0B hex) will fire wires 5, 7 and 8.

Each graphics sequence contains two bytes (n1 and n2) that specify how many bytes of graphics data follow. The first byte, n1, can specify values up to 255. If that is sufficient, then n2 is set to zero. For values greater than 255, n2 comes into play. The n2 byte specifies multiples of 256. For example, to specify 520 bytes of graphics data, n1 = 8 and n2 = 2. The bytes of graphics data are strung together to create a graphics line that is eight dots high, and n1 + (n2 x 256) dots long. Be sure to provide the amount of graphics data that you specify, because the printer will not leave graphics mode until it has accepted the specified number of data bytes.

If “Data Bits” is set to “7” in the interface setup menu, beware of potential problems in graphics mode. Since the MSB (most significant bit) will always be turned off, it will not be possible to fire the top wire of the print head. Worse yet, the value of n1 or n2 may be changed. For example, if n1 specifies 200 bytes of data, and its MSB is turned off, the printer will only expect 72 bytes of data. It will exit graphics mode, and then try to print the remaining 128 bytes of graphics data as normal text characters. The result will surely not be pretty. To avoid such problems, the use of an 8-bit I/O interface for printing graphics is highly recommended.

The normal graphics modes allow every dot to be printed. High speed graphics will print twice as fast, but will not allow consecutive dots to be printed.

60 DPI Graphics

ESC K n1 n2 data

Selects eight wire single density (60 dpi) graphics for n1 + (n2 x 256) columns of data.

Example: The following escape sequence will print six bytes of graphics data at 60 dpi. The resulting figure will resemble a backslash character, “\”.

Escape Sequence:

ESC

K

6

0

128

64

32

16

8

4

Hexadecimal:

1B

4B

06

00

80

40

20

10

08

04

120 DPI Graphics

 

 

 

 

 

 

 

ESC L n1 n2 data

Selects eight wire double density (120 dpi) graphics for n1 + (n2 x 256) columns data.

Example: The following escape sequence will print six bytes of graphics data at 120 dpi. The resulting figure will resemble a backslash character, “\”.

58

Page 64
Image 64
Printek 8000 manual Graphics