Epson SQ-2000 User Manual

EPSON
SQ-2000
Operating Manual
Printer
FCC COMPLIANCE STATEMENT
FOR AMERICAN USERS
determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one or more of the following measures:
- Reorient the receiving antenna
- Relocate the computer with respect to the receiver
-
Plug the computer into a different outlet so that the computer and receiver are on different branch circuits.
If necessary, the user should consult the dealer or an experienced
radio/television technician for additional suggestions. The user may find the following booklet prepared by the Federal Communications Commission helpful:
“How to Identify and Resolve Radio-TV Interference Problems.”
This booklet is available from the U.S. Government Printing Office, Washington, DC 20402. Stock No. 004-000-00345-4.
WARNING
The connection of a non-shielded printer interface cable to this printer will invalidate the FCC certification of this device and may cause interference which exceeds the limits established by the FCC for this
equipment. If this equipment has more than one interface connector, do not leave cables connected to unused interfaces.
All rights reserved. No part of this publication may be reproduced,
stored in a retrieval system, or transmitted, in any form or by any means, mechanical, photocopying, recording or otherwise, without the prior written permission of Epson America, Inc. No patent liability is assumed with respect to the use of the information contained herein. While every precaution has been taken in the preparation of this book, Epson America, Inc. assumes no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained herein.
Apple® is a registered trademark of Apple Computer, Inc.
Compaq CP/M® is a registered trademark of Digital Research, Inc. FX-80TM, FX-lOO™, and RX-80” are trademarks of Epson America, Inc. IBM-PC@ is a registered trademark of International Business Machines Corporation. LQ-1500™ Microsof™ is a trademark of Microsoft Corporation. QX-10™ is a trademark of Epson America, Inc. Softalk® is a registered trademark of Softalk Publishing, Inc. SQ-2000™ TRS-80® is a registered trademark of Radio Shack, a division of Tandy Corporation. 80-Micro is published by Wayne Green Publishers.
Copyright © 1985 by Epson America, Inc. Torrance, California 90505
TM
is a trademark of Compaq Computer Corporation.
is a trademark of Epson America, Inc.
is a trademark of Epson America, Inc.
Part No. 8492004
Contents
Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
About This Manual . . . . . . . . . . . . . . . . . . . . . . . .
10 Steps to Printing
1
Selecting the Right Location
Unpacking the Printer Putting on the Paper Feed Knob Installing the Ink Cartridge Setting Up the Single-Sheet Paper Guide Installing the Interface Card
Connecting the Printer to Your Computer Customizing the Printer Loading Single-Sheet Paper Self-Testing the Printer A Word About Selecting Paper
Testing your paper
Printing Your First Document
Operation
2
Power Switch Control Panel Buttons
ON LINE button FF (Form Feed) button LF (Line Feed) button CLEANING button SHEET FEED button
Indicators ..............................
Meaning of blinking indicators Paper-end detector
Inklow ................................
Buzzer.. ................................
Initialization
................................
........................
................
......................
............
................
................
....................
................
....................
..............
......................
..............
............................
......................
........................
....................
....................
......................
....................
............
......................
..............................
....
....
1 1 2 3
6
7 8 9
10 11
13 14 15 17
18 19
20 23
23 24 24 25
25 25 25 26 26 27 27
27 28
...
111
3
Using the SQ-2000
Using the SQ-2000 with Word Processors
Using the SQ-2000 with other application programs
Programming with the SQ-2000
Computer-to-printer communications ASCII codes Control codes
ESCape sequences ......................
Translating the ASCII code ................
How to send control codes to printer
Using Master Select Command ..............
..............................
........................
............
............................
..........................
....
....
......
29 29 30
30 31 31 32 32 33 33 35
4
Printer Care and Maintenance
The Ink Jet Print Head
How Automatic Print Head Cleaning Works . .
For more extensive cleaning ..............
Special cleaning Summary of Cleaning Cycles
Troubleshooting Guide ....................
5
User-Defined Characters
Dot-Matrix Printing
The print head The print matrix
Defining Your Own Characters ..............
Sending information to the SQ-2000
Printing User-Defined Characters
Copying ROM to RAM How Print Mode Affects User-Defined
Characters Draft mode characters Letter quality characters
Proportional mode characters ............
Mixing Print Styles
Other considerations
Defining Connecting Characters
Characters that connect vertically ..........
..............................
......................
........................
....................
........................
..........................
........................
....................
........................
....................
..............
................
............
..................
............
......
43 43 44
45
45
46
46
51
51
51
52
53
55
58
58 59
60 60 61 61 62 62 65
iv
6
DotGraphics..
How the SQ-2000 Prints Dot Graphics
Syntax of the Graphics Command Using Hand-Calculated Data to Print
Graphics.. Printing Multiple Lines of 8-Dot Graphics Using the 24-Dot Graphics Options Using the SQ-2000 as a Plotter Individual Graphics Options Commands Assigning Graphics Options
............................
..............................
........
............
....
..........
..............
....
................
67 67 70
71 72 75
78 85 85
7
Using the Hex Dump Feature
8
Programming Hints
High level language problems Apple Computers TRS-80 Computers IBM Personal Computers QX-10 Computers
.......................
.......................
..............
.....................
.........
.....................
...............
87
89 89 90 91 92 93
Appendixes
SQ-2000 Command Summary
A
Vertical Spacing Commands Horizontal Spacing Commands
Print Style Commands Character Set Commands Graphics Commands Miscellaneous Commands
ASCII Code Conversion Chart . . . . . . . . . . . . . .
B
Widths of the Proportional Characters.
C
Setting the DIP Switches
D
Location of Switches Before You Change the Switch Settings
Column DIP Switch Panel Interface DIP Switch Panels
Interface DIP switch Panel 1 ....................
SW1-1 SWl-2
SW1-3 SW1-4 Interface DIP switch Panel 2 SW2-1, SW2-2, and SW2-3 SW2-4 SW2-5 SW2-6 SW2-7
SW2-8
..................................
..................................
..................................
..................................
..................................
..................................
..................................
..................................
..................................
..................
..................
......................
..........
............
..........
..............
..............
..................
..................
..............
................
. . . . . . . . . . . . . . . . . .
.......
......
A-l A-2
A-7 A-10 A-15 A-17 A-20
B-l C-l D-l
D-l D-3 D-3 D-4 D-4 D-5 D-5
D-5 D-5 D-6 D-6 D-8
D-8 D-8 D-8 D-8
Using the Optional Tractor Unit
E
Printer Location Installing the Tractor Unit Installing the Paper Separator Loading Continuous Paper
Specifications
F
Printing
Printer ....................................
Index
vi
..................................
..........................
..................
............................
............
..............
................
E-l
E-l E-2 E-3 E-4
F-l F-l F-2
Figures
1-1
Printer location
1-2
Printerparts
1-3
Interface card installed Installing the paper feed knob’
1-4
The ink cartridge
1-5
Installing the single-sheet paper guide
1-6
Removing the protective plate
1-7
Sliding in the interface card
1-8 1-9
Snapping the interface card into place
1-10 Connecting the printer and computer
1-11 Locating the DIP switches 1-12 Loading single-sheet paper 1-13 Adjusting pressure bar rollers 1-14 Self-test 1-15 DIP switch setting for self-test 1-16 Paper is too absorbent
1-17 Paper is not absorbent enough 1-18 Good print quality 1-19 Sample document
2-l Power switch and control panel 2-2 Control panel buttons 2-3 Control panel indicators
4-1
Buttons for cleaning during printing.
.................................
............................
..............................
............
...
............
.
..........................
..............
................
.................
...............
.............
.............
.....................
.............
.......................
.........................
..............
......................
....................
......
........
.......
.........
6 7
7 8
9 10 11 11 12
13 14 15 16 17 17 18
18 19 21
24 24
26
45
The print head
5-1 5-2
Charactergrids . . . . . . . . . . . . . . . . . . . . . . . . . . . .
User-defined character
5-3 5-4
Data bytes for the first column of a new
capitalA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Character design grid for border characters
5-5 5-6
Three border designs
5-7
Design grid for integral sign made of two
vertically connecting characters . . . . . . . . . .
5-8
Integral sign made of two vertically connecting
characters
6-l
Graphics data byte and print head nozzles . . .
Values assigned to the print nozzles . . . . . . . . .
6-2
Value of the graphics data byte
6-3
6-4
Design sketch and sum of nozzle values
6-5
Data layout for multiple lines of g-dot
graphics . . . . . . . . .._.....................
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . _ . . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. .
. . . . . .
52 53 54
55 64 64
66
66 68 69 70
72 73
vii
6-6
Map of 24-dot graphics
6-7
Data layout for 24-dot graphics
6-8
Eight-dot (top) and 24-dot (bottom) versions of
the density
..............................
6-9 Figure produced by plotting program
6-10 Order of array elements
....................
..............
........
....................
6-11 Curve produced by minor change in plotting
program
................................
76 76
78 80 83
84
7-1
Hex dump feature
..........................
7-2 Hex dump printout of Chapter 6 graphics
program C-l Character Q and its widths D-l Location of column DIP switch panel
................................
..................
........
D-2 Location of interface DIP switch panels E-l Continuous paper stacked below printer
E-2 Continuous paper stacked behind printer E-3 Tractor installation
........................
E-4 Paper separator being assembled and
installed E-5 Tractor release levers E-6 Location of parts for tractor unit E-7 Feeding the paper into the printer E-8 Top-of-page position
................................
......................
............
..........
......................
......
....
....
87
88 c-2 D-2
D-2
E-l E-2 E-2
E-3 E-4 E-5 E-6
E-7
Viii
Tables
2-1 Messages of panel indicator lights 3-1
Proportional print styles 3-2 Draft pica print styles 3-3 Draft elite print styles 3-4 Letter quality pica print styles 3-5 Letter quality elite print styles
5-l User-defined character design grids
6-l Graphics options 6-2 Individual graphics options commands
D-l Column DIP switch setting for printing area D-2 Interface DIP switch Panel 1 settings. D-3 Interface DIP switch Panel 2 settings. D-4 International character sets D-5 DIP switch settings for international
characters ..............................
..........................
....................
......................
......................
..................
..........
..............
..............
..........
......
.........
.........
. .
26 37
38 39 40 41
60 70
85
D-4 D-4 D-6 D-7
D-7
ix

Introduction

The Epson SQ-2000 Ink Jet Printer gives you the versatility, speed, and graphics capability of a dot matrix printer, together with print quality close to that of a daisy wheel printer. A major advantage of the ink jet is its quiet operation, which sets it in a class by itself.

Features

Like a conventional dot matrix printer, the SQ-2000 uses dots to create each character. Instead of using a ribbon, it transfers the characters onto the paper through 24 ink nozzles. The print head cleans itself automatically, keeping the nozzles clear.
The SQ-2000 accepts a wide range of different types of paper; you don’t need to buy specially manufactured stock. It’s designed to work on smooth, ordinary bond paper.
The SQ-2000 offers dot graphic modes which let you create custom characters, logos, and detailed graphic designs.
About the Manual
This manual contains all the information you need to operate the SQ-2000. In the first section, you’ll find the necessary details to get your SQ-2000 up and running. The second part of the manual contains information on how to take full advantage of some of the printer’s special features.
Chapter 1 shows you how to print your first document in ten
easy steps. Chapters 2 and 3 include a description of the control
panel, information on using your printer with word processing,
and some programming tutorials. Chapter 4 describes how the printer maintains itself and contains some troubleshooting sug­gestions.
If you already know how to program a printer, you will find useful information on graphics capabilities in chapters 5 and 6. Chapters 7 and 8 contain additional programming information.
The Appendixes provide reference information for program­ming, instructions for installing an optional tractor feed unit, and specifications.
Chapter 1
10
Setting up your SQ-2000 is simple and straightforward, even if you’ve never used a printer before. In this chapter, you’ll learn how to set up your printer and perform your first printing job in 10 easy steps, shown on the next two pages.
steps to Printing
3
1
Unpacking the
printer
2
Putting
on the paper feed knob
3 Installing the ink cartridge
Installing the inferface card
5
4 Setting up the paper guide
4
Connecting the printer
6
Customizing the printer
7
Loading the paper
8
Self-testing the printer
9
ABCDEFGHIJKLMNOPQRSTUVWXYZ[\] BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^ CDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ DEFGHIJKLMNOPQRSTUVWXYZ[\]^_' EFGHIJKLMNOPQRSTUVWXYZ[\]^_'a FGHIJKLMNOPQRSTUVWXYZ[\]^_'ab GHIJKLMNOPQRSTUVWXYZ[\]^_'abc HIJKLMNOPQRSTUVWXYZ[\]^_'abcd
IJKLMNOPQRSTUVWXYZ[\]^_'abcde
JKLMNOPQRSTUVWXYZ[\]^_'abcdef KLMNOPQRSTUVWXYZ[\]^_'abcdefg LMNOPQRSTUVWXYZ[\]^_'abcdefgh MNOPQRSTUVWXYZ[\]^_'abcdefghi
NOPQRSTUVWXYZ[\]^_'abcdefghij
OPQRSTUVWXYZ[\]^_'abcdefghijk
PQRSTUVWXYZ[\]^_'abcdefghijkl
QRSTUVWXYZ[\]^_'abcdefghijklm
10 Printing your first document
MEMO
Text
Don Donnison, President All employees
As you all know, we have just entered an e field in sensing device industry,
rared sensors.
A smart infrared sensor incorporates microc hnology in the form of a high-speed micropr h standard infrared sensing equipment. The
ions for a sophisticated sensing device are
imited:
Industrial robots
Industrial quality assurance
Detecting electronic equipment failure Security systems
Aviation
We believe the advances we are asking will br
pany to the sensing device industry.
5
Figure 1-1. Continuous paper feeding

