CHAP 4-SOFTWARE AND GRAPHICS. Epson P-4500, 4500, ActionPrinter 4500

Add to My manuals
317 Pages

advertisement

CHAP 4-SOFTWARE AND GRAPHICS. Epson P-4500, 4500, ActionPrinter 4500 | Manualzz

Chapter

4

Software and Graphics

Enhancing Your Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2

Character Spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2

Character Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3

Special Effects and Emphasis . . . . . . . . . . . . . . . . . . . . . . . . . 4-4

Selecting Typestyles With Master Select . . . . . . . . . . . . . . . 4-6

Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4-9

The Print Head . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10

The Graphics Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13

Column Reservation Numbers . . . . . . . . . . . . . . . . . . . . . . . 4-14

A Simple Graphics Program . . . . . . . . . . . . . . . . . . . . . . . . . 4-14

Designing Your Own Graphics . . . . . . . . . . . . . . . . . . . . . . . 4-15

User-defined Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-20

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

. . . . . . . . . . . . . . . . . . . . . . . . . . . 4-29

Superscripts and Subscripts . . . . . . . . . . . . . . . . . . . . . . . . . . 4-29

Mixing Print Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-30

Software and Graphics 4-1

Enhancing Your Printing

You can obtain a wide variety of printing effects with your printer, 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, your printer 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 cpi 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:

This is 10 cpi printing.

This is proportional printing.

r

Note: Proportional spacing is not available in the draft mode.

I

Character Size

In addition to the basic cpi spacings and proportional spacing, your printer 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 272 characters on a 13.6-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 lore 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 printer 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 double- strike can be combined. The following samples show the different effects you can achieve using these modes alone and in combination.

T h i s i s R O M A N p r i n t i n g .

This is ROMAN, emphasized.

T h i s i s R O M A N , d o u b l e - s t r i k e .

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.

T h i s i s R O M A N p r i n t i n g .

T h i s i s R O M A N i t a l i c s .

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 .

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.

average = (a1 + 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.

Selecting Typestyles With Master Select

Your 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:

Hexadecimal:

ESC !

n

27 33 n

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.

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 1

D o u b l e - s t r i k e 1 6

D o u b l e - w i d e 3 2 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 !

1

27 33 49

1B 21 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 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 double-strike, the character width is reset to 10 cpi.

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

M a r k e t i

A d v e r t i i t

S a l a r i e

P r o d u c t e opmtnt

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 by the printer in about the same way that pictures in newspapers and magazines are printed. If you look closely at a

4-10 Software and Graphics

Graphics 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, triple-density.

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 S-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 :

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.

128 1

3 2

8

2

-

1 7 0

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:

* Adjacent dots cannot be printed in this mode.

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/8th of an inch wide.

!

/ I

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 LPRINT 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,3l,255,248,31,255,240,3l,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,l5,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 triple-density) 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:

A

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 (horizontal and vertical).

Adding the following lines to the preceding program causes the pattern to print 10 times in a row as shown below:

15 FOR C-1 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 user-defined character function.

Note: To use user-defined characters, you must turn DIP switch 2-5

O f f .

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 user-defined 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 user-defined 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.

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.

Draft pica Letter quality / Proportional

Software and Graphics 4-21

User-defined Characters

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, or 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 character 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 proportional-width characters that print at draft speed. The table below shows the maximum values for these bytes.

Mode

Draft

Letter Quality 1 0 cpi

Letter Quality 1 2 cpi

Proportional d1

9

29

23

37 d0 + d1 + d2

12

36

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

User-defined Characters

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$(1)CHR$(9)CHR$(1);

50 FOR I=1 TO 27

60 READ A: LPRINT CHR$(A);

70 NEXT I

80 LPRINT "@@@@@"

90 LPRINT CHR$(27)"%"CHR$(1);

100 LPHINT "@@@@@"

110 LPRINT CHR$(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 user-defined 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:

E S C : 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 d1

7

23

23 d0 + d1 + d2

1 2

36

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

advertisement

Key Features

  • Fast print speeds of up to 192 characters per second
  • High-quality output with a resolution of up to 64 characters per inch
  • Automatic loading of single sheets of paper
  • Built-in fonts: draft, Epson Roman, Epson Sans Serif, Epson Courier, Epson Prestige, Epson Script, OCR-A, OCR-B, Epson Orator, and Epson Orator-S

Related manuals

Frequently Answers and Questions

How do I load single sheets of paper into the printer?
Turn on the printer. Insert a sheet of paper in the paper guide until it meets resistance. After about two seconds, the printer loads the paper automatically and is set on line so that it can accept data from your computer.
How do I select a different font?
Press the FONT button on the front panel. The printer will scroll through the eight built-in fonts. The indicator lights will show the selected font.
How do I change the page length?
Use the DIP switches on the back of the printer to set the page length. See the DIP Switch Tables in the Product Update Notice for more information.

advertisement

Table of contents