CHAP 4-SOFTWARE AND GRAPHICS. Epson LQ-510
advertisement
Assistant Bot
Need help? Our chatbot has already read the manual and is ready to assist you. Feel free to ask any questions about the device, but providing details will make the conversation more productive.
Chapter 4
Software and Graphics
Enhancing Your Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Character Spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Character Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Special Effects and Emphasis. . . . . . . . . . . . . . . . . . . . . . . 4-4
Selecting Typestyles With Master Select . . . . . . . . . . . . . 4-6
Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Print Head. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Graphics Command . . . . . . . . . . . . . . . . . . . . . . . . . .
Column Reservation Numbers . . . . . . . . . . . . . . . . . . . . . 4-14
A Simple Graphics Program . . . . . . . . . . . . . . . . . . . . . . . 4-14
Designing Your Own Graphics. . . . . . . . . . . . . . . . . . . . . 4-15
User-defined Characters. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Designing Your Characters . . . . . . . . . . . . . . . . . . . . . . . . 4-20
Defining Your Characters. . . . . . . . . . . . . . . . . . . . . . . . . . 4-22
Sending Information to Your Printer . . . . . . . . . . . . . . . . 4-24
Printing User-defined Characters . . . . . . . . . . . . . . . . . . . 4-27
Copying ROM Characters to RAM. . . . . . . . . . . . . . . . . . 4-28
Letter Quality Characters. . . . . . . . . . . . . . . . . . . . . . . . . .
Mixing Print Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Software and Graphics 4-1
Enhancing Your Printing
You can obtain a wide variety of printing effects with the LQ-510, from changing the number of characters per inch to using special effects on selected words and phrases. This section gives you a sampling of the features you may select with your software.
For software control of these features, see the instructions for your application programs or look up their specific commands in the
Command Summary in Chapter 9.
Character Spacing
To add greater variety to your documents, the LQ-510 has three cpi spacings, as well as proportional spacing. Each one can be selected with a software command.
For each of the three built-in fonts, you can choose a character spacing of 10, 12, or 15 characters per inch, or proportional spacing.
The printout below compares the three spacings:
This is 10 cpi printing.
This is 12
cpi printing.
This is 15 cpi printing.
As shown above, 15 cpi characters are only about two-thirds the height of 10 and 12 cpi characters. This makes 15 cpi particularly useful when you want to separate certain material from the main text.
In fixed cpi spacing each character is given the same amount of space. The width of proportional characters, however, varies from character to character. For example, a narrow letter like i takes less space than a wide letter like W. The width of each proportional character is given in the Appendix.
4-2 Software and Graphics
Enhancing Your Printing
The following printout compares 10 cpi spacing with proportional spacing:
T h i s i s 1 0 c p i p r i n t i n g .
This is proportional printing.
Note: Proportional spacing is not available in the draft mode.
Character Size
In addition to the basic cpi spacings and proportional spacing, the
LQ-510 offers three other modes that can change the size of your printing. These modes are double-wide, double-high, and condensed.
The double-wide mode doubles the width of any size character, while the double-high mode doubles the height of any size character. These modes are useful for emphasizing document titles and headings in reports, but are usually not suitable for large amounts of text. These modes can also be combined to obtain even more impressive printing results.
T h i s i s n o r m a l 1 0 c p i p r i n t i n g .
T h i s i s d o u b l e w i d e ,
This is double-high.
T h i s i s d o u b l e - w i d e a n d d o u b l e - h i g h .
Software and Graphics 4-3
Enhancing Your Printing
Both 10 and 12 cpi printing can be reduced to about 60 percent of their normal width using the condensed mode. This mode is particularly useful for printing wide spreadsheets because condensed 12 cpi printing allows you to print up to 160 characters on an 8-inch line.
The condensed mode can be selected with a software command, or by using SelecType (See Chapter 3). Even if you turn the condensed mode on with SelecType, you can still turn it off with a software command.
Condensed 10 cpi gives you many characters on a line,
Condensed 12 cpi gives you even more characters on a line.
Widening or narrowing the characters also widens or narrows the spaces between words. Because word processors usually create a left margin by printing spaces, you may need to change the left margin and the number of characters on a line to keep the margins correct if you change character widths.
Special Effects and Emphasis
The LQ-510 offers two ways of emphasizing text and also allows you to use underlining, superscripts, subscripts, and italics. These features can be controlled directly by software commands. Many application programs can also produce some of these effects. See your application program manual for details.
Emphasized and double-strike printing
Emphasized and double-strike printing can give words and phrases added prominence. In emphasized mode, each character is printed twice as the print head moves across the paper, with the dots in the second pass printed slightly to the right of the first pass. This process produces darker, more fully formed characters.
4-4
Software and Graphics
Enhancing Your Printing
In double-strike mode, the print head prints each line twice, making the text bolder. For even greater boldness, emphasized and doublestrike can be combined. The following samples show the different effects you can achieve using these modes alone and in combination.
This
is ROMAN printing.
This is ROMAN, emphasized.
This
is ROMAN, double-strike.
This is ROMAN, with both.
Italic printing
You can print italics by using the ESC 4 software command. This is true no matter how DIP switch
1-7 is set.
This is ROMAN
printing.
This is ROMAN italics.
Underlining, strike-through, and overlining
The underline, strike-through, and overline modes are useful for highlighting selected text. This feature can be used to score spaces, subscripts, and superscripts without a break. You can choose from a variety of line styles, including single, double, broken, or continuous. See the ESC ( - command in Chapter 9 for more information.
T h i s i s c o n t i n u o u s u n d e r l i n i n g .
This is broken overlining.
Software and Graphics 4-5
Enhancing Your Printing
Superscripts and subscripts
Superscripts and subscripts can be used for printing footnote numbers and mathematical formulas. The example below shows underlining and subscripts combined in a mathematical formula.
a v e r a g e = ( a l t a2 + . . . .
.
. . . . . + an ) n
Outline and shadow
The outline and shadow features are useful for adding variation and emphasis to text that you wish to stand out, such as headings. The following samples show the outline and shadow features individually, plus a combination of outline with shadow.
T h i s i s o u t l i n e s t y l e .
This is shadow style.
T h i s i s o u t l i n e w i t h s h a d o w .
Selecting Typestyles With Master Select
Your LQ-510 printer has a special ESCape code called Master Select that allows you to choose many combinations of these nine modes:
10 cpi, 12 cpi, proportional spacing, condensed, emphasized, double-strike, double-wide, italics, and underline. For more information on sending ESCape codes to your printer, see
Chapter 9.
The format of the Master Select code is shown below:
ASCII:
Decimal:
ESC !
n
27 33 n
Hexadecimal: 1B 21 n
4-6 Software and Graphics
Enhancing Your Printing
The variable n is a number that identifies the mode or combination of modes. To find the value of n, use the following table to add up either the decimal or hexadecimal numbers for the features you want.
Feature
10 cpi
12 cpi proportional c o n d e n s e d emphasized double-strike double-wide italics underline
Dec.
0
1
2
4
8
16
32
64
128
Hex.
00
01
02
04
08
10
20
4 0
80
For example, to print a title you may want to use double-wide 12 cpi characters printed in the double-strike mode. You would add three numbers together to calculate the value of n.
12 cpi
Double-strike 16
1
Double-wide 32 n = 49
After calculating the value of n, you use the Master Select command to send the value to the printer.
ASCII:
Decimal:
Hexadecimal:
ESC !
27
1B
33
21
1
49
31
Software and Graphics 4-7
Enhancing Your Printing
The print quality and font must be set separately, using SelecType or the ESC x and ESC k commands. There are two more things to consider when using the Master Select command: l
Master Select cancels any of the other listed features that you do not set. For example, if you have already set a different character width and you use Master Select to set emphasized doublestrike, the character width is reset to 10 cpi.
l
Proportional spacing overrides 10, 12, and 15 cpi.
4-8 Software and Graphics
Graphics
The dot graphics mode allows your printer to produce pictures, graphs, charts, or almost any other pictorial image you can create.
Because many commercial software programs use graphics, you may be able to print pictures and graphs like the ones on this page and the next by simply giving your software a few instructions.
The quickest and easiest way to print graphics on your printer is to use a commercial graphics program. With such programs you usually create an image on your monitor then give a command to send the image to the printer.
If you use commercial software that produces graphics, all you need to know about dot graphics is how to use the software. The application program will take care of the printer. (Some programs call this bit image printing.) On the other hand, if you wish to do your own programming or merely wish to understand how this printer prints graphics, read on.
Software and Graphics 4-9
Graphics
I n c o m e B r e a k d o w n
The Print Head
To understand dot graphics you need to know a little about how your printer’s print head works.
The print head has 24 pins. As the print head moves across the page, electrical impulses cause the pins to fire. Each time a pin fires, it strikes the inked ribbon and presses it against the paper producing a small dot. As the print head moves along, the pins fire time after time in different patterns forming letters, numbers, and symbols.
Because the dots overlap each other both horizontally and vertically in Letter Quality mode, it is difficult to see the individual dots.
Instead, the letters and symbols seem to be made up of unbroken lines.
In order for the dots to overlap vertically, the pins in the print head are in more than one column, but the intelligence of the printer handles the timing of pin firings so that the effect is that of 24 pins arranged in a single vertical column.
Dot patterns
The print head is able to print graphics, as well as text because graphic images are formed on the printer in about the same way that pictures in newspapers and magazines are printed. If you look
4-10 Software and Graphics
Graphics closely at a newspaper photograph, you will find that it is made up of thousands of small dots. Your printer also forms its images with patterns of dots, as many as 360 dots per inch, horizontally and 360 dots per inch, vertically. The images printed by this printer can, therefore, be as finely detailed as the ones at the beginning of this section.
Twenty-four-pin graphics
The graphics mode that takes full advantage of this printer’s print head is 24-pin graphics. This mode has five densities, but for simplicity this explanation deals with only one of them, tripledensity.
Triple-density prints up to 180 dots per inch, horizontally. As the print head moves across the paper, every 1/180th of an inch it must receive instructions about which of its 24 pins to fire. At each position it can fire any number of pins, from none to 24. This means that the printer must receive 24 bits of information for each column it prints. Since the printer uses B-bit bytes of information in communicating with the computer, it needs three bytes of information for each position.
Pin labels
To tell the printer which pins to fire in each column, you first divide each of the vertical columns into three sections of eight pins each and consider each section separately. Since there are 256 possible combinations of the eight pins in each section, you need a numbering system that allows you to use a single number to specify which of the 256 possible patterns you want. This numbering system is shown below:
1 2 8
6 4
3 2
1 6
8
4
2
1
Software and Graphics 4-11
Graphics
To fire any one pin, you send its number to the printer. To fire more than one pin at the same time, add up the numbers of the pins and send the total. Using these labels for the pins, you fire the top pin by sending 128. To fire the bottom pin, you send 1. If you want to fire only the top and bottom pins, you simply add 128 and 1, and send
129.
By adding the appropriate label numbers together, you can fire any combination of pins. Below are three examples of how to calculate the number that will fire a particular pattern of pins.
With this numbering system, any combination of the eight pins adds up to a decimal number between 0 and 255, and no numbers are duplicated.
Since there are 24 pins in each column, you must make a calculation for each of the three sections in each column. As you can see, this method of planning and printing dot graphics requires considerable calculation. Because triple-density uses 180 columns per inch, printing a single line of triple-density graphics only one inch long requires 540 numbers. Fortunately, commercial graphics software is available to do these calculations for you.
Before you can put these numbers into a graphics program, however, you need to know the format of the graphics command.
4-12 Software and Graphics
Graphics
The Graphics Command
The graphics mode command is quite different from the other commands used by the printer. For most of the other printer modes, such as emphasized and double-wide, one ESC code turns the mode on and another turns it off. For graphics, the command is more complicated because the code that turns on a graphics mode also specifies how many columns it will use. After the printer receives this code, it interprets the numbers that follow as pin patterns and prints them on the paper.
Your printer has one command that allows you to use any of the 11 graphics options. The format of the command is:
ESC * m n1 n2 data
In this command, m selects the graphics option and n1 and n2 specify the number of columns to reserve for graphics. The available graphics options are listed below:
Option Pins
Single-density
Double-density
High-speed double-density*
Quadruple-density*
CRT I
CRT II
Single-density
Double-density
CRT III
Triple-density
Hex-density*
l
Adjacent dots cannot be printed in this mode.
8
8
8
8
8
8
24
24
24
24
24 m
0
1
2
3
4
4
31
3 3
38
39
40
Horiz. density dots/in.
60
120
120
240
80
90
60
120
9 0
180
360
Software and Graphics 4-13
Graphics
Column Reservation Numbers
The graphics command requires more than one number to specify how many columns to reserve because one line can use thousands of columns, but the printer does not use numbers larger than 255 in decimal. Therefore the graphics mode command uses two numbers, n1 and n2, for reserving columns.
To find n1 and n2, divide the total number of columns by 256. The result is n2; the remainder is n1. Since the command is set up for two numbers, you must supply two even if you need only one. When you need fewer than 256 columns, just make n1 the number of columns you are reserving and make n2 a zero.
For example, if you wish to send 1632 columns of graphics data, n1 should be 96 and n2 should be 6 because 1632 = 96 + (6 x 256).
The printer interprets the number of bytes specified by n1 and n2
as
graphics data, no matter what codes they are. This means that you must be sure to supply enough bytes of graphics data or the printer will stop and wait for more data and will seem to be locked. If, on the other hand, you supply too much graphics data, the excess will be interpreted and printed as regular text.
A Simple Graphics Program
This first program is just a simple example to show you how the graphics command, column reservation numbers, and data can be used in a BASIC program.
4-14
Software and Graphics
Graphics
Type in and run the following program. Be especially careful to include both semicolons. The program produces the printout you see below:
10 WIDTH "LPT1:",255
20 LPRINT CHR$(27)"*"CHR$(32)CHR$(40)CHR$(0);
30
FOR X=1 TO 120
40 LPRINT CHR$(170);
50 NEXT X
Line 20 selects single-density 24-pin graphics mode (mode 32) and also reserves 40 columns for graphics. Since 24-pin graphics requires three bytes of data for each column, line 30 begins a loop to supply
120 bytes of data. Line 40 contains the number 170, which produces the first pin pattern shown in the section on pin labels, and line 50 ends the loop.
Designing Your Own Graphics
With what you know now, you can use the simplest application of graphics-calculating by hand the data to print the graphic image.
While this method is the most tedious, it helps you understand dot graphics. It is also useful for small graphic elements that are used many times.
Software and Graphics 4-15
Graphics
The illustration below shows how you can use a grid on paper to plan where you want dots to be printed. This grid is for a single line of graphics 42 columns long. Since each line of 24-pin graphics is approximately 1/8th of an inch high and since triple-density graphics prints 180 dots per inch, horizontally, a design planned on this grid will be about 1/8th of an inch high and less than 1/4th of an inch wide.
The actual pattern that the printer prints on the paper is, of course, made up of dots that overlap each other both vertically and horizontally. The reason the planning grid uses an x for each dot is that using an accurate representation of the dots makes calculating the data numbers difficult because they cover each other. Therefore, remember that each x represents the center of a dot, and the dots actually overlap.
Write the assigned values of the pins next to your design, then total the values for each column of dots. These totals are the values that you send to the printer as graphics data to print the design.
4-16 Software and Graphics
Graphics
Below is the same grid divided into three sections to make the data calculation easier. At the bottom of each section of each column is the total of the pin numbers for that section. This gives you the total of 126 data numbers necessary to print this small figure.
Software and Graphics 4-17
Graphics
Below is the BASIC program that prints the design shown on the previous pages. Note that the data numbers in lines 80 through 140 are the same numbers that are at the bottom of each section in the last illustration. The WIDTH statement in line 10 is for IBM PC
BASIC; the WIDTH statement format may be different for your system.
10 WIDTH "LPT1:",255
20 LPRINT CHR$(27)"*"CHR$(39)CHR$(42)CHR$(0);
30 FOR X=1 TO 126
40 READ N
50 SPRINT CHR$(N);
60 NEXT X
70 LPRINT
80 DATA 0,0,63,0,0,127,0,0,255,0,3,255,0,15,255,0,31,255
90 DATA 0,127,255,0,255,255,1,255,255,3,255,255,7,255,255,15,
255,255
100 DATA 31,255,254,31,255,252,31,255,248,31,255,240,31,255,
224,31,255,192
110 DATA 31,255,0,31,252,0,31,240,0,31,224,0,31,128,0,31,240,0
120 DATA 31,255,192,28,255,224,28,127,240,28,15,248,30,0,252,
31,0,126
130
DATA
15,128,15,7,192,7,3,240,7,1,254,7,0,255,7,0,127,135
140 DATA 0,31,199,0,7,231,0,1,247,0,0,255,0,0,127,0,0,63
In this program, line 20 assigns the graphics option (24-pin tripledensity) with code 39. Code 42 sets the number of pin columns at 42.
Lines 80 through 140 contain 126 bytes of data (42-pin columns x 3 bytes) for each pin column. Lines 30 through 60 print the design that you see below:
4-18 Software and Graphics
Graphics
Notice that the dots overlap quite a bit. This design was printed using the triple-density, 24-pin graphics option because the density is the same (180 dots per inch) in both directions.
Adding the following lines to the preceding program causes the pattern to print 10 times in a row as shown below:
15 FOR C=l TO 10: RESTORE
65 NEXT C
Software and Graphics 4-19
User-defined Characters
With this printer, it is possible to define and print characters of your own design. You can design an entirely new alphabet or typeface, create special characters for use as mathematical or scientific symbols, or create graphic patterns with user-defined characters to serve as building blocks for larger designs.
Below, you can see samples of typefaces created with the userdefined character function.
Note:
To use user-defined characters, you must turn DIP switch
2-5
off.
You can make the task of defining characters easier by using a commercial software program that assists you in creating characters or simply supplies you with sets of characters already created. Also, some popular software programs make use of the printer’s userdefined character function to enhance printouts. (These characters are called download characters in some programs.)
The standard ASCII characters are stored in the printer’s Read Only
Memory (ROM) or optional Multi-Font Module, and the userdefined characters are stored in the printer’s Random Access
Memory (RAM).
Designing Your Characters
User-defined characters are like dot graphics because you send the printer precise instructions on where you want each dot printed. In fact, planning a user-defined character is like planning a small dot graphics pattern.
4-20 Software and Graphics
User-defined Characters
Design grids
To design a character you use a grid that is 24 dots high-one dot for each pin on the printer’s print head. The width of the character matrix depends on the character set in use. For draft characters, the grid is nine dots wide, for Letter Quality it is 29 dots wide, and for proportional characters it is 37 dots wide. The dots for both Letter
Quality and proportional characters are spaced more closely together than those for draft characters.
The illustrations below show the two design grids. The line at the side, labeled cap, indicates the top of a standard capital letter. The line labeled base indicates the baseline for all letters except those with descenders (the bottom parts of such letters as j and y). The bottom row is usually left blank because it is needed for underlining.
Draft pica
Letter quality / Proportional
The grid on the right side can be used for either Letter Quality or proportional characters. For Letter Quality you do not use all the columns.
Software and Graphics 4-21
U s e r - d e f i n e d C h a r a c t e r s
There is one restriction in designing characters. Dots in the same row may not print in adjacent columns. This means that there must be an empty dot position both to the left and right of each dot that prints. This is true in draft, Letter Quality, and proportional mode.
Defining Your Characters
The first step in defining characters is to place the dots on a grid just as you want them to print. The examples shown here, like the ones in the graphics section, use an x to represent each dot.
In the illustration below, you see a draft grid with a simple userdefined character planned on it.
Now you translate the dot pattern you’ve created on paper to a numeric format so you can send the data to your printer. Every dot has an assigned value. Each vertical column (which has a maximum of 24 dots) is first divided into three groups of eight dots. Each group of eight dots is represented by one byte, which consists of eight bits. Hence, one bit represents one dot.
4-22 Software and Graphics
User-defined Characters
Data numbers
The bits within each byte have values of 1, 2, 4, 8, 16, 32, 64, and 128.
In the vertical column of dots, the bits are arranged so that the most significant bit (with a value of 128) is at the top of the column and the least significant bit (with a value of 1) is at the bottom.
The next illustration shows how to use this method to calculate the data numbers for the character in this example. On the left side of the figure, the data numbers are calculated for the middle column.
The value of each byte is calculated by adding the values of the rows in which dots appear. The right side of the figure shows the whole character with the three data numbers for each column indicated at the bottom.
This manual uses decimal numbers because the program examples are written in BASIC and everyone is familiar with decimals. The data you send to your printer, however, must be in the form (binary, decimal, hexadecimal) that you can use with your programming language.
Software and Graphics 4-23
User-defined Characters
You have seen how to design a character by placing dots on a grid and translating the dots to decimal equivalents. The last step in defining a character is sending this information to your printer.
Sending Information to Your Printer
The printer loads characters in the print style (Letter Quality, draft, or proportional) that the printer is currently using. It also records whether italic, superscript, or subscript is turned on. This means that if you want to print a character in italics, for example, you must have the italic mode turned on when you define the character.
The command your printer uses to define characters is one of the most complex in its repertoire. The format of the command is this:
ESC & 0 n1 n2 d0 d1 d2 data
The ESC & is simple enough. The 0 (which is ASCII code 0, not the numerical zero in quotation marks) allows for future enhancements.
At this time, it is always ASCII 0.
You can define many characters with a single command. The values n1 and n2 are the ASCII codes of the first and last characters you are defining. If you are defining only one character, n1 and n2 are the same. You can use any codes between decimal 32 and 127 for n1 and n2, but it is best not to define decimal 32, which is the code for a space. Also, you can use letters in quotation marks instead of ASCII codes for n1 and n2.
Note:
Because user-defined characters require additional memory, you must set DIP switch 2-5 to 1 KB (off) before downloading these characters.
4-24 Software and Graphics
User-defined Characters
An example will show how to specify n1 and n2. For instance, if you wanted to redefine the characters A through Z, n1 would be A (or
ASCII code 65) and n2 would be Z (or ASCII code 90). So the command ESC & 0 AZ (followed by the appropriate data) would replace the entire alphabet of capital letters.
Following the specification of the range of characters to be defined in this command are three data bytes, d0, d1, and d2, that specify the width of the character and the space around it. The left space (in dot columns) is specified by d0, and the right space is specified by d2.
The second byte, d1, specifies the number of columns of dots that are printed to make up the character. By varying the width of the character and the spaces around it, you can create proportionalwidth characters that print at draft speed. The table below shows the maximum values for these bytes.
Mode
Draft
Letter Quality 10 cpi
Letter Quality 12 cpi
Proportional d 1
9
29
23
37 d 0 + d 1 + d 2
12
3 6
30
42
The last part of the command to define your characters is the actual data that defines the dot patterns for each character. Since it takes three bytes to specify all the dots in one vertical column, your printer expects d1 x 3 bytes of data to follow d2.
Software and Graphics 4-25
U s e r - d e f i n e d C h a r a c t e r s
This example of a character definition program should make this clear:
10 LPRINT CHR$(27)"x0"
20 LPRINT CHR$(27)"&"CHR$(0);
30
LPRINT "@@";
40 LPRINT CHR$(l)CHR$(9)CHRS(l);
50 FOR I=1 TO 27
60 READ A: LPRINT CHR$(A);
70 NEXT I
80 LPRINT "@@@@@"
90 LPRINT CHR$(27)"%"CHR$(l);
100 LPRINT "@@@@@"
110 LPRINT CHE1$(27)"%"CHR$(0);
120 LPRINT "@@@@@"
130
END
140 DATA 1,0,0,2,0,0,4,0,0
150 DATA 8,0,0,23,255,240,8,0,0
160 DATA
4,0,0,2,0,0,1,0,0
In line 10, the ESC x0 command selects draft printing.
The actual character definition starts in line 20. The two @ signs in line 30 represent n1 and n2, the range of characters being defined (in this case, a range of 1). Line 40 contains d0, d1, and d2.
The information about the actual character design (which is contained in the DATA statements at the end of the program) is sent to the printer in the loop between lines 50 and 70.
Note: When defining Letter Quality or proportional characters, put a WIDTH statement in your program to prevent carriage return and line feed codes from interfering with your definitions.
4-26 Software and Graphics
User-defined Characters
Printing User-defined Characters
If you entered the previous program example, you defined an arrow and placed it in the RAM location for ASCII code 64 (replacing the @ sign). You can now print out a three-line sample of your work. The first and third lines (printed by lines 80 and 120) print the normal @ sign. The second line (printed by line 100) prints out the arrow that you defined.
Run the program to see the printout below:
As you can see, both sets of characters (the @ from the original characters in ROM that the printer normally uses and the alternative character you defined) remain in the printer available for your use.
The command to switch between the two sets is used in line 90 and
110. It is:
ESC % n
If n is equal to 0, the normal ROM character set is selected (this is the default). If n is equal to 1, the user-defined character set is selected.
If you select the user-defined character set before you have defined any characters, the command is ignored and the ROM characters remain in use.
You may switch between character sets at any time--even in the middle of a line. To try this, place semicolons at the end of lines 80 and 100 in the program example.
Software and Graphics 4-27
User-defined Characters
Copying ROM Characters to RAM
After running the program, if you select the user-defined character set and try to print other characters, the only one that will print is your arrow. Since no other characters are in the printer’s userdefined RAM, there is nothing else to print. Other characters sent to the printer do not even print as spaces; it’s as if they were not sent at all.
In many cases, you will want to redefine only a few of the characters to suit your needs--the rest of the alphabet will work fine as it is. As you have seen, it is possible to switch back and forth, at will, between the normal character set and your user-defined character set. It is, however, rather inconvenient.
Therefore, your printer has a command that allows you to copy all of the standard characters from ROM to the user-defined character set.
The command format is as follows, where the value of n represents the font family:
ESC: 0 n 0
Note: This command cancels any user-defined characters you have already created. You must send this command to the printer before you define characters.
If you use this command at the beginning of a program, then define your special characters and select the user-defined set, you can print with the user-defined set as your normal character set. You never need to switch back and forth between sets.
4-28 Software and Graphics
User-defined Characters
Letter Quality Characters
If you select Letter Quality printing with the ESC xl command, you can design user-defined characters using up to 29 columns of the
Letter Quality/Proportional grid. The dot columns are spaced closer together horizontally than draft dot columns (the horizontal dot spacing is 1/360th of an inch as opposed to 1/120th of an inch for draft characters).
Proportional mode characters
Selecting the proportional character mode yields user-defined characters of the highest resolution. Characters can be designed using all 37 columns of the Letter Quality/Proportional grid.
Remember that in Letter Quality and proportional modes, as in draft mode, you cannot place dots in adjacent columns. There must be an empty dot position both to the left and right of each dot that prints.
Superscripts and subscripts
You can also create superscript and subscript user-defined characters. Just as Letter Quality characters are defined when the
Letter Quality mode is selected, superscript and subscript characters are created when either superscript or subscript is selected.
These characters can be used as either superscripts or subscripts.
The characters are exactly the same; only their placement is different. The difference between these characters and regular characters is that superscript and subscript characters are smaller.
They are a maximum of 16 dots high. Their maximum width in dot columns is shown in the table below:
Mode
Draft
Letter Quality
Proportional
I d 1 d 0 + d 1 + d 2
7 12
23 36
23 42
Software and Graphics 4-29
User-defined Characters
Since superscript and subscript characters are smaller, when you define them you only need two bytes of data for each vertical row of dots. Design grids for these characters are shown in the figure below:
Draft pica
Letter Quality and Proportional
Mixing Print Styles
Each of the three user-defined character modes (draft, Letter
Quality, and proportional) can be used in combination with most of your printer’s various print styles. For instance, emphasized mode works with user-defined characters. The characters you design are enhanced to give this printing effect.
Mixing the three types of user-defined character sets is not possible.
For example, if you select draft and define some characters, then select proportional and define some more, the first draft character definitions are deleted. Only one type of character definition may be stored in RAM at any time.
4-30 Software and Graphics
User-defined Characters
If you define characters in one mode, then switch to another mode and select the user-defined character set, the command is ignored and nothing is printed. The user-defined character definitions, however, remain unaffected. If you switch back to the mode in which they were defined, you can then select and print them.
Keep in mind that user-defined characters are stored in RAM, which is not permanent memory. When the printer power is turned off or the printer is initialized with the INIT signal, the user-defined characters are lost. (Some computers do this each time BASIC is loaded.)
Software and Graphics 4-31
4-32 Software and Graphics
advertisement
Related manuals
advertisement
Table of contents
- 1 FRONT MATTER
- 4 TABLE OF CONTENTS
- 8 INTRODUCTION
- 8 Features
- 9 Options
- 11 About This Manual
- 12 Application Notes
- 13 Where to Get Help
- 14 CHAP 1-SETTING UP THE PRINTER
- 15 Unpacking the Printer
- 15 Checking the Parts
- 17 Choosing a Place for the Printer
- 19 Assembling the Printer
- 19 Installing the Platen Knob
- 20 Installing the Ribbon Cartridge
- 23 Attaching the Paper Guide
- 26 Testing the Printer
- 26 Plugging in the Printer
- 27 Running the Self Test
- 34 Checking the Operation
- 35 Connecting the Printer to Your Computer
- 35 The Parallel Interface
- 38 Setting Up Your Application Software
- 38 Choosing From a Menu
- 40 CHAP 2-PAPER HANDLING
- 41 Using Single Sheets
- 41 Loading Paper
- 44 Reloading During Printing
- 45 Using Continuous Paper
- 45 Positioning Your Continuous Paper Supply
- 46 Loading Continuous Paper
- 52 Switching Between Continuous and Single Sheets
- 52 Switching to Single Sheets
- 56 Switching Back to Continuous Paper
- 59 Printing on Special Paper
- 59 The Paper Thickness Lever
- 62 Multi-part Forms
- 63 Labels
- 65 Envelopes
- 67 CHAP 3-USING THE PRINTER
- 68 Operating the Control Panel
- 72 Setting the DIP Switches
- 72 Changing a DIP Switch Setting
- 73 The DIP Switch Tables
- 75 The DIP Switch Functions
- 76 Page Length
- 77 Skip Over Perforation
- 78 Adjusting the Loading Position
- 78 The Loading Position
- 79 Using Micro-adjustment
- 80 Using Short Tear-Off
- 81 Adjusting the Tear-off Position
- 83 Selecting Typestyles
- 84 Character Fonts
- 85 Condensed Mode
- 86 Selecting an International Character Set
- 88 Choosing a Character Table
- 90 Using the Data Dump Mode
- 93 CHAP 4-SOFTWARE AND GRAPHICS
- 94 Enhancing Your Printing
- 94 Character Spacing
- 95 Character Size
- 96 Special Effects and Emphasis
- 98 Selecting Typestyles With Master Select
- 101 Graphics
- 102 The Print Head
- 105 The Graphics Command
- 106 Column Reservation Numbers
- 106 A Simple Graphics Program
- 107 Designing Your Own Graphics
- 112 User-defined Characters
- 112 Designing Your Characters
- 114 Defining Your Characters
- 116 Sending Information to Your Printer
- 119 Printing User-defined Characters
- 120 Copying ROM Characters to RAM
- 121 Letter Quality Characters
- 122 Mixing Print Styles
- 125 CHAP 5-USING THE PRINTER OPTIONS
- 126 The Cut Sheet Feeder
- 126 Installation
- 129 Paper Handling
- 133 Testing the Printer in the Cut Sheet Feeder Mode
- 135 Operating the Cut Sheet Feeder
- 135 Single-sheet Insertion
- 139 Removing the Cut Sheet Feeder
- 141 The Pull Tractor
- 141 Installation
- 143 Paper Handling
- 148 Removing the Pull Tractor
- 152 The Multi-Font Module
- 154 Installation
- 157 Selecting a Font
- 158 The Interface Boards
- 158 Choosing an Interface
- 159 Compatible Interfaces
- 159 Installation
- 165 #8143 New Serial Interface
- 167 CHAP 6-MAINTENANCE
- 168 Cleaning the Printer
- 170 Replacing the Ribbon
- 176 Transporting the Printer
- 177 CHAP 7-TROUBLESHOOTING
- 178 Problems and Solutions
- 180 Power Supply
- 181 Printing
- 190 Paper Handling
- 200 Options
- 211 CHAP 8-TECHNICAL SPECIFICATIONS
- 212 Printer Specifications
- 212 Printing
- 214 Paper
- 217 Mechanical
- 218 Electrical
- 218 Environment
- 219 Interface Specifications
- 219 Pin Assignments for the Parallel Interface
- 221 Interface Timing
- 222 Printing Enabled/Disabled Signals and Control Conditions
- 223 Option Specifications
- 223 Single-bin Cut Sheet Feeder
- 225 Initialization
- 225 Default Settings
- 227 CHAP 9-COMMAND SUMMARY
- 228 Using the Command Summary
- 230 Control Key Chart
- 231 Commands in Numerical Order
- 234 Commands Arranged by Topic
- 234 Printer Operation
- 237 MSB Control
- 238 Data Control
- 239 Vertical Motion
- 245 Horizontal Motion
- 248 Overall Printing Style
- 250 Print Size and Character Width
- 254 Print Enhancement
- 259 Word Processing
- 260 Character Tables
- 262 User-defined Characters
- 264 Graphics
- 267 APPENDIX
- 268 Proportional Width Table
- 272 Character Tables
- 275 GLOSSARY
- 283 INDEX