Selecting the Right Location

To make sure you’ve picked a satisfactory location for your
SQ-2000, keep the following points in mind.
The location should be:
l A flat, stable surface with enough room for continuous paper
feed as shown in the illustration.
l Served by an electrical outlet that cannot be turned off
accidentally by a wall switch or similar switch.
l Out of direct sunlight and not exposed to grease or dust. l Away from electrical interference from motors and high vol-
tage power lines.
l Not subject to temperatures below 41°F (5°C) or above 95°F
(35°C) when the printer is operating.
l Not subject to either extremely high or extremely low
humidity.
If your location meets these conditions, you’re ready to begin
setting up your new printer.
6
Single-sheet paper guide
Manual
Figure
1
tive shipping material and plastic wrapping. Save these packing materials with the carton in case you need to ship or store your printer later.
is missing or appears damaged, contact your dealer.
computer. If the back of your printer looks like the picture below, the interface card is already in place.

Unpacking the Printer

Carefully lift the SQ-2000 from the carton. Remove the protec-
Check to see that you have all the parts shown above. If a part
You should also have the printer interface card suitable for your
l-2.
Printer
parts
Caution:
Do not plug in the printer until Step 8.
Figure 1-3.
Interface
card
installed
7
Figure 1-4. Installing the paper feed knob
2
knob so that it matches the flat side of the platen shaft.
Note:
If you’re going to ship the printer, be sure to remove the knob to
safeguard against damaging it.
8
Putting on the Paper Feed Knob
Slip the paper feed knob into place as shown above, aligning the
Figure 1-5. The ink cartridge
3

Installing the Ink Cartridge

Caution:
Under no circumstances should the power be switched ON when the ink cartridge has been removed.
The ink compartment is located in the left rear corner of the
printer. To open the compartment, pull back and up on the lid
and set it aside.
Remove the ink cartridge tank from its vacuum-packed wrap-
ping.
Holding the tank with the white label toward the front of the
printer, insert the tank into the compartment. The tank has a
raised guide on the right side that fits snugly into a slot in the printer.
Gently press down on the tank until it stops. Do not force it.
The cartridge is completely inserted when the top of the tank is
below the two flexible hooking edges shown above. Now, snap the ink compartment lid back into place.
9
Figure 1-6. Installing the single-sheet paperguide
4
of paper into the SQ-2000. To install this guide, hold the guide in both hands, facing the
front of the printer.
feet into the two slots shown above.
notches in the guide’s feet on these two bars.
into place with a click.
the guide away from you. Then lift it free of the printer.
10

Setting Up the Single-Sheet Paper Guide

You’ll use the single-sheet paper guide to feed individual sheets
With the guide tilted away from you, lower its two notched
At the back of each slot is a round horizontal bar. Place the
Then tilt the guide toward you and press gently until it locks
To remove the guide, press on the two locking levers and tilt
Figure 1-7. Removing the protective plate
5
to Step 6. (Look back to Step 1 to see how the card looks when it is installed.)

Installing the Interface Card

If your printer already has the interface card installed, go ahead
Warning: If you have been operating the printer, first turn it off, then unplug it before attempting to install or remove the inter-
face card.
First, use a Phillips screwdriver to remove the two screws
shown above. Set them aside carefully so they won’t get lost. Take off the U-shaped protective metal plate to gain access to the printer. Remove the interface card from its package, taking care not to touch the electrical parts.
Now, ease the card into the printer by sliding it into the grooves as shown below. The metal back plate of the card should be toward you and the electrical parts should be on too.
Figure Z-8. Sliding in the interface card
11
Figure l-9. Snapping the interface card into place
Use both thumbs as shown above to push the card into place. You should feel a slight resistance when there’s about a quarter of an inch to go. Press gently with gradually increasing pressure until the card snaps into place.
If the card doesn’t seem to align correctly, remove it carefully and try again. Be sure it is properly positioned in the grooves.
Now inspect the card. It should be firmly seated, the back plate flush with the back of the printer.
Replace the two screws you removed earlier.
12
Figure l-10. Connecting the printer and computer
6
To connect the SQ-2000 to your computer, you’ll need either a parallel or serial interface cable, depending on your computer. Refer to the manual for your computer or check with your dealer
for the proper cable.
OFF. Next, plug one end of the cable into the computer and the other end into the connector on the interface card.
grounding screws next to the sockets of both machines as shown. Connect the wire clips (or screws) to secure the plugs to their sockets.

Connecting the Printer to Your Computer

First, make sure both the computer and printer are turned
If the cable comes with a grounding wire, attach it to the
13
DIP switch panel
olumn
Interface DIP switch panel
Figure l-21. Locating the DIP switches
7
to customize the printer to your special needs. These are shown
in the picture.
to suit a variety of applications.

Customizing the Printer

There are two DIP switch panels on the SQ-2000 that allow you
The switches are preset at the factory, but they can be changed
For information on the DIP switches and how to change them,
see Appendix D.
14
Figure l-12. Loading single-sheet paper
8

Loading Single-Sheet Paper

Before beginning the paper-loading procedure, plug in the
SQ-2000 and turn it on. When you turn the printer on, a number of things happen:
l The print head moves all the way to the left, and goes through
a brief self-cleaning cycle. You’ll hear a whirring noise that will last a few seconds then stop. (For more details on the SQ-2000’s self-cleaning feature, see Chapter 4.)
l The indicator lights on the control panel light up. The
POWER, READY, and ON LINE lights glow green, and the PAPER OUT light is red, indicating that there is no paper loaded in the printer.
15
Now you’re ready to load paper.
1. Press the ON LINE button. The ON LINE and READY lights go out, indicating that the printer is off-line-the power is on but the printer won’t print.
2. Insert a sheet of paper into the paper guide and press the SHEET FEED button. The paper automatically feeds into the printer, and the red PAPER OUT light goes out.
3. With the paper loaded, lift the dust cover and adjust the rollers on the pressure bar as shown below.
I’
I
I
Figure 1-13. Adjusting pressure bar rollers
I
16
ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_'abcdefgh BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_'abcdefghi CDEFGHIJKLMNOPQRSTUVWXYZ[\]^_'abcdefghij DEFGHIJKLMNOPQRSTUVWXYZ[\]^_'abcdefghijk
EFGHIJKLMNOPQRSTUVWXYZ[\]^_'abcdefghijkl FGHIJKLMNOPQRSTUVWXYZ[\]^_'abcdefghijklm GHIJKLMNOPQRSTUVWXYZ[\]^_'abcdefghijklmn HIJKLMNOPQRSTUVWXYZ[\]^_'abcdefghijklmno
IJKLMNOPQRSTUVWXYZ[\]^_'abcdefghijklmnop
Figure l-14. Self-test
9
To
l
l
l
l Turn OFF the printer using its ON-OFF switch.

Self-Testing the Printer

self-test
the printer, follow these steps:
First,
wide loaded into the printer.
Be sure the DIP switches under
the setting below:
Adjust
be sure that you have a sheet of paper at least 8½ inches
the dust cover are set to match
Figure l-15. DIP switch setting for self-test
the paper pressure bar as shown in Step 8.
Now, turn ON the printer while holding down the LF button.
The printer will immediately begin printing out the self-test
characters shown above.
To stop the test, simply turn OFF the printer, or
stop when it reaches the bottom of the page.
wait for it to
17

A Word About Selecting Paper

With an ink jet printer, paper absorbency is an important com­ponent for good print quality. Paper which is either too absor­bent or not absorbent enough will give you less than optimum print quality.
You can see in Figure 1-16 what happens when paper is used which soaks up too much ink. The ink tends to bleed, causing blurred or smeared characters.
Figure 1-17 shows what can happen when paper is not absor-
bent enough. The characters take too long to dry and are easily
smeared.
standard
for
infrared sensing
a sophisticated sens
ted:
Industrial robots Industrial quality assuranc
Figure I-16. Paper is too absorbent
MEMO
Don Donnison, President All employees
As
you all
field in
red sensors.
Figure l-77. Paper is not absorbent enough
know,
the
we have j
sensing
dev
Most dense-weave paper (of the quality used for business cor­respondence) can be used in the SQ-2000 without problems. However, it’s a good practice to test the paper in your printer before purchasing a large quantity. Of course, you should also test labels and preprinted forms.
18

Testing your paper

To test a supply of paper, take the top sheet from the package and load it in the printer. Have your printer perform its self-test as shown in Step 9.
Now carefully look at each character in every line. If no ink
bleeds, the paper should be suitable for your SQ-2000.
Then take a new sheet from the package. This time, turn the
sheet over and run the self test on the reverse side of the paper. Some types of paper give you consistently better printing results
on one side of the paper than on the other side.
Your printing should have the crisp appearance of the sample in Figure l-18.
MEMO
Don Donnison, President All employees
As
you all know,
field in
the
we have ju
sensing
devi
red sensors.
A smart infrared sensor inco ology in
standard
ns
for
the form of a infrared sensing
a sophisticated sens
hig
ited:
Industrial robots
---------- -----­Industrial quality assuranc
Figure l-18. Good print quality
Paper specially manufactured for use with ink jet printers can
also be ordered from your Epson dealer.
19
10
Now you’re ready to print out your first document.
Simply follow the normal procedure for your word processor. Additional information on printing documents can be found
in Chapter 3.

Printing Your First Document

20
MEMO
-----
From:
To:
new infrared sensors.
technology in
with cations for unlimited:
Don
Donnison.
President
All employees
AS
you all know,
field in
A smart infrared sensor incorporates
the sensing
the form of a
standard
Industrial robots Industrial quality assurance
________ Detecting electronic equipment failurer
___ Security systems
Aviation
________
We believe the advances we are making will bring our
infrared sensing
a sophisticated sensing device
we have just entered an
device
industry,
microcomputer
high-speed
equipment.
microprocessor
The are almost
company to the top of the sensing device industry.
Draft quality
MEMO
----
From: To:
new field in the sensing device
infrared sensors.
Don Donnison, President
All employees
As you all know, we have just entered an
industry,
exciting
“Smart”
appli-
exciting
"smart"
A smart infrared sensor incorporates microcomputer technology in the form of a high-speed microprocessor with cations
standard infrared sensing
for a sophisticated sensing device
equipment.
The are
appli­almost
unlimited:
We believe the advances we are making will bring our
company to the top of the sensing device industry.
Letter quality
Figure l-19. Sample document
21
Chapter 2
Operation
This chapter covers the switches that control the operation of
the SQ-2000, the panel indicators, and initialization sequences.

Power Switch

The main power switch is a rocker switch on the left side of the SQ-2000 towards the back. Press the front of the switch to turn the power on and the back of the switch to turn it off.
Warning: Never turn the power on or off by the switch at the main outlet. Never turn the power on or off by inserting or re­moving the main cable at the outlet or the socket at the back of the machine.
The SQ-2000 goes through a sequence of cleaning immediately after being powered on and before powering off. You can dam­age the printer if this sequence is not carried out.
23
Figure 2-l. Power switch and control panel

Control Panel Buttons

The control panel buttons are on the front of the printer. You should familiarize yourself with their functions before operating your printer.
Figure 2-2. Control panel buttons

ON LINE button

This button switches between the on-line and off-line states. If the paper is properly loaded, the on-line state is automatically selected when the power switch is turned on. The SQ-2000 then stands by to receive data from the host computer.
24

FF (Form Feed) button

This button is effective only when the SQ-2000 is in the off-
line state. When you press the FF button in the off-line state, the
paper is advanced to the next top of form.

LF (Line Feed) button

