User-defined Characters

Sending information to your printer

Once the -characteris planned on the grid, you simply add the pin values for each column together, just as you do for graphics. The last step in defMng ,a character is to send this information to the printer.

The command to define characters is relatively complex:ESC & 0 nl n2 al dz . . . dn

You can define more than one character with a single command. The values nl and ti are the ASCII codes of the first and last characters you are defining. If you are defining only one character, n7 and n2 are the same. You can use any codes between 0 and 255

decimal for nl and n2 except the following codes: 7, 8, 9, 10, 11; 12, 13, 14, 15, 18, 19, 20, 24, and 27 decimal. Also, it is best not to define decimal 32, which is the code for a space.

You can also use other codes by using the ESC 6 and ESC I commands. (See the Command Summary in Chapter 9.)

For example, if you wanted to redefine the characters A through Z, n7 would be A (or ASCII code 65) and n2 would be Z (or ASCII code 90). So the command ESC ,h 0 AZ (followed by the appropriate data) would replace the characters A through Z.

Following the specification of the range of characters to be defined in this command is one number (al) that specifies the width of the character and whether it uses the top eight pins or the bottom eight pins.

The last part of the command (d1.. .dn) is the actual data that defines the dot patterns for each column of each character. Since a character can use up to eleven columns, you must supply eleven data numbers for each character even if some columns are blank.

Note: Be sure to turn off DIP switch 2-lbefore defining characters. The ESC & command is invalid if this switch is on.

4-24Software and Graphics