Every effort has been made to ensure that the information in this leaflet is true and correct at
the time of printing. However, the products described in this leaflet are subject to continuous
development and improvements and Acorn Computers Limited reserves the right to change
its specifications at any time. Acorn Computers Limited cannot accept liability for any loss
or damage arising from the use of any information or particulars in this leaflet. ACORN,
ECONET and ARCHIMEDES are trademarks of Acorn Computers Limited.
Related
Application
Notes:
Support Group
Acorn Computers Limited
Acorn House
Vision Park
Histon
Cambridge CB4 4AE
16th June 1992Support Group Application Note No. 002, Issue 1
Using the Acorn JP101 Spark Jet Printer
Apart from being a remarkably quiet and fast home computer printer, the JP101 Spark Jet Printer has many
special features which are simple to use and can improve the presentation of your printouts. Among these
features are nine different national character sets, double width printing, double height printing, and
horizontal and vertical tabulation functions.
The printer may be controlled from either a program or from the keyboard using VDU commands, or by
typing control characters on the keyboard. For example, we can turn the printer on or off from the keyboard
or from a BASIC program by typing VDU or VDU3. This may also be done from the keyboard by typing
CTRL-B or CTRL-C, which is easier to type!!
When we wish the printer to perform a more complicated task, such as printing characters double width, or
automatically tabulating data as it prints it out, then a sequence of commands must be sent to the printer to
tell it how it must print any future characters the computer sends it. We wish to send these characters to the
printer only and this may be done using VDU1 which sends the next character to the printer only.
In order that the printer should recognise characters sent to it by the computer as part of a command
sequence rather than as characters to be printed they are preceded by an ESC character. This has the ASCII
code number 27, so to send the ESC character to the printer only we use the command VDU1,27.
VDU commands may be strung together so we may send sequences of characters more easily. For
example, to tell the printer that we wish it to print any further characters we send it as double width
characters, we must send it the sequence ESC 3. To do this we use VDU1,27,1,51. 51 is the ASCII code
for the character 3.
For more information about ASCII codes or VDU commands, see your computer's user guide. For more
information about the operating commands of the JP101 printer, see the printer manual chapter 6.
Given below is a summary of the VDU commands you should use to obtain various effects on the JP101
printer. Note that before sending any VDU commands to the printer is possible, the printer must be enabled
using a VDU2 (see example programs in 12) and 14) below).
1) Double Width Characters On
VDU1, 27, 1, 51 This command turns double width printing on until it is turned off again.
2) Double Width Characters Off
VDU1, 27, 1, 52This command turns off double width printing.
3) Double Height Characters On
VDU1, 27, 1, 39
This command turns on double height printing. It may also be used in conjunction with 1) to obtain double
height, double width characters.
Support Group Application Note No. 002, Issue 1
2
16th June 1992Support Group Application Note No. 002, Issue 1
4) Double Height Characters Off
VDU1, 27, 1, 37This command turns off double height printing.
These commands turn on the appropriate style of underlining, which remains in operation until cancelled.
6) Underlining Off
VDU1, 27, 1, 43Turns underlining off.
7) Horizontal Character Spacing
VDU1, 27, 1, 60 (10 characters per inch)
VDU1, 27, 1, 61 (12 characters per inch)
VDU1, 27, 1, 62 (18 characters per inch)
These commands select the number of characters printed per inch horizontally. The default value on
power-up or general reset is 10 cpi.
8) Vertical Line Spacing
VDU1, 27, 1, 69 (6 lines per inch)
VDU1, 27, 1, 70 (8 lines per inch)
These commands set the number of line feeds per inch to the chosen value.
9) Variable Vertical Line Spacing
VDU1, 27, 1, 38, 1, n
Sets line spacing to a value between 1/12 inch and 9/12 inch, in increments of 1/12 inch. The value n is 48+
(the number of increments). For example, if the desired line spacing was 5/12 inch, then n would be (48+5)
= 53, and the complete command would be VDU1, 27, 1, 38, 1, 53.
10) General Reset
VDU1, 27, 1, 48
Clears the print buffer, the horizontal and vertical program settings, the pitch and line spacings, etc.
Support Group Application Note No. 002, Issue 1
3
16th June 1992Support Group Application Note No. 002, Issue 1
Selects one of the alternative national character sets. The default is that set on the DIP switches on the
PCB. Details of the special characters are given in the printer manual on page 5.12.
This is a complicated command to use. The program below demonstrates the use of this command to print
numbers 0 to 100 in a field width of 60 characters at tab stops of 0, 10, 15, 40, 47 characters.
10 @%+0Turn off screen formatting
20 VDU2Turn on output to printer
30 VDU1, 27, 1, 80Tell printer horizontal tabulation program starts here
40 PRINT"60;10;15;40;47";Send format information, line width followed by positions of
tab stops
50 VDU1, 27, 1, 90Tell printer horizontal tabulation program stops here
60 Z=0
70 REPEAT
80 PRINT Z;For Z=0 to 100 print Z
90 VDU1, 9Horizontal tab to next tab stop
100 Z=Z+1
110 UNTIL Z-101
120 VDU1, 12Page eject
130 VDU3Turn off output to printer
13) Horizontal Tab
VDU1, 9
Automatically inserts enough spaces as needed to reach the next horizontal tab stop as set by 12) above. If
no Horizontal Tabulation Program is set then one space is inserted.
Support Group Application Note No. 002, Issue 1
4
16th June 1992Support Group Application Note No. 002, Issue 1
Prints contents of buffer up to tab code, then performs paper skip to next vertical tab stop as defined by a
Vertical Tabulation Program. If there is no vertical tab stop defined, then the printer performs one line feed.
16) Paper Skip
VDU1, 12Performs paper feed to first print line of next page.
17) Relative Vertical Form Skip
VDU1, 27, 1, 73, 1, i, l, j, l, k (where i=48+x, j=48+y, k=48+z)
Performs a paper skip of xyz line feeds, where xyz is less than 255. For example to obtain 100 line feeds
use VDU1, 27, 1, 73, 1, 49, 1, 28, 1, 48
18) Line Feed
VDU1, 10Performs a single line feed
Support Group Application Note No. 002, Issue 1
5
16th June 1992Support Group Application Note No. 002, Issue 1
19) Carriage Return
VDU1, 13Performs a single line feed
20) Audible Alarm
VDU1, 7Activates audible alarm lasting about 300msec.
21) Clear Printer Buffer
VDU1, 127Clears print buffer and resets print head. Does not affect tab programs etc.
22) Plotter Programming
Although it is possible to program graphics dump routines in BASIC the result would be very slow due to
the large amount of information that must be processed. Any routine of this type should therefore be
written in machine code. Such a "Printer Dump Routine" is available from Acorn for the JP101.
Support Group Application Note No. 002, Issue 1
6
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.