This button is effective only when the SQ-2000 is in the off­line state. When you press this button in the off-line state, the paper is advanced by a single line according to the current line spacing value. If you hold down the switch, the paper continues to advance.
Note:
To advance the paper a number of lines, use the FF and/or paper feed knob. Pressing the LF switch continuously will shorten the life of the motor.

CLEANING button

This button is effective only when the SQ-2000 is in the off-
line state. When you press the button at that time, the inside of
the print head is cleaned. Further details of cleaning are given in Chapter 4.

SHEET FEED button

This button is effective only when the SQ-2000 is in the off­line state. When you press the button in the off-line mode, the paper bail opens and a single sheet of paper is loaded.
The first printed line is about one inch below the top edge of
the form.
25

Indicators

The control panel has a number of lights that indicate the state
of the printer. The meanings of the indicators are as follows.
Figure 2-3. Control panel indicators
Table 2-l. Messages of panel indicator lights
Indicator
POWER
ON LINE
READY
INK LOW
PAPER OUT
Color
Green Green
Green
Red
Red
ON
Power on Power off On-line state Ready to
receive data Ink supply low
No more paper
OFF
Off-line state see below Not ready to
receive data Ink supply
adequate Paper in platen
Blinking
see below

Meaning of blinking indicators

The ON LINE indicator will blink in the following cases:
Cause
Temperature of the print head is below 59°F At power-up during head cleaning
The READY light will blink during data transmission. This
flickering is normal.
Rate
5 times a second 2 times a second
26

Paper-end detector

The printer is equipped with a paper-end detector that warns
you when the printer runs out of paper.
When
the printer detects that the paper has run out, printing stops, the PAPER OUT in­dicator goes on and the buzzer sounds.
The PAPER OUT light goes out when paper is loaded. Howev-
er, printing does not restart until the ON LINE switch is pressed.
The SQ-2000 has an override which allows the paper to move approximately one inch after the end of paper has been sensed. For this reason, always remove paper using the LF or FF buttons.
If you manually remove the paper from the printer, you won’t be sure the paper end has been detected. It is possible to later place the printer in the on-line state and have data lost (and printed onto the platen) if you don’t follow the correct procedure.

Ink low

When the ink cartridge is nearly empty, the INK LOW indica­tor lights and the buzzer sounds. Only 66 additional lines (ap­proximately one page) can be printed in this state. If the ink is low when the printer is switched on, the INK LOW indicator lights up and the printer remains off-line until the ink cartridge is replaced. To restart the printer, replace the cartridge, perform the head cleaning operation (explained in Chapter 4), and then set the printer on-line.

Buzzer

The buzzer is located on the control circuit board. It sounds for about 0.25 second in the following cases:
l When the BEL code (ASCII code <BEL>) is sent to the printer. l When the end of the paper is detected. l When the printer carriage malfunctions. l When the printer is out of ink.
Note:
The buzzer can be switched off when DIP switch SW2-6 is set to
ON (up). If a malfunction occurs the buzzer will sound even if the switch is set to ON.
27

Initialization

The SQ-2000
is
initialized
(i.e., set to a fixed set of conditions) in
the following cases:
l When you turn the power switch on. l (When you use a parallel interface) If the INIT signal is re-
ceived from the host computer, causing pin 31 of the parallel interface to become LOW.
l When you give the <ESC>@ software command.
The initialization sequence proceeds as follows (except when
using the software command):
1. All interface signals are reset.
2. The input buffer is cleared.
3. The ON LINE indicator goes on and the SQ-2000 waits to receive data.
4. Printer parameters are initialized to the default settings.
5. The default values of the DIP switches are set.
The <ESC> @ sequence only performs the last two opera­tions. The DIP switch values are set to the current values even if the power has not been switched off.
28
Chapter 3
Using the SQ-2000
This chapter tells you how to set up your word processor or other applications software to work with the SQ-2000. If you are interested in programming with the SQ-2000, the second part of this chapter contains basic information on control codes and ESCape sequences.

Using the SQ-2000 with Word Processors

Most word processing programs today support the SQ-2000 because it uses the same commands and control codes as many Epson printers.
These programs usually have a setup or installation procedure
that prepares the program to work with a printer. This is often a short question-and-answer session in which the program asks two or three basic questions about your computer and printer. To set up a program for use with the SQ-2000, you would give the
following answers:
Question
What type of computer are you using?
What type of printer are you using?
Answer
Your computer’s type
Choose LQ-1500 if listed. If not listed, choose FX-80 or FX-100. If specific mod­els are not listed, choose “Epson prin­ter.” (When new printers are released, it takes time to update the lists, so by choosing another Epson printer, you will still be sending the correct codes.)
29
What type of interface Parallel or serial (this will depend on the are you using?
Programs that don’t specifically list the SQ-2000 may ask other questions about your printer. The following questions are asked most often (the answers follow in bold).
interface board in the SQ-2000, your computer, and the type of cable you have).
1. Does your printer (SQ-2000) do standard backspacing?
2. How many passes of the print head are adequate for bold-
facing? Two
Some word processors let you redefine the printer instructions (often called processor certain information so that it can take advantage of your printer’s features. This is covered later on in this chapter, and in Appendix A.
printer drivers).
To do this, you must give your word
Yes

Using the SQ-2000 with other application programs

You can also use the SQ-2000 to print other documents, such as
spreadsheets, with various commercial software packages.
As with word processors, straightforward. If your program has a printer selection routine, then follow the advice given above.
most of your printing will be

Programming with the SQ-2000

This section provides an overview of the ASCII code system. It also gives basic instruction on how to send control codes and ESCape sequences to the printer in order to take advantage of the SQ-2000’s special features, such as italics, enlarged, or prop­ortional typestyles.
If you already know how to program your printer, you can skip to Appendix A, “ASCII Code Conversion Chart.”
“SQ-2000 Commands,” and Appendix B,
30

Computer-to-printer communications

A computer and printer communicate by means of numbered codes. If you press the letter A on the keyboard, it is translated into a numeric code, transmitted to a peripheral device (such as a video screeen or a printer) then displayed as the letter A.
To cope with the many different kinds of computers and print-
ers used today, a standard set of codes has been developed. This set of codes is called the American Standard Code for Information Interchange, or ASCII for short. Almost all computers use these
ASCII codes to communicate with printers.
There are ASCII codes for all of the letters in the alphabet, both upper- and lowercase, and for the numbers from 0 to 9. The ASCII code also includes most punctuation marks, and some codes that control printer functions. If you refer to the ASCII chart in Appendix B, you’ll find that all of these letters, numbers and punctuation marks have been assigned code numbers from 33 through 255.

ASCII codes

Although these codes are standard from computer to compu-
ter, they can be expressed in a number of different ways. The chart in Appendix B is a comparative table that lists each ASCII code as a character (A, B, C, 1,2,3) and as a decimal or hexadecimal number. For example, the letter A is represented as an A and as the decimal number 65. If you wanted to print the letter A using the BASIC language, you would use the decimal notation, writ­ten as CHR$(65).
The chart also shows the hexadecimal (or hex) value of each character. The hexadecimal numbering system is based on units of 16; our usual numbering system, decimal, is based on units of
10. In hex, the letter A is expressed as 41H (the H stands for
hexadecimal).
31

Control codes

Most of the time you don’t give this code system a thought. If you press A on the keyboard, the computer sends the code to the printer and the letter A is printed. However, some printer codes, like the one for a line feed, do not have a key on the keyboard.
These are the ASCII codes with values of less than 33. These codes are called control codes because they control the operation of the printer. These characters are not displayed on your screen and aren’t printed as a character by your printer.
The ASCII codes 0 through 32 have commonly used abbrevia­tions for their names, such as <LF> for a line feed. These con­trols are listed in Appendix A.

ESCape Sequences

There are not enough control codes for all of the advanced features of modem printers, so multiple-code control sequences have been developed. All of these control sequences begin with the control code ASCII 27, which is called Escape. (In this manual it is abbreviated as <ESC>.) These sequences can have more than one code following Escape, depending on the command.
The ESCape code changes the interpretation of the codes that
follow it - they are interpreted as part of a printer command. For example, if the SQ-2000 receives the number 52, it prints the numeral 4 because 52 is the ASCII code for that letter. However, if the printer receives a 27 just before the 52, it turns on the italic mode, because ESCape “4” is the SQ-2000’s code for italic print­ing, as shown in Appendix A.
This same command could also be written with “4” (including
the quotation marks) in place of the 52. Many ESCape sequences
are written with letters or numbers enclosed in quotation marks.
These letters or numbers can be used in place of the decimal or hexadecimal values as long as they’re placed in quotes. There’s
no functional difference between the two systems, but you might find the letters and numbers easier to remember.
32

Translating the ASCII code

You may also find that different manuals and programs use
different terms for the same characters or functions. For example,
your computer manual may say to send the decimal 10 for a line
feed, while your spreadsheet program recommends a <CR> or CTRL-J for the same thing.
Appendix B contains a conversion chart for all the common names of the ASCII codes, and shows the relationship between the different forms of notation. In addition, Appendix A gives a
description of all the control codes and ESCape sequences used on the SQ-2000.

How to send control codes to printer

The short program that follows illustrates the concepts of con-
trol codes and ESCape sequences. It is written in Microsoft BASIC, but it can be adapted to other forms of BASIC or other programming languages. If you have specific questions about how BASIC works, consult the program’s documentation. How to overcome problems specific to your computer is covered in Chapter 8.
1. Make sure that you’re in BASIC; then type the following line just as it appears here. (Don’t forget to include all semicolons,
even the ones at the end of the lines.)
10 LPRINT "NORMAL PRINTING" CHR$(lO) CHR$(13);
2. Now
press
RETURN,
The SQ-2000 prints:
type RUN, and press
RETURN
again.
NORMAL PRINTING
This line begins with a line number, 10, then the command LPRINT. Anything that is enclosed in quotation marks after the LPRINT command is sent to the printer.
If you check the ASCII chart in Appendix B, you’ll find that CHR$(lO) is the control code for a line feed, so when the printer receives this, it moves the paper up one line.
CHR$(13), according to the ASCII chart, is the code for carriage return, so the print head returns to the left margin and awaits the
next command.
33
3. Next type:
20 LPRINT CHR$(27) "4" "ITALIC PRINTING";
4. Now press RETURN, type RUN, and press RETURN again. The SQ-2000 prints:
NORMAL PRINTING
ITALIC PRINTING
This time the printer receives a CHR$(27) which is the code for
ESCape or <ESC>. This tells the printer that whatever comes next should be interpreted as a printer command.
Next comes “4” -- if you look under the SQ-2000 commands in Appendix A, you’ll find that <ESC> “4” is the command for italic print. So the SQ-2000 prints “ITALIC PRINTING” in italic
type.
5. Next type:
30 LPRINT CHR$(27)
6. Now press RETURN. In this line the printer receives the ESCape code CHR$(27), so it
reads “5” as a printer code, in this case the code to turn off the italic typestyle.
The next two codes, CHR$(1O) and CHR$(13), are for line feed and carriage return respectively, as described in step 2.
7. Next type:
"5" CHR$(1O) CHR$(13);
40 LPRINT CHR$(27) "p" CHR$(1) "PROPORTIONAL
PRINTING";
50 LPRINT CHR$(27) "p" CHR$(0) CHR$(1O) CHR$(13);
8. Now press RETURN, type RUN, and press RETURN again. The SQ-2000 prints:
NORMAL PRINTING
ITALIC PRINTING
PROPORTIONAL PRINTING
EMPHASIZED PRINTING
34
The “p” 1 in line 40 turns on the proportional printing, and the
“p” 0 in line 50 turns it off.
9. Next type:
60 LPRINT CHR$(27) “E”
70 LPRINT CHR$(27) “F”;
10. Now press The SQ-2000 prints:
NORMAL PRINTING
RETURN,
type RUN, and press
“EMPHASIZED PRINTING” ;
RETURN
again.
ITALIC PRINTING
PROPORTIONAL PRINTING
EMPHASIZED PRINTING
The “E” in line 60 turns on the emphasized printing and the “F” in line 70 turns it off.
The program is now complete. To see it fully assembled on the
screen, type LIST and press 10 LPRINT “NORMAL PRINTING” CHR$(10) CHR$(13);
20 LPRINT CHR$(27) “4” “ITALIC PRINTING”; 30 LPRINT CHR$(27) “5” CHR$(1O) CHR$(13); 40 LPRINT CHR$(27) “p” CHR$(1) “PROPORTIONAL
PRINTING”;
50 LPRINT CHR$(27) “p” CHR$(0) CHR$(10) CHR$(13); 60 LPRINT CHR$(27) “E” “EMPHASIZED PRINTING”; 70 LPRINT CHR$(27) “F”;
RETURN. You
will see:
To send the entire program to the printer, type RUN, press
RETURN,
NORMAL PRINTING
and the SQ-2000 prints:
ITALIC PRINTING
PROPORTIONAL PRINTING
EMPHASIZED PRINTING

