Star Micronics NP-IO User Manual
Star Micronics NP-IO User Manual

Star Micronics NP-IO User Manual

Star micronics printer user's manual

Advertisement

Quick Links

NP-IO
USER'S MANUAL
NOT INTENDED
FOR SALE
[ PN 80820191]

Advertisement

Table of Contents
loading

Summary of Contents for Star Micronics NP-IO

  • Page 1 NP-IO USER’S MANUAL NOT INTENDED FOR SALE [ PN 80820191]...
  • Page 2 However, should any errors be detected, STAR would be eatly appreciate being informed of them. he above notwithstanding, this manual. @Kopyright 1986 Star Micronics Co., Ltd. uency Interference tatement instructions, may cause in- The user may find the following booklet, prepared by Standard, this equipment requires a U.S.A.
  • Page 3 Table of Contents Setting Up Your Printer Chapter 1 Locating the printer Check the carton contents Removing the printer cover Removing the packing tube Installing the ribbon cartridge Getting to Know Your Printer Chapter 2 Controls and parts of the printer Parts of the printer Controls and indicators Extra functions...
  • Page 4: Special Features Of The Printer

    Formatting Chapter Lines and line spacing Starting a new line Reverse line feeds Changing the line spacing Moving down the page without a carriage re- turn Page control Form feed Reverse form feed Changing the page length Top and bottom margins Setting left and right margins Horizontal and vertical tabs Horizontal tabs...
  • Page 5: Caring For Your Printer

    Download Characters and Dot Chapter 6 Graphics Dot matrix printing Designing your own characters Defining proportional Designing your own NLQ characters User-designed Higher resolution graphics More graphics programming Redefining g-pin graphics mode Caring for Your Printer Chapter 7 Cleaning the printer Replacing the ribbon Replacing the print head Appendix A...
  • Page 6 Appendix Technical Appendix The Parallel Functions Index Specifications Interface of the Connector Signals...
  • Page 7: Locating The Printer

    CHAPTER SETTING UP YOUR PRINTER Subjects covered in Chapter 1 include- . Choosing a suitable place for your printer Unpacking Setting up LOCATING THE PRINTER Give some thought to the best place to put the printer. Both the printer and computer roundings.
  • Page 8 igure l- 1. Check to make sure you have all tour items: 2) Paper separator, 3) Ribbon cartridge, and 4) User’s manual. Removing the printer cover The printer’s cover is important dust and dirt away from the printer’s delicate mechanism, absorbs nearly all of the printer’s operating off the cover unless you have to change the ribbon or make an adjustment.
  • Page 9 Figure 1-2. Remove the printer cover by lifting carefully. W Removing the packing tube Figure 1-3. Remove the protective tube from the carriage rail.
  • Page 10 The printer is shipped with a protective the print head from being damaged during shipping. This tube must be removed before use. First, take off the printer cover. The protective tube is split along its bottom side to allow easy removal.
  • Page 11 Print ‘.igure l-5. .l’o thread the ribbon, slide the print head carriage manually to the right or left, and the ribbon will slip down by itself into its proper position. With the ribbon facing away from you, use the guide holders as a fulcrum, down until the two holder springs snap shut to hold the...
  • Page 12 MEMO...
  • Page 13: Controls And Parts Of The Printer

    CHAPTER GETTING TO KNOW YOUR PRINTER Subjects covered in Chapter 2 include- * Parts of the printer - what they’re for and how to use them Paper selection and loading Adjustment Testing printer operation CONTROLS AND PARTS OF THE PRINTER Parts of the printer PRINTER COVER - This protects the ribbon and the print head from dust and dirt, and cuts down the sound of the printer.
  • Page 14 Front and rear views of Figure 2- 1. H Controls and indicators Now let’s go over the controls and indicators starting with the control panel on the right. There are three in- dicators and three keys on the control panel. Pow\er cord prmter.
  • Page 15 Figure 2-2. The control panel. POWER INDICATOR - Glows orange when the power is on. This indicator flickers when the printer runs out of paper and when certain printer malfunctions NLQ KEY and INDICATOR - Changes the character style (draft or NLQ) when the On Line indicator green when the NLQ mode is selected.
  • Page 16 We’ll explain about the “Panel” mode, which is powerful func- tion of the printer. Some commercial defining your own selections. mode. Selection of the Panel Mode at power-on ensures that your choices remain in effect until you turn the power off. This means that the printer will ignore any codes sent by the soft- ware that you are using.
  • Page 17: Release Lever

    3. When you can set the print start position, Paper Feed key or the NLQ key first, then release the On Line key. n Other controls There are other controls, not connected Some of the more important POWER SWITCH - The switch that turns the printer on and off is at the back, on the left side.
  • Page 18 The top setting is used when you want to load paper in the printer. The second setting is for normal single sheets. The third is for sprocket-feed 4lU - The bottom one is used when you want to release the paper completely Release lever 2-5.
  • Page 19 Figure 2-6. Move the sprockets on the tracktor feed unit all the way to the ends. 2. Install the printer cover on the printer. 3. Set the release lever for single sheets - the second posi- tion from the top. 4.
  • Page 20 Release lever ‘igure You can insert a sheet of paper automatically 2-7. the release lever. n Loading sprocket-feed This is standard computer sides and perforations sprocket, punched, fan-fold, or just plain “computer can be as narrow as 4.5 inches, and up to 10 inches wide. 1.
  • Page 21 Figure 2-8. Open the sprocket covers to expose the sprocket teeth. 8. Check that the paper is still positioned close the sprocket covers. 9. Set the release lever to the auto-feed setting. The printer will advance the paper automatically. 10. When the paper stops, set the release lever for sprocket- feed paper again.
  • Page 22: Adjusting The Printhead

    ADJUSTING THE PRINT HEAD The distance between the print head and the platen must be adjusted to accommodate make this adjustment, under the printer cover and immediately lever (Figure 2-10). Pulling the adjustment will widen the gap; pushing it away from you will narrow the gap.
  • Page 23 version, and self-test 2 is the short one. You can use either one to show the characters stallation of the ribbon and paper, and to check the adjustment of the head-to-platen gap. You can print the self-test without hooking up the printer to your computer.
  • Page 24 CONNECTING THE PRINTER Now that you’ve assembled and tested your printer, all that re- mains is to connect it to your computer Interface Figure 2-12. Connect 1. Make sure that both your computer turned off. 2. Connect the printer end of the interface cable to the con- nector socket at the right rear of the printer as shown in Figure 2-12.
  • Page 25 CHAPTER PRINTING WITH BASIC Subjects covered in Chapter 3 include- . Listing BASIC programs on the printer How a program prints things Control codes, escape codes, and command syn- Near letter quality (NLQ) characters Fixed and proportional character spacing Special printing- Printing in italics Underlining Superscripts and subscripts...
  • Page 26 SOME BASICS OF BASIC n First steps The first things that a beginner learns to do are to list a pro- gram and to print a character easiest operations one can do, but even they may depend on what computer you have.
  • Page 27 n ASCII codes and the CHR$ function You can talk to your computer and your printer talk to each other in what are known as ASCII codes. In the ASCII code, each number from 0 to 255 has a par- ticular meaning - 36, for example, dollar sign.
  • Page 28 - the “control” key and one other. The other key determines what code is sent - pressing sends ASCII code 1, CTRL B sends ASCII code 2, and so on. Your printer has a lot of control codes to let you do some useful things.
  • Page 29 n The escape codes Back when the ASCII system was set up, computer ment was relatively simple and thirty-three considered sufficient at the time. The American Standards peo- ple realized that eventually ed, so they included the escape (ESC) code to allow almost any number of additional codes to be defined when they became...
  • Page 30: Some Special Kinds Of Text

    So for our example above, any of these BASIC statements have the same result: LPRINT CHR$(27);CHR$(87);CHR$(l) LPRINT CHR$(27>;CHR$(87);CHR$(49) LPRINT CHRS(27) ;"W";CHR$(l) LPRINT CHR$(27);"W";CHR$(49) LPRINT CHR$(27);"Wl" Even though there are many commands of ASCII code 0 (the (NUL) character), the number “0” (zero or ASCII code 48) cannot be substituted.
  • Page 31: Near Letter Quality

    In this program, line 20 selects NLQ characters “x” 1 command. Line 30 prints a sample before line 40 switches printer back to draft printing with an (ESC) “x” 0. When you run the program you should get this: Now turn off the power switch. After you turn on the power switch while holding the NLQ key down on the control panel, set the NLQ mode with the NLQ key while in the Off Line mode.
  • Page 32 Function Italic ON Italic OFF Use this program to see italic characters: 10 ’ Demo of italic 20 LPRINT CHR$(27);"4"; 30 LPRINT “This line 43 LPRINT CHR$(27);"5"; 50 LPRINT "This line is in ROMAN characters." In this program, line 20 turns italic on with (ESC) “4”, and line 40 turns italic off with (ESC) “5”.
  • Page 33 It should come out like this: In this program underline “ - ” 1, and then off in line 40 with (ESC) “ -” 0. There’s a new aspect to this program, though. The semicolons at the end of the first three lines told BASIC that those lines were to be con- tinued.
  • Page 34 90 LPRINT CHR$(27);"T"; 100 LPRINT "on one line." Here line 30 turns on superscripts turned off in line 50 with (ESC) “T”. Then between printing text, subscripts are turned on in line 70 with (ESC) “S” 1, and finally off in line 90. Again, everything because of the semicolons.
  • Page 35 When you run this program you should get this: This line is ELITE pitch. "I'h:j.5 I. ii-162 is F':CCA pitch Line 20 turns on elite pitch with (ESC) “M”. Line 30 prints the line at 12 characters resets the printer to pica pitch and line 50 prints the line in pica pitch.
  • Page 36 Sometimes you may wish to stay in expanded than one line. Change your program to this: 10 ' Demo of permanent expanded mode 20 LPRINT CHR$(27);"Wl"; 30 LPRINT "Permanent expanded" 40 LPRINT "mode stays on until" 50 LPRINT "it is "; 60 LPRINT CHR$(27);"WO";...
  • Page 37 D (<<$ IT) (1;) 1-1 5; .k, r <>, ‘b, i [::j r) Condensed off with CHR$(18). Note that you don’t need to put an (ESC) in front of the CHR$(15), although the same. Function Condensed ON Condensed OFF By combining two pitches, available.
  • Page 38 220 LPRINT "This is EXPANDED PICA." 230 LPRINT CHR$(27);"WO" 240 END Here’s what you should get from this program: This line is CONDENSED ELITE pitch. This line is CONDENSED PICA pitch. n Proportional printing Have you ever looked closely at the printing magazines? Doesn’t it look nice? The main reason is that each character is given an amount of space proportional width.
  • Page 39 40 LPRINT CHR$(27);"pl"; 50 LPRINT "This line is PROPORTIONAL ELITE." 60 LPRINT CHR$(27);"P"; 70 LPRINT "This line is PROPORTIONAL PICA." 80 LPRINT CHR$(27);"pO"; 90 LPRINT "This line is NORMAL PICA printing." 100 END When you run this program you should get this: Line 20 selects the elite pitch and line 40 turns on the propor- tional printing with (ESC) “p”...
  • Page 40 Print emphasis Function Boldface ON Boldface OFF Emphasized ON Emphasized OFF Try them now with this little program: 10 ' Demo of boldface 20 LPRINT CHR$(27);"G"; 30 LPRINT "This line is BOLDFACE printing." 40 LPRINT CHR$(27);"E"; 50 LPRINT "This line is BOLDFACE and EMPHASIZED." 60 LPRINT CHR$(27);"H";...
  • Page 41: Mixing Print Modes

    MIXING PRINT MODES We have learned how to use the various print modes in- dividually and together. more efficiently. You have at your disposal a unique command choose any valid combination the Master Print mode command. (ESC) “!” n Here, the value of n defines the print style to be selected. The value of n can range from 0 to 255, which is the range of values that can be stored in one eight-bit byte.
  • Page 42 The command would look like this: CHR$(27);“!“;CHR$(49) To better understand that each mode except pica (pica is the default) has a separate switch that can turned on and off via software. Once the switch is on, it stays on until turned off. However, that conflict are turned on at the same time, the printer must choose which one to use.
  • Page 43: Formatting Text

    CHAPTER 4 FORMATTING TEXT Subjects covered in Chapter 4 include- * The carriage return and line feed The amount of space between lines Moving to the next page The number of lines on a printed page Horizontal and vertical tabs Setting margins - left, right, top and bottom Centering and aligning Chapter...
  • Page 44 return. Each time the printer receives a CHR$(13) it returns the print head to the left margin. It does not advance the paper (if DIP switch l-3 is on; see below). Line feed is more complicated. a CHR$(lO) it both advances the paper one line and returns the print head to the left margin, ready to start a new line.
  • Page 45 H Changing the line spacing When you turn your printer on, the line spacing is set to 6 lines per inch. This is fine for most printing applications, when you want something different, the printer makes it easy to set the line spacing to whatever you want. Try this program to see how easy it is to change the line spac- ing: 10 ' Demo of line spacing...
  • Page 46 Line 40 changes the line spacing. The command CHR$(n) changes the line spacing to n/72 of an inch. The loop that is started in line 20 increases the value of n (the variable I in this program) each time it is executed. creases as the program loop when I = 13, since BASIC won’t let us send CHR$(13) without adding an unwanted...
  • Page 47: Control Code

    The program works just the same as before, but the line spac- ings are just one-third what they were. This is because (ESC) “3” CHR$(n) sets the line spacing to n/216 inch. Table 4-2 shows all the line spacing commands, several “shortcut”...
  • Page 48 30 LPRINT "LINE NUMBER 2."; 40 ' One-time line feed 50 LPRINT CHR$(27);"J";CHR$(lOO); 60 LPRINT "LINE NUMBER 3." 70 LPRINT "LINE NUMBER 4." 80 END Here is what your printer will produce: The (ESC) “J” CHR$(lOO) in line 50 changes the spacing to 100/216 inches for one line only without moving the printhead.
  • Page 49 PAGE CONTROL Now that we have seen how to control line spacing, we can go on to page control - positioning the printing on the page and ad- justing the paper length. H Form feed The simplest forms control code is the form feed. Form feed (or (FF)) is CHR$(l%) and causes the printer to move the paper to the top of the next sheet.
  • Page 50 n Reverse form feed Just your printer reverse form This code head is at the used, example, to mat; print first column, top of page to form is easy remember: Form feed commands Function Advance paper to top of next page CHR$(12) n Changing the page length You may have some computer high.
  • Page 51 should print “PAY TO THE ORDER OF:” This program twice, and they should be 7 inches apart. Line 20 sets the form length to 7 inches. After line 30 prints, line 40 sends a form feed advance the paper to the top of the next form. Line 50 then prints its message.
  • Page 52 the printer how many blank lines should be left at the bottom of the page. Let’s try a simple application to see how these margins work. Enter this program, which will print 150 lines without top and bottom margins. 10 ' Demo of top and bottom margins 60 LPRINT CHR$(12);...
  • Page 53 ” ___---- ----------...
  • Page 54: Setting Left And Right Margins

    SETTING LEFT AND RIGHT MARGINS The left and right margins typewriter once they are set all printing them. You can set margins mands to set the margins are given in the following table: Left and right margin Try setting the margins with this program: 10 ' Demo of margins 20 GOSUB 70 30 LPRINT CHR$(27);"1";CHR$(lO);...
  • Page 55: Horizontal And Vertical Tabs

    When you want to reset the margins to the default values, you have two choices. You can either turn the printer off and back on, or you can set margin values equal to the default values. This means that you should set a left margin of 0 and right margin of 80 in pica pitch.
  • Page 56 Even though the words are different length, they are spaced out evenly by the horizontal tabs. Now add the following line to your program to set different horizontal tabs: LPRINT CHR$(27>;"D";CHR$(7);CHRS(14);CHRS(21); (ESC) is the must be by characters you want tabs set.
  • Page 57 W One-time horizontal tabs Suppose you need to move to a position across the page, but you only need to do it once. It doesn’t make much sense to set up a tab to use only one time. There is an easier way. The solution is called a one-time tab.
  • Page 58 The relative horizontal tab command can move the print head right from the current position with NLQ characters. mula for calculating how much the print head moves is the same as in the absolute horizontal tab command. Try this program to see how this works. 10 ' Demo of relative horizontal tabs 20 LPRINT CHR$(27);"xl";...
  • Page 59 up tabs, the command advances the paper only one line. Enter this program to see how this works. 10 ' Demo of vertical 40 LPRINT CHR$(ll);"FIRST 50 LPRINT CHR$(ll);"SECOND 60 LPRINT CHR$(ll);"THIRD 70 LPRINT CHR$(ll);"FOURTH Now, let’s set some vertical tabs of our own. Add these lines to the program: 20 LPRINT CHR$(27);"B";CHR$(lO);CHR$(l5);...
  • Page 60 in ascending order. Our example sets vertical tabs at lines 10, 15,25 and 30. Then the CHR$(ll) advances the paper to the next vertical tab. Add one more line to the program to demonstrate feature of vertical tabs. 80 LPRINT CHR$(ll);"FIFTH TAB." Now when you run the program the first page looks just like before, but line 80 sends one more (VT) than there are tabs.
  • Page 61 Vertical tab commands Function Advance paper to next tab position CHR$(ll) Set vertical tabs at nl, n2, etc. Set vertical tabs every n lines One-time vertical tab n Vertical tab channels Vertical tab channels are especially hefpful in two situations. The first occurs when you are writing a program to accompany a preprinted form that can accommodate...
  • Page 62 20 LPRINT CHR$(27);"b";CHR$(l);CHR$(lO);CHR$(20); ems (0) ; 30 LPRINT CHR$(27);"b";CHR$(2);CHR$(15);CHR$(25); CHR$ (0) ; 40 LPRINT CHR$(27);"b";CHR$(3);CHR$(17);CHR$(28); CHR$ (0) ; 50 ' Use vertical tab channels 60 FOR I=1 TO 3 70 LPRINT "TOP OF FORM" 80 LPRINT CHRS(27) ;"/";CHR$(I); 90 LPRINT CHR$(ll); 100 LPRINT "1ST TAB OF CHANNEL";I 110 LPRINT CHR$(ll);...
  • Page 63 In this program we set tabs at 10 and 20 in channel 1 in line 20. In line 30 we set tabs 15 and 25 in channel 2, and in line 40 we set tabs 17 and 28 in channel 3. Because the channels are stored, you must make the printer to recall one before you use it, so we used (ESC) “/”...
  • Page 64 MEMO...
  • Page 65 CHAPTER SPECIAL FEATURES THE PRINTER Subjects covered in Chapter 5 include- . Printer’s bell Master reset Uni-directional printing International character sets Printing BIG characters The optional sheet feeder Macro instruction Reading a hex dump In the previous chapters groups of control codes. In this chapter we will look at more con- trol codes.
  • Page 66: Taking The Printer Off Line

    The code to sound the “bell” is CHR$(7), which is ASCII code 7 or (BEL). Any time your printer receives this code it will sound the bell for a quarter of a second. This can be used to re- mind the operator to change the paper or to make other ad- justments to the printer.
  • Page 67 ning out of continuous Your printer has the ability to print right to the bottom of the sheet. You can disable the paper-out detector so that it doesn’t stop the printer. This will allow you to print to the end of the sheet, and even beyond if you are not careful.
  • Page 68 10 LPRINT "BACKSPACE DOES NOT"; 20 LPRINT CHR$(8);CHR$(8);CHR$@); 30 LPRINT 'I=== WORK." 40 LPRINT "DELETE DOES NOT"; 50 LPRINT CHR$(127>;CHR$(127);CHR$(l27); 60 LPRINT "WORK." 70 LPRINT "CANCEL LINE"; 80 LPRINT CHR$(24); 90 LPRINT "DOES NOT WORK." Here is what this program will print: The backspace codes in line 20 move the print head a total of three spaces to the left so that the first part of line 30 will over- print the word “NOT”.
  • Page 69 But it will also print more slowly at the speed of your typing. In the immediate-print mode, the print head prints one character at a time, as you send it. The printer also moves the paper up so that you can see the current line and then down to continue print- ing.
  • Page 70 30 FOR I=10 TO 1 STEP -2 40 LPRINT CHRS(27);" ";CHR$(I); 50 LPRINT "This line is added";I;"spaces." NEXT I 70 LPRINT CHRS(27);" ";CHR$(O); 80 LPRINT "This line is Normal space." 90 END This line line This line This line This This line added...
  • Page 71 30 FOR I=1 TO 10 40 LPRINT "I" 50 NEXT I 60 LPRINT : LPRINT 70 LPRINT CHR$(27);"Ul"; 80 FOR I=1 TO 10 90 LPRINT "I" 100 NEXT I 110 LPRINT CHR$(12);CHR$(27);"@" Here is what you will get. The top line is printed bi-directional- ly, and the bottom is printed uni-directionally.
  • Page 72 H The seven bit dilemma Some computers capability to send eight bits on their parallel interface, but can only send seven bits. This would make it impossible computers to use this printer’s block graphics special symbols if our engineers (All of these characters which means that the eighth bit must be on to use them.) The solution lies in the three control codes given in the following table:...
  • Page 73 10 LPRINT CHR$(27);"0"; 20 LPRINT CHR$(27);"6"; 30 FOR J=3 TO 6 40 LPRINT w 50 NEXT J 60 LPRINT ' 70 LPRINT 80 LPRINT ' 21 ";CHR$(21);CHR$(9); 90 LPRINT ' 26 "; 100 LPRINT CHR$(26) 120 LPRINT 130 FOR J=128 TO 254 STEP 5 140 FOR I=J TO J+4 150 IF I>254 THEN 170 160 LPRINT I;CHR$(I);CHR$(9);...
  • Page 75 So how are all of these strange short program that demonstrate can be combined to create a figure: the 5 of clubs. 10 LPRINT CHR$(27);"6"; 20 LPRINT CHR$(218);CHR$(196);CHR$(l96); CHR$(196>;CHR$(196);CHRs(196);CHR$(191) 30 LPRINT CHR$(l79);CHR$(53);CH.R$(32);CHR$(32); CHR$(32);CHR$(32);CHR$(179) 40 LPRINT CHR$(l79);CJJR$(32);CHR$(5);CHR$(32); CHR$(5);CHR$(32);CHR$(179) 50 LPRINT CHR$(l?S);CHR$(32);CHR$(32);CHR$(5); CHR$(32);CHR$(32);CHR$(179) 60 LPRINT CHR$(l79);CHR$(32);CHR$(5);CHR$(32);...
  • Page 76 W International character Your printer changes languages that are different in the different characters are called international character sets - and there are 11 sets in all. The control codes to select the international character sets are given in Table 5-4. International character set commands The characters that change are shown beneath...
  • Page 77 Printing characters When you refer the Appendix C, you’ll find many characters are printed in the control code area. (Remember order control codes are the ASCII codes 0 through 31 plus 127, and the high-order control codes are 128 through 159 plus 255.) These codes don’t normally print characters they cause the printer to change modes.
  • Page 78 40 LPRINT CHR$(I); 50 NEXT I 60 LPRINT c~~$(16);CHR$(l7); 70 FOR I=21 TO 31 80 LPRINT CHR$(I); 90 NEXT I 100 LPRINT 110 FOR I=128 TO 134 120 LPRINT CHR$(I); 130 NEXT I 140 LPRINT CHR$(144);CHR$(l45); 150 FOR I=149 TO 159 160 LPRINT CHR$(I);...
  • Page 79 Big character commands Function Double-high enlarged print Quad-high enlarged print Double-high lower-half enlarged nrint ---- Double-high upper-half enlarged print Quad-high lower-half enlarged mint Quad-high upper-half enlarged mint ---- Cancel enlarged print Try this program to see the big characters. 10 ’ Demo of BIG characters 20 FOR I=1 TO 6 30 LPRINT "THIS IS ";...
  • Page 80 As you can see, when the big character command is used, the baseline for each character the baseline, try this program: 10 ’ Demo of aligning 20 LPRINT "THIS IS rr; 30 LPRINT CHR$(27);"j";CHR$(21); 40 LPRINT CBR$(27);"h";CHR$(l); 50 LPRINT "DOUBLE"; 60 LPRINT CHR$(27);"h";CHR$(O);...
  • Page 81 Here is how the printer’s macro works. You define telling the printer what normal control codes are to be included in the macro. Then you can use the macro any time that you want and the printer will do all the things that you included in the macro definition.
  • Page 82 Now that you have defined a macro, let’s see how to use it. This program will print one line using several printing features. Then it “calls” the macro in line 60. When line 80 prints the style is “plain vanilla” because the macro has reset it. 10 LPRINT CHR$(27);"Q";CHR$(40);...
  • Page 83 Most BASICS, however, are not quite that straight forward. For example, the IBM-PC prints the following: Notice that your printer receives decimal code 13 (hex OD) together with hex OA, which is really decimal 10. In addition, your printer does not receive decimal code 26 (hex 1A). Your printer prints characters...
  • Page 84 MEMO...
  • Page 85: Dot Matrix Printing

    AND DOT GRAPHICS Subjects covered in Chapter 6 include- . Designing and printing your own characters User-designed graphics Using the procedures standard functions user-defined own characters, graphics. These two functions can be used to design and print any sym- bol, or any graphic shape. This allows you to make your own special symbols, or print a company logo.
  • Page 86 fired by a different number. One byte of data (a decimal number from 0 to 255) can thus represent For example, if the data representing head, only the bottom pin would fire; if “2” was sent, only the second pin from the bottom would fire, and if “3” was sent, the two bottom pins would fire, and so on.
  • Page 87 six boxes ,wide by nine boxes high. Horizontally, straddle a line, making the actual character grid 11 dots wide by 9 dots centered The minimum width of a character Unlike height of seven dots, user-defined eight dots vertically. Dots cannot overlap - that is, you may not have a dot inside a box next to one that is on a line.
  • Page 88 value is 2. In the next column, there is a dot straddling tical line in the “1” box, and another in the “4” box; its value is recorded as 5. m. m, m, m. m, m, m, m. m, m. m., Total Figure 6-3.
  • Page 89 You will see the letters values. When you define the character, you will substitute value for each of these letters. Before you complete the definition, you will need to decide ex- actly where in the standard characters. After downloading, by sending the code for the character you replaced. For exam- ple, we decided to assign our flask to the “(”...
  • Page 90 the grid; ml the left-most column value, m2 the next, and so on. You must define eleven data, even if the last few data are 0. For the flask, the complete command will be: CHR$(27);CHR$(38);CHR$(O);CHR$(GO);CHR$(60); CHR$(139);CHR$(2);CHR$(5);CHR$(8);CHR$(24l);CHR$(O); CHR$(O);CHR$(241);CHR$(8);CHR$(5);CHR$(2);CHR$(O) this command language you are using. Before you run the program and send the data to the printer, remember is set to off.
  • Page 91 Tell printer to use download character set : (ESC > “%” To demonstrate the “flask” character and some other user-defined print a small graph. This program will do just that: 10 LPRINT CHR$(27);":" ;CHR$(O>;CHR$(O);CHR$(O); 20 LPRINT CHR$(27);"&";CHR$(O);CHR$(60);CHR$(62); 30 FOR N=60 TO 62 40 FOR M=O TO 11 50 READ MM 60 LPRINT CHR$(MM);...
  • Page 92 320 LPRINT 330 LPRINT CHR$(9);+-"; 340 SCALE$="--+--'I 350 FOR I=2 TO 8 STEP 2 360 LPRINT SCALES; 370 NEXT I 380 LPRINT I'--+" 390 LPRINT CHR$(9);" 'I; 400 FOR I=2 TO 8 STEP 2 410 LPRINT " 420 NEXT I 430 LPRINT CHR$(27);"%0".
  • Page 93 DESIGNING YOUR OWN NLQ CHARACTERS As you have probably noticed, NLQ characters two passes of the print head. Half of the character is printed on the first pass, and the remainder is rolled up half a dot height in between passes to let the print head print dots on the second pass that overlap the previous dots, in order to fill in the spaces and produce denser characters.
  • Page 94 your characters, and the second pass dots on the lines. Remeber that adjacent dots may not overlap on the same pass; in other words, if one dot is in a box, its adjacent dot on the same pass may not be on a line. Therefore, the dots needed to overlap any spaces in a character propriate places in the second pass grid.
  • Page 95 10 LPRINT CHR$(27);"xl"; 20 LPRINT CHR$(27);":" ;CHR$(O);CHR$(O);CHR$(O); 30 LPRINT CHR$(27);"&";CHR$(O);CHR$(60);CHR$(62); 40 FOR N=60 TO 62 50 FOR M=O TO 22 60 READ MM 70 LPRINT CHR$(MM); 80 NEXT M 90 NEXT N 100 LPRINT 110 DATA 139, 2, 120 DATA 6, 8, 16,224, 0, 130 DATA 139,124, 0, 66, 12, 0...
  • Page 96 370 LPRINT CHR$(9);"i--'I; 380 SCALE$="--+-'I 390 FOR I=2 TO 8 STEP 2 400 LPRINT SCALES; 410 NEXT I 420 LPRINT "--+" 430 LPRINT CHRS(9);" "; 440 FOR I=2 TO 8 STEP 2 450 LPRINT " ";I; 460 NEXT I 470 LPRINT CHR$(27);"%0" 480 LPRINT CHR$(27);"xO";...
  • Page 97 (ESC) “*” specifies the graphics mode, the CHR$(O) specifies normal density. number of graphics data may follow; the nl and n2 specify the number of bytes. To figure the value of nl and n2, you need to work out how wide your image will be.
  • Page 98: Control Code

    HIGHER RESOLUTION GRAPHICS There are seven graphics modes you can use; they are sum- marized in Table 6-2. Function Normal density (60 dots/inch) Double densitv (120 dots/inch) Double der----, Quadruple dens.-, ifv (240 dots/inch) (ESC)“z”CHR$(3) Semi-double density (8u aot Plotter graphics (72 dots/i----~, CRT graphics (90 dots/inch) You will notice that the higher the density of the graphic mode, the more points you will need to plot.
  • Page 99 MORE GRAPHICS PROGRAMMING At the end of this chapter, we’ll discuss two modes that the printer offers to help you solve potential graphics problems. redefining code allows you to change the density for graphics programs that use one of the four alternate graphics mode allows you to use all nine pins on each line and thus speed up screen dumps.
  • Page 100 peripheral devices using eight data lines. When the peripheral is a printer, each data line corresponds head. Thus each byte sent will fire up to eight pins. But the printer has 9 pins available. So how do you fire the ninth pin with only 8 data lines? In fact, do you really want to bother with just one extra pin? Well, for such graphics-intensive applications...

This manual is also suitable for:

Np-1o

Table of Contents