Using Master Select Command

The SQ-2000 can produce over 100 different combinations of print styles. The Master Select command allows you to choose any one of these styles. The Master Select command consists of <ESC> “!" followed by a single ASCII code. The value of the ASCII code determines the printing style that is selected. A typi­cal master select command might look like this:
<ESC> “!” 66
35
This command would select italic proportional print. In
BASIC, the same command would look like this:
LPRINT CHR$(27) “!” CHR$(66);
You can make up your own combinations quite easily. This is possible because each print style has its own value you can use with the Master Select command. To create a “custom” Master Select Code, add the values of the print styles you wish to com­bine. The values of the print styles are as follows:
Elite Proportional Compressed Emphasized Expanded Italic 64 Underlined
For example, if you want to find the code for elite emphasized
italic print you would add these values: Elite
Emphasized
Italic
1 2 4
8
32
128
1
8 64 73
The Master Select Command you would use would look like
this:
<ESC> “!” 73 (in BASIC: CHR$(27) “!” CHR$(73);)
Note:
Proportional overrides pica/elite. Compressed works only in draft print.
Some of the more popular styles the SQ-2000 can produce are shown on the next four pages. The number following each exam­ple is the ASCII code (decimal) which will select that particular print style.
Proportional print styles are shown first. These styles are avail-
able in both the letter quality and draft sets. The next page shows the printing styles that are available in the letter quality set. The final two pages show the printing styles that are available in the draft set.
36
The Select Print Quality command will select either the letter quality or the draft set. The select print quality command looks like this:
<ESC> “x” 0 - To select the draft set <ESC> “x” 1 - To select the letter quality set
Table 3-1. Proportional print styles
Regular Emphasized
Italic
Regular Emphasized
Underlined
Regular Emphasized
Italic underlined
Regular Emphasized
Pica
Print Sample
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
________ MISwiy
Master
Select
Number
10
66
74
130 138
194
202
Print Sample
MISwiy
2
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
Expanded
Master
Select
Number
34 42
98
106
162
170
226
234
37
Table 3-2. Draft pica print styles
Regular
Emphasized
Italic
Regular
Emphasized
Underlined
Regular
Emphasized
italic underlined
Regular
Emphasized
Pica
Print Sample
MISwiy 0
MISwiy 8
MISwiy 64
MISwiy 72
MISwiy 128
MISwiy 136
MISwiy 192
Master
Select
Number
MISwiy 200
Compressed
Print
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy 140
MISwiy
Master
Select
Sample
Number
MISwiy
4
12
68
76
132
196
204
Expanded
Print Sample
MISwiy 32 MISwiy 36
Master
Number
Compressed
Expanded
Master
Sample
Number
MiSwiy 40 MISwiy 44
MlSwiy 96 MISwiy 100
MISwiy 104 MISwiy 108
MISwiy 160 MISwiy 164
MISwiy 168 MISwiy 172
MISwiy 224 MISwiy 228
MISwiy 232 MISwiy 236
Table 3-3. Draft elite print styles
Regular
Emphasized
Italic
Regular Emphasized
Underlined
Regular Emphasized
Italic underlined
Regular Emphasized
Elite
Print
Sample Number
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy 193
MISwiy 201
Master
Select
1
9
65
73
129
137
Compressed
Print Sample Number
MISwiy
MIswiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
Master
MISwiy
Select
5
13
69 71
133
141
197
205
Expanded
Print Print Sample
MISwiy 33 MISwiy 37
MISwiy 41 MISwiy
MISwiy 97 MISwiy 101
Master Master
Select Select
Number
MISwiy 105 MISwiy
MISwiy 161 MISwiy
MISwiy 169 MISwiy
Compressed
Expanded
Sample
Number
45
109
165
173
MISwiy 225 MISwiy 229
MISwiy 233 MISwiy 237
Table 3-4. Letter quality pica print styles
Regular
Emphasized
Italic
Regular Emphasized
Underlined
Regular Emphasized
Italic underlined
Regular Emphasized
Pica Compressed
Print Sample
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
Master
Select
Number
0
8
64
72
128
136
192
200
Print Sample Select
MISwiy
Master
Number
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
4
12
68
76
132
140
196
204
Expanded
Print Sample
MISwiy 32
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
Master
Select
Number
40 MISwiy
96 MISwiy
104 MISwiy
160 MISwiy
168 MISwiy
224 MISwiy
232 MISwiy
Compressed
Expanded
Print Sample
Master
Select
Number
MISwiy 36
44
100
108
164
172
228
236
Table 3-5. Letter quality elite print styles
Regular Emphasized
Italic
Regular Emphasized
Underlined
Regular Emphasized
Italic underlined
Regular Emphasized
Elite
Master
Sample
MISwiy MISwiy
MISwiy 65
MISwiy
MISwiy MISwiy
MISwiy 193 MISwiy
Select Select
Number
1
9
73
129
137
201
Compressed
Print Sample Number
MISwiy 133
Miswiy
MISwiy 197
MISwiy 205
Master
MISwiy 5 MISwiy 13
MISwiy 69
MISwiy 77
141
Expanded
Print Sample
Master
Select
Number
MISwiy 33
Compressed
Expanded
Print Sample
Master
Select
Number
MISwiy 37
MISwiy 41 MISwiy 45
MISwiy 97 MISwiy
105
MISwiy 161
MISwiy
MISwiy
MISwiy
169
225
233
MISwiy 101
MISwiy 109
MISwiy 165 MISwiy 173
MISwiy 229
MISwiy 237
Chapter3
Using the SQ-2000
This chapter tells you how to set up your word processor or other applications software to work with the SQ-2000. If you are interested in programming with the SQ-2000, the second part of this chapter contains basic information on control codes and ESCape sequences.
Using the SQ-2000 with Word Processors
Most word processing programs today support the SQ-2000 because it uses the same commands and control codes as many Epson printers.
These programs usually have a setup or installation procedure
that prepares the program to work with a printer. This is often a short question-and-answer session in which the program asks two or three basic questions about your computer and printer. To set up a program for use with the SQ-2000, you would give the
following answers:
Question
What type of computer are you using?
What type of printer are you using?
Answer
Your computer’s type
Choose LQ-1500 if listed. If not listed, choose FX-80 or FX-100. If specific mod­els are not listed, choose “Epson prin­ter.” (When new printers are released, it takes time to update the lists, so by choosing another Epson printer, you will still be sending the correct codes.)
29
What type of interface Parallel or serial (this will depend on the are you using?
Programs that don’t specifically list the SQ-2000 may ask other questions about your printer. The following questions are asked most often (the answers follow in bold).
interface board in the SQ-2000, your computer, and the type of cable you have).
1. Does your printer (SQ-2000) do standard backspacing?
2. How many passes of the print head are adequate for bold-
facing? Two
Some word processors let you redefine the printer instructions (often called printer drivers). To do this, you must give your word processor certain information so that it can take advantage of your printer’s features. This is covered later on in this chapter, and in Appendix A.
Yes
Using the SQ-2000 with other application programs
You can also use the SQ-2000 to print other documents, such as
spreadsheets, with various commercial software packages.
As with word processors, straightforward. If your program has a printer selection routine, then follow the advice given above.
most of your printing will be
Programming with the SQ-2000
This section provides an overview of the ASCII code system. It also gives basic instruction on how to send control codes and ESCape sequences to the printer in order to take advantage of the SQ-2000’s special features, such as italics, enlarged, or prop­ortional typestyles.
If you already know how to program your printer, you can skip to Appendix A, “ASCII Code Conversion Chart.”
“SQ-2000 Commands,” and Appendix B,
30
Computer-to-printer communications
A computer and printer communicate by means of numbered codes. If you press the letter A on the keyboard, it is translated into a numeric code, transmitted to a peripheral device (such as a video screeen or a printer) then displayed as the letter A.
To cope with the many different kinds of computers and print-
ers used today, a standard set of codes has been developed. This set of codes is called the American Standard Code for Information Interchange, or ASCII for short. Almost all computers use these
ASCII codes to communicate with printers.
There are ASCII codes for all of the letters in the alphabet, both upper- and lowercase, and for the numbers from 0 to 9. The ASCII code also includes most punctuation marks, and some codes that control printer functions. If you refer to the ASCII chart in Appendix B, you’ll find that all of these letters, numbers and punctuation marks have been assigned code numbers from 33 through 255.
ASCII codes
Although these codes are standard from computer to compu-
ter, they can be expressed in a number of different ways. The chart in Appendix B is a comparative table that lists each ASCII code as a character (A, B, C, 1,2,3) and as a decimal or hexadecimal number. For example, the letter A is represented as an A and as the decimal number 65. If you wanted to print the letter A using the BASIC language, you would use the decimal notation, writ­ten as CHR$(65).
The chart also shows the hexadecimal (or hex) value of each character. The hexadecimal numbering system is based on units of 16; our usual numbering system, decimal, is based on units of
10. In hex, the letter A is expressed as 41H (the H stands for
hexadecimal).
31
Control codes
Most of the time you don’t give this code system a thought. If you press A on the keyboard, the computer sends the code to the printer and the letter A is printed. However, some printer codes, like the one for a line feed, do not have a key on the keyboard.
These are the ASCII codes with values of less than 33. These codes are called control codes because they control the operation of the printer. These characters are not displayed on your screen and aren’t printed as a character by your printer.
The ASCII codes 0 through 32 have commonly used abbrevia­tions for their names, such as <LF> for a line feed. These con­trols are listed in Appendix A.
ESCape Sequences
There are not enough control codes for all of the advanced features of modern printers, so multiple-code control sequences have been developed. All of these control sequences begin with the control code ASCII 27, which is called Escape. (In this manual it is abbreviated as <ESC>.) These sequences can have more than one code following Escape, depending on the command.
The ESCape code changes the interpretation of the codes that
follow it -- they are interpreted as part of a printer command. For example, if the SQ-2000 receives the number 52, it prints the numeral 4 because 52 is the ASCII code for that letter. However, if the printer receives a 27 just before the 52, it turns on the italic mode, because ESCape “4” is the SQ-2000’s code for italic print­ing, as shown in Appendix A.
This same command could also be written with “4” (including
the quotation marks) in place of the 52. Many ESCape sequences
are written with letters or numbers enclosed in quotation marks.
These letters or numbers can be used in place of the decimal or hexadecimal values as long as they’re placed in quotes. There’s
no functional difference between the two systems, but you might find the letters and numbers easier to remember.
32
Translating the ASCII code
You may also find that different manuals and programs use
different terms for the same characters or functions. For example,
your computer manual may say to send the decimal 10 for a line
feed, while your spreadsheet program recommends a <CR> or CTRL-J for the same thing.
Appendix B contains a conversion chart for all the common names of the ASCII codes, and shows the relationship between the different forms of notation. In addition, Appendix A gives a
description of all the control codes and ESCape sequences used on the SQ-2000.
How to send control codes to printer
The short program that follows illustrates the concepts of con-
trol codes and ESCape sequences. It is written in Microsoft BASIC, but it can be adapted to other forms of BASIC or other programming languages. If you have specific questions about how BASIC works, consult the program’s documentation. How to overcome problems specific to your computer is covered in Chapter 8.
1. Make sure that you’re in BASIC; then type the following line just as it appears here. (Don’t forget to include all semicolons,
even the ones at the end of the lines.)
10 LPRINT "NORMAL PRINTING" CHR$(1O) CHR$(13);
2. Now
press
RETURN,
The SQ-2000 prints:
type RUN, and press
RETURN
again.
NORMAL PRINTING
This line begins with a line number, 10, then the command LPRINT. Anything that is enclosed in quotation marks after the LPRINT command is sent to the printer.
If you check the ASCII chart in Appendix B, you’ll find that CHR$(lO) is the control code for a line feed, so when the printer receives this, it moves the paper up one line.
CHR$(13), according to the ASCII chart, is the code for carriage return, so the print head returns to the left margin and awaits the
next command.
33
3. Next type:
20 LPRINT CHR$(27) "4" "ITALIC PRINTING";
4. Now press RETURN, type RUN, and press RETURN again. The SQ-2000 prints:
NORMAL PRINTING
ITALIC PRINTING
This time the printer receives a CHR$(27) which is the code for
ESCape or <ESC>. This tells the printer that whatever comes next should be interpreted as a printer command.
Next comes “4” -- if you look under the SQ-2000 commands in Appendix A, you’ll find that <ESC> “4” is the command for italic print. So the SQ-2000 prints “ITALIC PRINTING” in italic
type.
5. Next type:
30 LPRINT CHR$(27)
6. Now press RETURN. In this line the printer receives the ESCape code CHR$(27), so it
reads “5” as a printer code, in this case the code to turn off the italic typestyle.
The next two codes, CHR$(lO) and CHR$(13), are for line feed and carriage return respectively, as described in step 2.
7. Next type:
"5" CHR$(1O) CHR$(13);
40 LPRINT CHR$(27) "p" CHR$(1) "PROPORTIONAL
PRINTING";
50 LPRINT CHR$(27) "p" CHR$(0) CHR$(10) CHR$(13);
8. Now press RETURN, type RUN, and press RETURN again. The SQ-2000 prints:
NORMAL PRINTING
ITALIC PRINTING
PROPORTIONAL PRINTING
EMPHASIZED PRINTING
34
The “p” 1 in line 40 turns on the proportional printing, and the
“p” 0 in line 50 turns it off.
9. Next type: 60 LPRINT CHR$(27) “E”
70 LPRINT CHR$(27) “F”;
10. Now press RETURN, type RUN, and press RETURN again. The SQ-2000 prints:
NORMAL PRINTING
“EMPHASIZED PRINTING” ;
ITALIC PRINTING
PROPORTIONAL PRINTING
EMPHASIZED PRINTING
The “E” in line 60 turns on the emphasized printing and the “F” in line 70 turns it off.
The program is now complete. To see it fully assembled on the
screen, type LIST and press RETURN. You will see: 10 LPRINT “NORMAL PRINTING” CHR$(10) CHR$(13);
20 LPRINT CHR$(27) “4” “ITALIC PRINTING”; 30 LPRINT CHR$(27) “5” CHR$(1O) CHR$(13); 40 LPRINT CHR$(27) “p” CHR$(1) “PROPORTIONAL
PRINTING”;
50 LPRINT CHR$(27) “p” CHR$(0) CHR$(10) CHR$(13);
60 LPRINT CHR$(27)
70 LPRINT CHR$(27) “F”;
“E” “EMPHASIZED PRINTING”;
To send the entire program to the printer, type RUN, press
RETURN, and the SQ-2000 prints:
NORMAL PRINTING
ITALIC PRINTING
PROPORTIONAL PRINTING
EMPHASIZED PRINTING
Using Master Select Command
The SQ-2000 can produce over 100 different combinations of print styles. The Master Select command allows you to choose any one of these styles. The Master Select command consists of <ESC> “!" followed by a single ASCII code. The value of the ASCII code determines the printing style that is selected. A typi­cal master select command might look like this:
<ESC> “!” 66
35
This command would select italic proportional print. In
BASIC, the same command would look like this:
LPRINT CHR$(27) “!” CHR$(66);
You can make up your own combinations quite easily. This is possible because each print style has its own value you can use with the Master Select command. To create a “custom” Master Select Code, add the values of the print styles you wish to com­bine. The values of the print styles are as follows:
Elite Proportional Compressed Emphasized Expanded Italic 64 Underlined
For example, if you want to find the code for elite emphasized
italic print you would add these values: Elite
Emphasized
Italic
1 2 4
8
32
128
1
8 64 73
The Master Select Command you would use would look like
this:
<ESC> “!” 73 (in BASIC: CHR$(27) “!” CHR$(73);)
Note:
Proportional overrides pica/elite. Compressed works only in draft print.
Some of the more popular styles the SQ-2000 can produce are shown on the next four pages. The number following each exam­ple is the ASCII code (decimal) which will select that particular print style.
Proportional print styles are shown first. These styles are avail-
able in both the letter quality and draft sets. The next page shows the printing styles that are available in the letter quality set. The final two pages show the printing styles that are available in the draft set.
36
The Select Print Quality command will select either the letter quality or the draft set. The select print quality command looks like this:
<ESC> “x” 0 -- To select the draft set <ESC> “x” 1 -- To select the letter quality set
Table 3-1. Proportional print styles
Regular Emphasized
Italic
Regular Emphasized
Underlined
Regular Emphasized
Italic underlined
Regular Emphasized
Pica
Print Sample
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
Master
Select
Number
10
66
74
130 138
194
202
Print Sample
MISwiy
2
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
Expanded
Master
Select
Number
34 42
98
106
162
170
226
234
37
Table 3-2. Draft pica print styles
Regular
Emphasized
Italic
Regular
Emphasized
Underlined
Regular
Emphasized
italic underlined
Regular
Emphasized
Pica
Print Sample
MISwiy 0
MISwiy 8
MISwiy 64
MISwiy 72
MISwiy 128
MISwiy 136
MISwiy 192
MISwiy 200
Master
Select
Number
Compressed
Print Select
Sample Number
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy 140
MISwiy
MISwiy
Master
4
12
68
76
132
196
204
Expanded
Print Sample
MISwiy 32 MISwiy 36
Select
Number
Compressed
Expanded
Master
Select
Number
MISwiy 40 MISwiy 44
MlSwiy 96 MISwiy 100
MISwiy 104 MISwiy 106
MISwiy 160 MISwiy 164
MISwiy 168 MISwiy 172
MISwiy 224 MISwiy 228
MISwiy 232 MISwiy 236
Table 3-3. Draft elite print styles
Regular
Emphasized
Italic
Regular Emphasized
Underlined
Regular Emphasized
Italic underlined
Regular Emphasized
Elite
Print
Sample Number
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy 193
MISwiy 201
Master
Select
1
9
65
73
129
137
Compressed
Print Sample Number
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
Master
MISwiy
Select
5
13
69 77
133
141
197
205
Expanded
Print Print Sample
MISwiy 33 MISwiy 37
MISwiy 41 MISwiy
MISwiy 97 MISwiy 101
Master Master
Select Select
Number
MISwiy 105 MISwiy
MISwiy 161 MISwiy
MISwiy 169 MISwiy
Compressed
Expanded
Sample
Number
45
109
165
173
MISwiy 225 MISwiy 229
MISwiy 233 MISwiy 237
Table 3-4. Letter quality pica print styles
Regular
Emphasized
Italic
Regular Emphasized
Underlined
Regular Emphasized
Italic underlined
Regular Emphasized
Print Sample
MISwiy
MISwiy
MISwiy MISwiy
MISwiy
MISwiy
MISwiy MISwiy
Pica Compressed
Master
Select
Number
0
8
64
72
128
136
192
200
Print Sample Select
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
Master
Number
4
12
68
76
132
140
196
204
Expanded
Print Sample
MISwiy 32
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
MISwiy
Master
Select
Number
40 MISwiy
96 MISwiy
104 MISwiy
160 MISwiy
168 MISwiy
224 MISwiy
232 MISwiy
Compressed
Expanded
Print Sample
Master
Select
Number
MISwiy 36
44
100
108
164
172
228
236
Table 3-5. Letter quality elite print styles
Regular Emphasized
Italic
Regular Emphasized
Underlined
Regular Emphasized
Italic underlined
Regular Emphasized
Elite
Master
Sample
MISwiy
MISwiy
MISwiy 65
MISwiy
MISwiy
MISwiy
MISwiy 193 MISwiy
Select Select
Number
1
9
73
129
137
201
Compressed
Print Sample Number
MISwiy 133
MISwiy
MISwiy 197
MISwiy 205
Master
MISwiy 5
MISwiy 13
MISwiy 69
MISwiy II
141
Expanded
Print Sample
Master
Select
Number
MISwiy 33
Compressed
Expanded
Print
Sample
Master
Select
Number
MISwiy 37
MISwiy 41 MISwiy 45
MISwiy 97 MISwiy
105
MISwiy 161
MISwiy
MISwiy
MISwiy
169
225
233
MISwiy 101
MISwiy MISwiy 109
MISwiy 165 MISwiy 173
MISwiy 229
MISwiy 237
Chapter 4
Printer Care and Maintenance
In this chapter, you’ll learn about the self-cleaning feature and
other operating aspects of the printer. There’s also a trouble-
shooting chart you can use to quickly solve any little problems
that might arise.
As you’ll see, the SQ-2000 is not only easy to use -- it’s also
simple to maintain on a daily basis. Periodic attention by a ser-
vice technician is necessary, however.

The Ink Jet Print Head

If you’re familiar with dot-matrix printers, you know that they print characters made up of numerous tiny dots. The SQ-2000 is similar in some ways, but significantly improves on earlier dot­matrix technology. Rapid-drying ink has replaced the ink ribbon. Miniature nozzles release the dots directly onto the page.
The result is faster printing with almost no noise. Moreover, because the SQ-2000’s print head releases the ink from 24 nozzles arranged in two columns,
defined.*
each character is more sharply
* In letter quality mode
43

How Automatic Print Head Cleaning Works

Each time you turn on the printer it goes through a brief cleaning cycle in which cleaning solvent is sprayed through the nozzles. When you turn the printer off, it cleans itself again.
Moreover, during printing the SQ-2000 periodically pauses for
a few moments to clean the print head’s lower nozzles, which don’t get used as much and are more liable to become clogged.
A reservoir contained in the disposable ink cartridge supplies
the cleaning solvent. Used solvent flows back into the cartridge to a separate location.
Ink is also kept from accidentally drying in the nozzles by another automatic feature: Any time the printing stops for a minute or more, the print head returns to its storage position and the nozzles are automatically capped.
Caution:
Never unplug or otherwise turn off the printer without first
switching it off using the main power switch.
Turning off the printer from a remote source defeats the auto-
matic cleaning operation and can permit ink to dry in the ink nozzles. If this occurs, the print head may be damaged and have to be replaced.
For this reason, avoid plugging the printer into an outlet
which is controlled by a wall switch or similar switch.
Cleaning the print head while printing
Occasionally you may want to give the print head an addition-
al cleaning while engaged in printing.
First, make sure the printer is off-line. Clean the print head by pressing the CLEANING button for a few moments, then releas­ing. This makes the printer go through its cleaning cycle for about 15 seconds. (see Figure 4-l).
44
Figure 4-Z. Buttons for cleaning during printing
This time the print head did something different. It performed the cleaning action, but first it stopped for several seconds in front of the revolving rubber “brush” next to the storage station. That gave it an additional scrubbing to remove dirt and other
deposits.
To resume printing, simply press the ON LINE button again
and the printing starts from the point of interruption.

For more extensive cleaning

At those times when the short cleaning cycle may not be
enough, or when the printer has not been used for some time, you can put the SQ-2000 through a more thorough cleaning.
If
you’ve
no data will be lost. Turn off the printer. Then, turn it back on while holding down the CLEANING button.
This cycle takes about two minutes, including a quiet period
in which the solvent is allowed to soak into the print head to
dissolve ink deposits.
been printing, first let the printing stop on its own so

Special cleaning

When you know you won’t use the printer for several weeks or
longer, if it’s to be moved long distances, or stored at tempera­tures over 95°F, you need to take an important precaution.
You must put the SQ-2000 through another cleaning cycle. But
when this one ends, air has replaced the ink in the print head
and tubes to keep ink from drying in them.
Turn off the printer while holding down the CLEANING but-
45
ton. This special cleaning also takes about two minutes.
Be careful not to unplug the printer too quickly. As with the other extended cleaning cycle, there’s a quiet period during which solvent is allowed to soak into the print head and other parts.
Wait for the POWER light to go out. That’s your signal the printer is ready to be stored or transported.

Summary of Cleaning Cycles

Here’s a brief summary of the cleaning cycles:
l The printer automatically cleans itself when it is turned on
and periodically during operation.
l If you notice a slight deterioration in print quality, push the
ON LINE button to make the printer go off-line. Then press
the CLEANING button for a few moments. To resume print-
ing, press the ON LINE button again.
l For a more extensive cleaning, wait for the printing to stop,
then turn the printer off. Turn it back on again while pressing the CLEANING button.
l When the printer won’t be used for an extended period, or is
to be stored or transported, clear the printing parts of ink by
turning the printer off while holding down the CLEANING
button. Let the POWER indicator go out before unplugging
the printer.

Troubleshooting Guide

The SQ-2000 is often able to tell when something goes wrong, such as when paper has jammed or someone forgot to replace the ink cartridge. It does that through special sensing devices.
When such a problem occurs, you may be alerted by a warning light or buzzer. Or the printer just won’t operate.
The following troubleshooting guide provides some of the more common problems that may arise during normal operation. To save time (and perhaps some embarrassment), be sure to refer
to it before you call in service personnel.
46
Troubleshooting Guide
Problem
Printer will not operate at
Possible Cause
Printer is not on-line with
all after being turned on. computer.
Ink cartridge is not set in place or pushed down far enough.
No ink in cartridge.
Print head will not move
Paper loaded incorrectly.
or printer stops printing.
Printing has reached bot­tom of page.
Dots are missing
Dirty print head due to paper lint, ink deposits, etc.
Check
l
Check to see if ON LINE indicator is glowing.
l
Check if the ink car­tridge is installed and that it is not down past the hooking edges.
l
Check to see if INK LOW indicator is glowing.
l
Check to see if paper is properly inserted or possibly jammed.
l
Check to see whether PAPER OUT indicator is glowing.
To Solve It
l
Press ON LINE button
to make printer go on-
line.
l
Set ink cartridge,
pushing it down until
hooking edges show.
l
Turn off printer. Re-
place ink cartridge. Turn on printer and press CLEANING
button.
l
Reload paper.
l
Remove printed page
with FF button and load
new sheet.
l
Do brief cleaning by pressing CLEANING button. Repeat.
See Page
16, 24
9
9, 27
15
27
44
Problem Possible Cause Check To Solve It
Dots still missing after normal cleaning cycle.
Print “bleeds” and has blurred appearance.
Print smudges, dries too Paper not absorbent
slowly.
Print appears distorted-­dots either too coarse or dense or appear wavy.
Print appears distorted Tension not correct on while using continuous
paper.
Dirty print head. Ink cartridge faulty.
Paper is too coarse or
overly absorbent.
enough.
Print head is dirty.
Interference by wind or airl Check if printer is ex-
from powerful fan.
continuous paper.
l
Do extended cleaning.
l
Check ink cartridge for
effective use period.
l
Turn printer off. Re­place with new ink car­tridge with unexpired effective period. Clean after replacement.
l
Do printer self-test and
inspect result.
l
Use other side of paper.
l
Replace with paper having denser weave.
l
Check several sheets
l
Use other side of of paper stock with prin- paper. ter self-test.
l
Replace with paper that
meets absorbency re­quirements.
l
Do normal cleaning op-
eration.
l
Relocate printer out of posed to strong wind or air current. fan.
l
Check if tractor sprock-
l
Move right sprocket so ets are positioned cor- paper is pulled taut.
rectly.
l
Check if paper guide
l
Spread paper guide
skids evenly. skids are evenly spaced.
See Page
45
9, 44
18
18
44
-
E-4
Problem
Paper has ink stains or
splotches.
Continuous paper feeds
irregularly: tension on
paper is uneven.
Possible Cause
Paper setting method is
wrong.
Ink has been sprayed onto platen.
Obstruction behind platen is binding paper.
Check
l
Check to see that paperl Adjust rollers on paper
I
pressure bar is properly
To Solve It
pressure bar.
set with end rollers at
the edge of the paper.
l
Inspect platen for ink.
l
Check if paper scrap
l
Clean the platen.
l
Remove platen to re­has become caught be- move obstruction. hind platen.
See Page
16, E-4
--
Chapter 5
User-Defined Characters
With the SQ-2000, it is possible to define and print characters
of your own design. This can be useful if you want to design an
entirely new alphabet or typeface. You can also create characters for special applications (for example, mathematical or scientific symbols). Or, you may want to create graphic patterns with user­defined characters to serve as building blocks for larger designs. How these are done is the subject of this chapter.

Dot-Matrix Printing

In order to use user-defined characters, you need to understand how dot-matrix printing works. The process is called dot-matrix printing because each character is composed of small dots
arranged on a matrix, or printed, let’s take a look at the print head itself.

The print head

The SQ-2000 print head does not print an entire character at
one time. Instead, it prints dots one column at a time. The print
head contains 24 ink nozzles that appear to be arranged in a
vertical column. If you were to remove the print head and look at the nozzles, you would see two staggered columns of 12 nozzles. However, the timing is such that they print as one continuous column of 24 nozzles.
grid.
To see how that character grid gets
51
As the print head moves across the page, electrical impulses cause the appropriate nozzles to release ink against the the paper, causing a single dot to print with each impulse. Figure 5-1 shows the print head as it prints a capital H. In the first column, six nozzles release ink, and in the next four columns, one nozzle releases ink. In the last column six nozzles release ink again.
Figure 5-1. The print head

The print matrix

Now that you know how the print head works, it’s important to understand how the characters are defined and stored in the SQ-2000’s memory. As mentioned earlier, each character is com­posed of a series of dots arranged on a matrix.
The matrix is 24 dots high-one dot for each nozzle on the SQ-2000 print head. The width of the character matrix is depen­dent upon the character set in use. For draft characters, the grid is nine dots wide. Letter quality characters are defined on a grid which is 15 dots wide, but the dots are placed closer to each other. The grid for proportional characters is 37 dots wide, with the dots spaced even more closely.
52
Figure 5-2 shows two of the character matrixes with the dots
used to print the letter H. All of the SQ-2000’s characters are
stored in the
same manner.
Draft Letter Quality
Figure
5-2. Character grids

Defining Your Own Characters

With the knowledge of how the SQ-2000 stores and prints
characters, you are ready to define your own.
The first step in defining characters is to lay out the dots on a
grid just as you want them to print. (The grids are exactly the
same as those Epson has used to define the standard character sets.) In Figure 5-3 you can see a user-defined character, a mod­em capital A.
53
Fig. 5-3. User-defined character
Next, you translate the dot pattern you’ve created on paper to a numeric format so you can send the information to the SQ-2000. 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 each dot.
Each bit is a power of two, so that 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
(which has a value of 128) is at the top and the least significant bit (which has a value of 1) is at the bottom.
Figure 5-4 shows how to use this method to calculate the data bytes for the first column of our letter A. Each bit that represents a dot has a value of 1; each bit that represents a space has a value of 0. To the right of the column the binary numbers are converted
to decimal value.
This last step is merely for convenience. The data you send to the SQ-2000 can be in any form (binary, decimal, or hexadecimal) that you can use with your program language. We’ve chosen to use decimal numbers because the example programs in this manual are written in BASIC and everyone is familiar with dec-
imals.
54
MSB
LSB MSB
00011001 -25:D
LSB MSB
LSB
= Most significant bit
MSB LSB = Least significant bit
Figure 5-4. Data bytes for
01010101 - 85:D
01010000 - 8O:D
-he first column of a new capital A
2
3
You’ve seen how to design a character by laying out the dots on a grid, translating the dots to binary information, and then converting the binary numbers to decimal equivalents. The next (and final) step in defining a character is to send this information to the printer.

Sending information to the SQ-2000

The SQ-2000 command to define characters is one of the more complex in its repertoire. The format of the command is this:
<ESC> “&” <NUL> nl n2 data
The <ESC> “&" is simple enough; that’s a format you should be quite familiar with by now. The <NUL> (which is ASCII code 0) allows for future enhancements. At this time it is always ASCII code 0.
With the SQ-2000, you can define many characters with a sin­gle command. The n1 and n2 bytes are used to specify a range of ASCII codes for the characters you will define. You then have to provide character definition data for all of the characters in that range to follow.
55
Note:
The entire range of ASCII decimal codes (from 0 to 127) can be used for user-defined characters, but a caution is in order. Char­acters with ASCII decimal values below 32 are usually reserved as control codes by both your computer and your printer. While these characters can be replaced by user-defined characters, it should be avoided because of the effect on the normal control codes.
To see how to specify nl and n2, let’s use an example. If, for instance, you wanted to redefine the characters A through Z, nl would be “A” (or ASCII decimal 65) and decimal 90). So the command <ESC> “&” <NUL> “AZ” (fol­lowed by the appropriate data) would replace the entire alphabet of capital letters.
In some instances, you may want to redefine a single character. In this case, nl and n2 would have the same value. Our example at the end of this section does just that; it defines only the “A” character which is replaced by a new letter A.
Following the specification of the range of characters to be defined in this command is the data that defines the characters. The data is in this form:
n2
would be “Z” (ASCII
do, d1, d2, Dl, D2, . . . Dd1x3
The first three bytes are used to specify the width of the char-
acter and the space to be allowed on either side of it. The left margin (in dot columns) is specified by d0 and the right margin is specified by d2. The second byte (d1) specifies the number of columns of dots that are printed by the character. By varying the width of the character itself and the spaces around it, you can actually create proportional width characters that print at draft speed.
When defining draft quality characters, the number of printed
columns (dl) cannot exceed 9, and the sum of d0 + dl + d2 cannot exceed 12.
The last part of the character definition is the actual data that
defines the dot patterns for each character. Since it takes three
bytes to specify the dots in one vertical column of dots, the
SQ-2000 expects d1x3 bytes of data to follow d2.
56
An example character definition should make this clear:
10 ‘*** User-defined character: Capital A *** 20 ’ 30 ‘Select draft 40 LPRINT CHR$(27) “x’ CHR$(O); 50 ’ 60 ‘Define download character
70 LPRINT CHR$(27) “&” CHR$(O);
80 ’
90 ‘beginning and ending at A
100 LPRINT “AA”;
110 LPRINT CHR$(2) CHR$(1O) CHR$(1);
120 ’
130 ‘left margin, # of digits, right margin
140 FOR I=1 TO 10*3 150 160
READ A
LPRINT CHR$(A); 170 NEXT 180 ’ 190 ‘Print a sample
200 LPRINT “AAAAAAAAAAAAA” 210 ’ 220 ‘Select download 230 LPRINT CHR$(27) “%” CHR$(1); 240 LPRINT “AAAAAAAAAAAAA”
250 ’
260 ‘Deselect download
270 LPRINT CHR$(27) “%" CHR$(0); 280 LPRINT “AAAAAAAAAAAAA” 290 END 300 DATA 25,85,80,4,0,0,1,1,0 310 DATA 0,64,0,0,17,0,0,4,0 320 DATA 0,1,0,0,0,64,0,0,16 330 DATA O,O,O,
In line 40, the <ESC> “x” command selects draft style print-
ing. You’ll see why later in this chapter.
The actual character definition, using the command syntax ex-
plained above, starts n1 and n2, the range of characters being defined (in this case, a range of one). Line 110 contains d0, dl, 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 140 and 170.
in
line 70. The two A’s in line
100
represent
57

Printing User-Defined Characters

If you entered the example program above, you defined a capital A and placed it in the RAM location for ASCII decimal 65 (replacing the standard “A” ). You can now print out a three-line sample of your work. The first and third lines (printed by lines 200 and 280 of the program) print the normal A; the second line (line 240) prints the A that you defined.
This is the result.
AAAAAAAAAAAAA
AAAAAAAAAAAAA
AAAAAAAAAAAAA
As you can see, both sets of characters (the original ROM characters that the printer normally uses and the user-defined character set) remain in the printer available for your use. The command to switch between the two sets is used in lines 230 and
270. 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; the ROM characters will still be in use.
You may switch between character sets at any time-even in
the middle of a line. To try it, place a semicolon at the end of lines 200 and 240 in the program above.

Copying ROM to RAM

After running the program above, if you select the user-
defined character set and try to print other characters, the only
one that will print is the capital A. Since no other characters are in
the user-defined RAM area, nothing else prints. Other characters sent to the printer don’t 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 the user­defined character set. It is, however, rather inconvenient.
58
Therefore, the SQ-2000 has a command which allows you to copy all of the standard characters from ROM to the user-defined character set. The command format is:
<ESC> “:”
<NUL> <NUL> <NUL>
Note:
This command will cancel any user-defined characters you have
created. You must send this command to the printer before you define characters.
Using this command you can create a short sequence of codes that will copy normal characters to the user-defined character set, define your special characters, and select the user-defined charac­ter set. You can now print with the user-defined set as your normal character set. You’ll never need to switch back and forth between sets.

How Print Mode Affects User-Defined Characters

In the example program above, before you defined the new
capital A, you selected the SQ-2000’s draft print mode. By doing this, you caused any user-defined characters to print as draft characters because user-defined characters assume the mode that is in effect at the time they are defined.
The modes that affect user-defined characters are draft, letter
quality, and proportional printing. The <ESC> “x" n com-
mand selects between draft (n=0) and letter quality (n=l). The <ESC> “!” n (Master Select) or <ESC> “p”’ n (n=l) commands are used to select proportional printing.
The commands for defining characters, selecting the user­defined character set, and copying ROM are exactly the same for each of the user-defined print styles. The print mode in effect when the characters are defined determines the mode of the user-defined characters.
The print mode determines the size of the grid upon which the characters are designed and the speed at which they print. Table 5-l shows the different character grid sizes for each of the print modes.
59
Table 5-1.
User-defined character
design
grids
Draft Letter Quality
Proportional
dl
(maximum)
9
15
37
dO+d1+d2
(maximum)
12 18

Draft mode characters

As you have seen, draft characters are designed on a grid which is 24 dots high by 9 dots wide (plus up to three columns of dots for space between characters). User-defined draft characters print at the same high speed as normal draft characters, even
though they may print with more dots and may even be de­signed for proportional spacing.
There is, however, one restriction on designing characters for
draft printing. Dots in the same row may not print in adjacent columns. That is, there must be an empty dot position to the left and to the right of each dot that prints (the space on either side of
the character counts as an empty dot position). Therefore, in a
character grid that is nine dots wide, a maximum of five dots will
print in any row.
For vertical spacing, there is no such restriction. You can print
a solid column of 24 dots if you wish.

Letter quality characters

If you select letter quality printing with the <ESC> “x” 1 command, you can design your user-defined characters on a grid which is 24 dots high by 15 dots wide. Each character can be as wide as 18 dots, including space on either side of the character. The dot columns are spaced closer together horizontally than draft style dot columns (the horizontal dot spacing is l/180-inch when printing pica width-as opposed to l/120-inch for draft characters).
60
Unlike draft characters, there are no restrictions on which dots can print. You can print a solid box of 360 (15x24) dots if you wish. This, coupled with the closer dot spacing, allows you to
design characters with higher resolution. The drawback is speed. Normal letter quality characters print more slowly than draft characters; the same is true of the user-defined character set.

Proportional mode characters

Selecting the proportional character mode yields user-defined
characters of the highest resolution. Characters can be designed on a grid which is 24 dots high by 37 dots wide. Horizontal dot spacing for proportional characters is l/360-inch-quite fine in­deed! And, like letter quality characters, there are no limits on dot placement. You can use all of the dot positions without restric­tion.

Mixing Print Styles

Each of the three user-defined character modes (draft, letter quality, and proportional) can be used in combination with most of the SQ-2000’s various print styles. For instance, italic, elite, and emphasized styles all work with user-defined characters. The characters you design will be altered to give each of these print­ing effects.
Mixing the three types of user-defined characters is not per­mitted. For example, you select the draft attribute and define
some characters. Then you select proportional printing and define some more. In this case, the first character definitions will be destroyed. Only one type of character definition may be
stored in RAM at any time.
If you define characters in one mode, then switch to another mode and select the user-defined character set, the command will be ignored and nothing will print. However, the user-defined characters definitions remain unaffected. If you switch back to the mode in which they were defined, you can then select and print them.
61

Other considerations

Keep in mind that user-defined characters are stored in RAM, which is volatile in nature. Whenever the printer power is turned off, all of the user-defined characters are lost. Likewise, initializ­ing the printer will clear the user-defined character area. Initializ­ing can be done with the <ESC> “@” command. Also, your
computer sometimes sends an initialization (INIT) signal. (Some computers do this each time BASIC is loaded.)

Defining Connecting Characters

Because character definitions include information about the width of the character, including the space around the character, you can define characters that connect horizontally. This feature has a variety of useful applications. You can create: a typeface with connecting scripts, a single extra-wide character that ex­ceeds the size limits of a single character, or graphic characters
that can be used as borders.
By defining only two characters (see Figure 5-5), three different
border patterns can be created.
10 '*** User-Defined Character: Chain Borders *** 20 ’
30 ‘Select letter quality 40 LPRINT CHR$(27) “x" CHR$(1); 50 ’ 60 ‘Define download character 70 LPRINT CHR$(27) “&” CHR$(0); 80 ’ 90 ‘beginning at "=” and ending at ">”
100 LPRINT "=>“; 110 ’ 120 ‘left margin, # of digits, right margin
130 LPRINT CHR$(O) CHR$(10) CHR$(0);
140 FOR I=1 TO 10*3
150
160
170 NEXT 180 LPRINT CHR$(0) CHR$(14) CHR$(0); 190 FOR I=1 TO 14*3
200
210
220 NEXT
READ A LPRINT CHR$(A);
READ A LPRINT CHR$(A);
62
230
,
240
'Select download 250 LPRINT CHR$(27) "%" CHR$(1); 260
' 270 'Print character 50 times
280
FOR I=1 TO 50 290
300 310
LPRINT "="; NEXT:LPRINT '
320 'Print character 50 times 330
FOR I=1 TO 50
340 350 351 352 353 360 370
LPRINT ">"; NEXT:LPRINT FOR I=1 TO 25
LPRINT "=>";
NEXT
,
'Deselect download
380 LPRINT CHR$(27) "%" CHR$(0)
390
END
400
, 410 'Small chain 420
DATA 0,162,0,1,17,0,2,40,128,4,68,64,8,130,32
430
DATA 4,68,64,2,40,128,1,17,0,0,138,0,0,68,0
440
'
450
'Large chain
460
DATA 0,162,0,1,17,0,2,40,128,4,68,64,8,130,32
470
DATA 17,1,16,34,0,136,17,1,16,8,130,32,4,68,64
480
DATA 2,40,128,1,17,0,0,138,0,0,68,0
63
Figure 5-5. Character design grid for border characters
Here’s how the program works. Line 40 selects letter quality characters; this will be the attribute of the user-defined charac­ters. The data for the first character, which replaces the “=” sign, is sent in lines 140-170. The second character (“>“) is defined in program lines 190-220.
In lines 240-353, you test the new characters by printing them
in three lines (individually and in combination). Figure 5-6 shows the printout from this program.
Figure 5-6. Three border designs
64

Characters that connect vertically

Because the SQ-2000’s vertical spacing can be changed, you
can also create characters that connect vertically.
do is change the line spacing so that there is no extra space
between
can be used to print an integral sign that is two lines high.
lines. The following program shows how this technique
All you need to
10 '*** User-defined Character; Integral Sign *** 20 '
30 'Select proportional 40 LPRINT CHR$(27) "p" CHR$(1); 50 LPRINT CHR$(27) 60 LPRINT CHR$(27); "&";
":" CHR$(O) CHR$(O) CHR$(O)
CHR$(O); 70 LPRINT "ef"; 80 LPRINT CHR$(4) CHR$(28) CHR$(5);
90 FOR I=1 TO 28*3
100 READ A
110 LPRINT CHR$(A);
120 NEXT 130 LPRINT CHR$(4) CHR$(28) CHR$(5); 140 FOR I=1 TO 28*3
150 READ A
160
LPRINT CHR$(A);
170 NEXT
180 'Print a sample 190 LPRINT CHR$(27) "3" CHR$(12); 200 LPRINT CHR$(27) "%" CHR$(1); 210 LPRINT "e"; 220 LPRINT CHR$(27) "S" CHR$(0) "1" CHR$(27) "T"; 230 LPRINT "e"; 240 LPRINT CHR$(27) "S" CHR$(0) "1" CHR$(27) "T" 250 LPRINT "
(aX+bY)"; 260 LPRINT CHR$(27) "S" CHR$(0) "2" CHR$(27) "T"; 270 LPRINT "dxdy" 280 LPRINT "f"; 290 LPRINT CHR$(27) "S" CHR$(1) "0" CHR$(27) "T"; 300 LPRINT "f"; 310 LPRINT CHR$(27) "S" CHR$(l) "0" CHR$(27) "T" 320 LPRINT CHR$(27) "@" 330 END 340 'Top half (e) 350 DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 360 DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 370 DATA 0,63,255,0,0,0,3,255,255,0,0,0,4,0,0,0,0,0 380 DATA 8,0,0,0,0,0,24,0,0,0,0,0,60,0,0,0,0,0 390 DATA 2,4,0,0,0,0,0,0,0,0,0,0,0
400 ‘Bottom half (f)
65
410 420
430
DATA DATA DATA
0,0,0,0,0,0,0,0,24,0,0,0,0,0,60,0,0,0,0,0,24 0,0,0,0,0,16,0,0,0,0,0,32,0,0,0,255,255,192
0,0,0,255,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
440 DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DATA
450
The design grid is shown in Figure 5-7.
0,0,0,0,0,0,0,0,0,0,0,0
Figure 5-7. Design grid for integral sign made of two vertically
connecting characters
Figure 5-8 shows the printout from this program.
(aX+bY)2dxdy
Figure 5-8. Integral
sign
made
of
two vertically connecting characters
66
Chapter 6
Dot Graphics
The SQ-2000 has all the dot graphics capabilities of the other
Epson printers as well as the ability to produce dot graphics
using all 24 of the nozzles in the print head. This gives the
SQ-2000 approximately three times the vertical resolution of the other printers.
This chapter covers how the SQ-2000 produces dot graphics, explains the commands used to produce the 10 different graphics densities, and briefly describes several applications of dot graphics.
If dot graphics is a new subject to you, you may want to study the chapters on dot graphics in the User’s Manual for either the Epson FX or RX series printers. These manuals, which are avail­able at your Epson dealer, provide detailed tutorials on some of the simpler applications of dot graphics. Because of the upward compatibility between the Epson printers, the example programs presented in those manuals will work equally well on the
SQ-2000 printer.

How the SQ-2000 Prints Dot Graphics

In the last chapter you learned how to address the individual
nozzles in the SQ-2000’s print head to create your own charac­ters. Now you will learn how to address the individual nozzles in the print head to print any graphics you want.
The method of addressing the nozzles in the print head for
graphics is very similar to the method used for creating user­defined characters. In fact, when you are using the 8-nozzle (also called 8-dot) graphics options, the method of nozzle addressing is much simpler.
67
When the SQ-2000 produces 8-dot graphics options, it prints
with every third nozzle.
Each byte of data received controls the nozzles for only one
vertical column of dots. This means you have to send the printer
more information when printing dot graphics, but it also means that you have full control over what each print nozzle is doing.
A byte of data contains eight binary digits, or bits. Each bit controls one of the eight nozzles used for 8-dot graphics. Figure 6-l shows how a graphics data byte controls eight print head nozzles.
Graphics data byte
Most significant
bit
Print head
dot nozzles
Least significant
bit
Figure 6-Z. Graphics data byte and print head nozzles
Creating binary bit patterns like this may be easy for compu­ters, but it’s difficult for humans. There is an easier way to create graphics data bytes. If you assign each of the print head nozzles a value, the value of a graphics data byte is the sum of the values of the nozzles that you want to print (see Figure 6-2).
68
Assigned nozzle
values
Usable
nozzles
Figure 6-2. Values assigned to the print nozzles
It is not a coincidence that the values that are assigned to the pins are powers of two. These assigned values are the decimal equivalents of the binary values of the nozzles. This means that
each combination of nozzle values produces a unique sum; there is never any doubt about which nozzles are supposed to print. Figure 6-3 shows some examples.
69
Nozzle values
128 - ¡¡
64 - ¡
32 - ¡
16 -
¡
8 - ¡
4- ¡ 2 - ¡
1 - ¡
Dots to print
Sum of nozzle values
73
226
255
Figure 6-3. Value of thegraphics data byte

Syntax of the Graphics Command

The SQ-2000 has one command that allows you to use any of
the 10 graphics options. The syntax of the command is:
<ESC>
In this command, s selects the graphics option and n1 and n2 specify the number of bytes of graphic data that follows. The available graphics options are listed in Table 6-1.
Option
Single-density Double-density High-speed, double-density Quadruple-density
QX-10 CRT screen 8
Other CRT screens Single-density
Double-density Other CRT screens 24
Triple-density
“*” s
n1 n2
data
Table 6-l. Graphics options
Nozzles
8 8 8
8 3
8
24 32 24
24
s
33 38
39
0
1
2
4 6
Horiz. density
(dots/in.)
60 120 120 240
80
90
60 120
90 180
The SQ-2000 uses the formula n1 + n2 X 256 to determine how many bytes of graphics data to expect. To determine the values of n1 and n2, given the number of dot columns of graphics data that you want to send, use the following formulas (where X is the number of columns of graphic data):
n1 = X mod 256 and n2 = X\256 (where \ represents integer division)
For example, if you wish to send 1632 columns of graphic data, n1 would be 96 and n2 would be 6 (1632 = 96 + 6 X 256).
When you are using the 24-dot graphics options you must
send three bytes of data for each dot column. Therefore, you refer to dot columns instead of bytes of graphics data when calculating nl and n2. (We will explain later how these three bytes are inter­preted.)
The SQ-2000 will interpret the number of bytes determined 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 graphic
data, or the SQ-2000 will stop and wait for more data, and will
seem to be locked up. If, on the other hand, you supply too much
graphics data, the excess will be interpreted and printed as regu-
lar text.

Using Hand-Calculated Data to Print Graphics

With what you know now, you can use the simplest applica­tion of graphics-using hand-calculated data to print graphic images. While this method is the most tedious of those that we will explore, it is useful for small graphic elements that are used many times. Also, it helps you to develop your understanding of dot graphics.
The first step is to figure out which dots you want to print. Start by sketching your design on a piece of graph paper as shown in Figure 6-4. The design in the illustration is only eight
dots high for simplicity, but it could also use multiple print lines.
71
Figure 6-4. Design sketch and sum of nozzle values
Write the assigned values of the nozzles next to your design and then total the values for each column of dots. These totals are the values that will be sent to the printer as graphics data to print the design.
To print the example design using the normal density option,
the complete command (including the graphics data) would be:
Command
<ESC> "*" 0 14 0
3 7 31 63 126 124 112 96 92 66 33 25 5 3
Data
And the results would look like this:
Here is a short BASIC program that will print this figure: 10 LPRINT CHR$(27) “*” CHR$(0) CHR$(14) CHR$(0);
20 FOR X=1 TO 14 30
READ N
40
LPRINT CHR$(N); 50 NEXT X 60 DATA 3,7,31,63,126,124,112 70 DATA 96,92,66,33,25,5,3

Printing Multiple Lines of 8-Dot Graphics

You could enlarge this design in order to print multiple lines of 8-dot graphics. In the next example, you are going to print three lines of 8-dot graphics. At the same time, you will triple the width to 42 columns.
72
To break the previous design (Figure 6-4) into three lines of 8-dot graphics, triple the number of dots in each column and break the design into what will look like three lines of 8 bits each.
For example: the first column of two dots will now be a column of six dots; the second column of three dots will now be a column of nine dots, etc.
Next, triple each column for a total of 42 columns. For example,
column 1 from the previous design will become columns 1,2, and 3; column 2 from the previous design will become columns 4,5, and 6, etc.
In mapping out your new design, leave some space between
each of the three (8-bit) lines to total the values of each column.
When you are finished, your drawing should look like Figure 6-5.
Figure 6-5. Data layout for multiple lines
of
8-dot graphics
73
Now total the values for each column of dots. These totals are the values that are sent to the printer as graphics data for the print design. And here is a new BASIC program to print the design.
10 ‘*** Prints Graphics/Single-Density Mode ***
20
30 ‘Set line spacing 24/180
40 LPRINT CHR$(27) “3” CHR$(24); ‘Set line spacing 24/180
50 FOR I=1 TO 3
60 70
‘Select bit image mode 80 LPRINT CHR$(27) “*” CHR$(0) CHR$(42) CHR$(0); 90 FOR X=1 TO 42 100
READ N 110 LPRINT CHR$(N); 120 NEXT X 130
LPRINT
140 NEXT I 150 ’ 160 ‘Reset line spacing to l/6-inch
170 LPRINT CHR$(27) “2”; 180 ’ 190 ‘Data to print first line
200 DATA 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 31, 31 210 DATA 31,31,31,31,31,31,31,31,31,31,28,28,28,28
220 DATA 28,28,3,3,3,0,0,0,0,0,0,0,0,0
230 ’ 240
‘Data to print second line
250 DATA 0, 0, 0, 1, 1, 1, 127, 127, 127, 255, 255, 255, 255, 260 DATA 255,255,255,255,240,240,240,128,128,128,127,127~127,0
270 DATA 0,0,128,128,128,126,126,1,1,1,0,0,0
280 ’
290 ‘Data to print third line
300 DATA 63J63J63J255J255J255J255J255J255J255J255J255J248J248
310 DATA 248,192,192,192,O,0,0,O,O,O,192,192,192,56
320 DATA 56,56,7,7,7,7,7,7,199,199,199,63,63,63
Here’s how the program works. First, set the line spacing to accommodate your new design. You will want the design to print without leaving any 40 uses the command
spacing. In this case, n = 24. When the line feed occurs, the paper will be advanced 24/180-inch.
74
spaces between each line
<ESC> “3” n
to select
of graphics. Line
n/180-inch line
Lines 50 and 140 set a FOR-NEXT loop which will include selecting the graphics option and printing the graphics data for each of the three (8-bit) lines. Line 80 assigns the graphics option each time one of the three lines is printed. ASCII 0 assigns S-dot, single-density printing while ASCII decimal 42 tells the printer the design will have 42 columns of data.
Lines 90-120 READ and LPRINT the 42 columns of data for each line. The LPRINT statement in line 130 causes a line feed and carriage return to occur after each line is printed. Line 170 resets the line spacing to l/6-inch (the power-on default setting).
The data in lines 200-220 correspond to the dot positions for each of the 42 columns in the first printed line of the design. Lines 250-270 are for the dot positions of the second printed line. Lines 300-320 are for the third printed line.
Run the program. Your graphics design should now look like this:
Did you have any trouble? If you did, check your commands and be sure your data statements contain the values exactly as they are shown in the program listing.

Using the 24-Dot Graphics Options

Up until now you have looked at the SQ-2000’s print head as
an B-dot graphics device. In reality, the SQ-2000 has 24 nozzles in its print head, and they are all available to you when using the 24-dot graphics options.
The 24 nozzles are mapped as three 8-bit bytes stacked verti-
cally (as shown in Figure 6-6). This means that for each nozzle column of 24-dot graphics (as specified by n1 and n2) you must send three bytes of graphics data.
75
Graphics data bytes
First byte
Print head
MSB = Most significant bit LSB = Least significant bit
Second byte Third byte
Figure 6-6. Map of 24-dot graphics
Figure 6-7 shows the design used for B-dot graphics now adapted for 24-dot graphics. In this adaptation, each dot printed using the B-dot option will be printed as a square of nine dots when using the 24-dot option.
76
Figure 6-7. Data layout for 24-dot graphics
Here is the BASIC program adapted for 24-dot graphics.
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,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,2
55,224,31,255,192
110 DATA 31,255,0,31,252,0,31,240,0,31,224,0,31,1283,0,31,2
40,0
120 DATA 31,255,192,28,255,224,28,127,240,28,15,248,30,O,
252,31,0,126
130 DATA 15,128,15,7,192,7,3,24O,7,l,254,7,O,255,7,O,l27,l
35
140 DATA O,31,199,O,7,231,0,1,247,O,O,255,O,0,127,O,O,63
In this program, line 20 assigns the graphics option (24-dot triple-density) with ASCII decimal 39. ASCII decimal 42 sets the number of nozzle columns at 42. Lines SO-140 contain 126 bytes of data (42 nozzle columnsX3 bytes for each nozzle column). Lines 30-60 contain the subroutine to print the design.
The resulting design will be approximately the same size as the original line design, but the dots will be printed much closer together. And this is how the new design looks:
The shape is just about the same, but the density is much
greater. This design requires 126 bytes of graphics data instead of the 14 bytes that were required using the B-dot graphics option.
Notice that the dots overlap quite a bit. This design was
printed using the triple-density 24-dot graphics option because the density is the same (180 dots to the inch) in both directions.
Therefore, when you turned each dot of B-dot graphics into nine
dots of 24-dot graphics, approximately the same.
the shape of the design remained
77
Figure 6-8 shows the design modified to take advantage of the higher resolution of 24-dot graphics. Notice that the curves are smoother and the edges are less ragged. This illustrates the major advantage of 24-dot graphics. The vertical resolution is approx­imately three times that of B-dot graphics which means you can produce better-looking graphics.
Figure 6-8. Eight-dot (top) and 24-dot (bottom) versions of the density

Using the SQ-2000 as a Plotter

One of the best applications of the SQ-2000 graphics capabili­ties is to print graphics images. Graphics images can range from business bar charts to computer-created art.
Since the SQ-2000 can’t move the paper in both directions, it
can’t plot a curve continuously like a pen plotter does. To print a complete graphics image on the SQ-2000 the entire image must be assembled in the computer’s memory and, when complete, sent to the printer one line at a time. (Of course, if the image can be created from the top down, it can be printed as it is created.)
In many cases, the part of the computer’s memory that stores
the image while it is being assembled is the same part of the computer’s memory that produces the display on the screen. In other words, the image is created on the screen of the computer and then a screen dump is done to print the screen image on the printer. This method is typical of many business graphics
program.
However, the SQ-2000 can print graphics with much higher resolution than that of a computer screen. This means that using the screen to create an image and then using the screen dump to print it out actually limits the quality of your graphics.
Here is a short BASIC program that sets up a buffer in the computer’s memory, creates a simple graphic image, and then prints it on the SQ-2000 (see Figure 6-9).
78
100 ' *** SQ-2000 Plotter Program: 5-Point Star ***
110 '
' Initialize
120
130 ' 140 DIM BUFFER%(360,45) 150 FOR BIT = 0 TO 7 : DOT%(7 - BIT) = 2 160 X.SCALE = 20 170 X.FACTOR = 360 / X.SCALE
: Y.SCALE = 20
: Y.FACTOR = 360 /
A
BIT : NEXT
Y.SCALE
=
180 ESC$ = CHR$(27)
: LF$
CHR$(lO)
190 ' 200 ' Plot curve 210 ' 220 RADIUS1 = 10
230 Xl = 20 240 DIFF =
250
FOR ANGLE = 0 TO 6.3 STEP .15
260 X2 =
: Yl = 10
(RADIUS1 - RADIUS2)
DIFF * COS(ANGLE) + RADIUS2 * COS(DIFF /
: RADIUS2 = 2
RADIUS2 * ANGLE) + 10
270 Y2
= DIFF X SIN(ANGL) - RADIUS2 * SIN(DIFF / R ADIUS2 * ANGL) + 10 280 '
290
' Draw a line from X1, Y1 to
X2,
Y2 300 ' 310 X.LENGTH = X2 - X1 320 X.STEPS
= ABS(X.LENGTH * X.FACTOR)
: Y.LENGTH = Y2 - Y1
330 Y.STEPS = ABS(Y.LENGTH * Y.FACTOR) 340 IF X.STEPS > Y.STEPS THEN STEPS = X.STEPS ELSE
STEPS = Y.STEPS
350 IF STEPS = 0 THEN 480
360 DELTA.X = X.LENGTH / STEPS
: DELTA-Y = Y.
LENGTH / STEPS
370
380
FOR COUNT = 0 TO STEPS X1 = X1 + DELTA.X * Y1 = Y1 + DELTA.Y
390 '
400 ' plot a point at Xl, Y1
410 '
420 X.POINT = X1 * X.FACTOR
: Y.POINT = Y1
* Y.FACTOR 430 COLUMN = INT(X.POINT) 440 ROW = INT(Y.POINT / 8) 450 BIT = INT(Y.POINT - ROW * 8)
79
460 BUFFER% (COLUMN, ROW)
= BUFFER% (COLUMN, ROW)
OR DOT% (I)
470
NEXT COUNT
480
NEXT ANGLE
490
' 500 ' Print curve 510
' 520 OPEN "LPT:1" AS #1 : WIDTH #1,255 530 PRINT #1, ESC$ "3" CHR$(24); 540 550 560 570 580
FOR PRINT.LINE = 0 TO 44
STEP
PRINT #1, ESC$ "*" CHR$(39) CHR$(104) CHR$(1);
FOR COLUMN = 0 TO 359
FOR BYTE = 0 TO 2
PRINT #1, CHR$ (BUFFER% (COLUMN, PRINT.LINE
3
+ BYTE)); 590 600 610 620
NEXT BYTE
NEXT COLUMN PRINT #1, LF$ NEXT PRINT.LINE
630 PRINT #1, ESC$ "2";
640
CLOSE #1 : END
80
Figure 6-9. Figure produced by plotting program
The program explained here is an overly simplified plotting
program. It is not efficient in its use of memory, nor is it very fast. In fact, the BASIC language itself is not very suitable for graphics programs of a very large scale. BASIC is just not fast enough to handle the massive amounts of data required for graphics. But
despite its drawbacks, this program contains all the elements
required, and BASIC does provide an almost universally under-
stood format for communicating them.
First, this program allocates a section of memory to contain the graphic image that will be created. In line 140 the DIM statement defines the integer array BUFFER%( ). You will use each element of this array to store one byte of graphics data. Each element of an integer array can actually hold two bytes of graphics data, but doing so would complicate the program. Therefore, we just have to accept the inefficiency.
The figure that this program prints fits in an area two inches
square, and the BUFFER%( )
You can see that there is a lot of graphics data involved (even
considering the inefficiency).
Line 150 creates a vector array of the powers of two. These are the values that are assigned to the nozzles in the print head. They are used in creating the image in memory.
array uses about 32K of memory.
Line 160 sets the coordinate scale of the graphics image. Set-
ting both scale factors to 20 creates a grid 20 units on a side. Line 170 calculates the relationship between the coordinate grid and the actual dots to be printed. This program uses the 24-dot triple­density option, so the two-inch square has 360 dots in each direc­tion.
Line 180 assigns mnemonic variables for use in the printing
routine.
Lines 220-270 calculate the curve to be plotted. The curve that the sample program plots is a hypocycloid. This is the shape generated by the path of a point on a circle that is rolling around the inside of another circle. Line 220 assigns the radii of the fixed and rolling circles, respectively. Line 230 assigns the starting point of the curve (you will see why this is necessary in a mo-
ment). Line 240 calculates a constant that is used in the calcula­tions.
81
Loading...