The TSP200 series is ideal for printing text, bar code and graphics.
The TSP200 series has the following features:
1. extremely quiet and fast printing (maximum 50 mm/sec.) using the direct line
thermal printing method
2. support many bar code types
(UPC-A, UPC-E, JAN/EAN-8, JAN/EAN-13, CODE 39, IFT 2 OF 5, CODE
128, CODE 93, NW-7)
3. dual interfaces (RS232C, Parallel)
4. memory switches that enable wide selection of printer default settings
The printer has two different software modes which can be selected using the DIP
switch.
(Factory setting: Star Mode)
Star Mode: DIP switch 1-7 ON
This mode is compatible with Star Receipt printers, such as the SP300 and SP200
series.
ESC/POS Mode: DIP switch 1-7 OFF
This mode is compatible with the printers supporting ESC/POS command.
ESC/POS is a trademark of Seiko Epson Corporation.
For improvement purposes, the descriptions and specifications in this manual are
subject to change without notice.
– 1 –
2. MEMORY SWITCH AND DIP SWITCH
Functional settings are made using the printer’s EEPROM memory switches and
the DIP switches.
2-1. Memory Switch
Each memory switch is a 16-bit word stored in EEPROM.
The printer is shipped with the factory setting which is made in accordance with
its product type.
For the detailed functions and the settings of the Memory switches, please refer
to “Chapter 8”.
The factory settings are shown in the table below.
LEDFunction
POWERLights up when the printer is turned on.
Blinks when an error occurs (Refer to 7. ERRORS.)
ON LINELights up when the printer is on line; goes off when the printer
is off line or error occurs (Refer to 7. ERRORS.)
3-2. Switches
SwitchFunction
ON LINESwitches between on line and off line
FEEDFeeds the paper while pressed
3-3. Switch Operation (Combined Switch Operation)
1) <SELF PRINTING>
FEED + POWER ON (Turn the power on while holding the FEED switch
depressed.)
Self-printing will be performed. VER. NO., Memory switch settings, DIP
switch settings and character order will be printed out.
2) <Hexadecimal dump mode>
ON LINE + POWER ON (Turn the power on while holding the ON LINE
switch depressed.)
Each of the signals sent from the computer to the printer will be printed out
in hexadecimal code.
This function allows you to check if a control code sent to the printer by the
program being used is correct or not. The last line is not printed if its data is
less than one full line. However, if the ON LINE switch is pressed to set the
off line mode, the last line will be printed. To turn off the mode, it is necessary
to turn off the printer completely.
– 4 –
4. SERIAL INTERFACE
4-1. Interface Specifications
Transmission type.................Asynchronous serial interface
Baud rate (bps) .....................2400, 4800, 9600, or 19200
(Selected by DIP switch)
Word format
Start bit: ......................1
Data bits: ....................7 or 8 (Selected by DIP switch)
Parity: .........................Odd, Even, or None
(Selected by DIP switch)
Stop bit: ......................1
Signal polarities
RS-232C .....................Mark = Logic “1” (–3V to –15V)
Space = Logic “0” (+3V to +15V)
Handshaking .........................DTR or XON/XOFF mode (Selected by DIP
switch)
Mark [1]
b0b1b2b3b4b5b6(b7)
SERIAL
Space [0]
ABCD
A: Start bit
B: Data bits
C: Vertical parity bit
D: Stop bit
– 5 –
4-2. Interface Circuit
4-2-1. RS-232C Interface
SERIAL
Input (RXD, DSR)
PrinterHost computer
Output (DTR, FAULT, TXD, RTS)
PrinterHost computer
75188 or equivalent
– 6 –
4-3. Connectors and Signal Names
51
9
6
4-3-1.RS-232C Interface
Pin No.
1FG–Frame ground
2RXDINReceiving data
3TXDOUTTransmission data
4DTROUTESC/POS mode
Signal name
Direction
1) DTR/DSR communication mode
Indicates if printer is busy or not.
Space: Printer ready
Mark: Printer busy
The conditions for busy will vary according to
the memory switch settings.
Printer Status
1. From when the power
is turned on or I/F reset
until communication
possible
2. Test printing
3. Cover open
4. Paper feed by paper feed
switch
5. Stop due to no paper
6. During waiting for
switch input in macro
execution
7. Other errors
8. Receiving buffer full
SERIAL
Function
Memory SW #4-4
10
BUSYBUSY
BUSYBUSY
– – –BUSY
– – –BUSY
– – –BUSY
– – –BUSY
– – –BUSY
BUSYBUSY
2) XON/XOFF Communication mode
Indicates when printer can receive data from
host. This is space, except for the following.
1. After reset until communication possible.
2. During test printing.
– 7 –
SERIAL
Pin No.
Signal name
Direction
Function
Star mode
Data terminal ready signal.
When the printer is ready to receive data, this
signal changes to “SPACE”.
5SG—Signal ground
6DSRINSignal line that indicates whether the host can
receive data
Space: Host can receive data
Mark : Host cannot receive data
Does not confirm the status of this signal in XON/
XOFF communication or STAR mode.
This signal line can be used as an external reset
signal by setting the DIP switches. A pulse width of
1 ms or more mark state activates reset.
7RTSOUTSame as DTR signal.
8INITINThis signal line can be used as an external reset
signal by setting the DIP switches. A pulse width of
1 ms or more space state activates reset.
9FAULTOUTIn the Star mode, the printer will enter the mark
state during the following errors: no paper, head up,
cutter error. In ESC/POS mode, this is normally
space.
– 8 –
4-4. Interface Connections
Refer to the host computer’s interface specifications for details of how to connect
the interface. The following illustrations show typical connection configurations.
[RS-232C]
Printer sideIBM PC side (25 pin)
F-GND
RXD
TXD
DTR
S-GND
RTS
INIT
FAULT
F-GND
RXD
TXD
DTR
S-GND
RTS
INIT
FAULT
1
2
3
4
5
6DSR
7
8
9
Printer sideIBM PC side (9 pin)
1
2
3
4
5
6DSR
7
8
9
20
SERIAL
F-GND
1
TXD
2
RXD
3
RTS
4
CTS
5
DSR
6
S-GND
7
DCD
8
DTR
DCD
1
RXD
2
TXD
3
DTR
4
S-GND
5
DSR
6
RTS
7
8
CTS
– 9 –
4-5. Data Protocol
4-5-1. DTR mode
SERIAL
This mode is accessed when the DIP switch 1-6 is set to ON.
Signals are controlled using the DTR line as a BUSY flag.
RXD
DTR
Printing
Power ON
DataData Data
Buffer fullBuffer empty
Immediately after power on (provided that no error occurs), the printer sets DTR
to “SPACE” to indicate that it is ready to receive data. When the host detects that
DTR is in “SPACE” condition, it begins sending text data over the RXD line.
When the printer’s remaining buffer space falls to *256 bytes or less, the printer
sets DTR to “MARK.” The host responds by halting the data transfer. However,
note that the printer remains capable of receiving data until the buffer becomes
full.
Available buffer space increases as the printer prints the buffered data. When the
printer has cleared all but the last *256 bytes of data, it sets DTR back to “SPACE”
to indicate that it is ready to receive more data.
Data buffer full Nearly full
*256 bytes
remaining
DTR
“MARK”
* 16 bytes when the buffer size is set to 45 bytes
– 10 –
Nearly emptyEmpty
*256 bytes
DTR
“SPACE”
■ Error Condition
Upon detecting an error, the printer immediately sets DTR to “MARK” and goes
offline. If the error was caused by a paper-out condition, you can clear it by
loading new paper and then pressing the ON LINE switch (Star mode) or closing
the cover (ESC/POS mode).
When paper is out
RXD
OFF LINEON LINE
DTR
Printing
SERIAL
PAPER OUT signal
Power ON
Paper out
Press the ON LINE switch after
loading paper (Star mode).
– 11 –
4-5-2. X-ON/X-OFF mode
This mode is accessed when DIP switch 1-6 is set to OFF.
SERIAL
X–OFF
X–ONX–OFFX–OFF X–ONX–OFFX–OFF
TXD
X–OFF
X–ON
RXD
Printing
PAPER OUT
signal
ON LINE
indicator
ON
OFF
Power ONLoad paper and press
DataDataData
Paper out
the ON LINE switch (Star mode).
Immediately after power on (provided that no error occurs), the printer informs
the host that it is ready to receive data by outputting the X-ON signal (control code
DC1; value = 11H) over the TXD line. If necessary the printer repeats the signal
every three seconds until the host begins sending text data over the RXD line.
When the printer’s remaining buffer space falls to *256 bytes or less, the printer
begins to output X-OFF signals (DC3, value = 13H) over the TXD line. The host
responds by halting the data transfer. Note that the printer remains capable of
receiving data until the buffer becomes full.
Available buffer space increases as the printer prints the buffered data. When the
printer has cleared all but the last *256 bytes of data, it again outputs the X-ON
signal.
Data buffer full Nearly full
*256 bytes
remaining
Printer outputs
X-OFF.
Nearly emptyEmpty
*256 bytes
Pinter outputs
X-ON.
* 16 bytes when the buffer size is set to 45 bytes
– 12 –
5. PARALLEL INTERFACE
5-1. Interface Specifications
Interface:Conforms with Centronics parallel interface standard
Data transfer speed:1000 ~ 5000 CPS
Synchronization:External strobe pulse
Handshaking:Using ACK and BUSY
Logic level:TTL-level compatible
5-2. Interface Timing
A C K
DATA
STROBE
BUSY
PARALLEL
Approx. 9ms
TTT
T: At least 0.5ms
– 13 –
Signal NameSample Circuit
4.7k
DATA 1
~
W
74LS-equivalent
DATA 8
Input
PARALLEL
STROBE
BUSY
Output
ACK
5-3. Connectors and Signal Names
(18)(1)
(36)(19)
(Printer Side)
1kW
1.8kW
100W
1000pF
74LS-equivalent
74LS-equivalent
Conforms to Amphenol
connector 57-30360
Figure 5-1. Parallel Interface Connector
– 14 –
Pin noSignal name
1STROBEINStrobe pulse for data read. Usually HIGH;
Direction
Function
goes LOW to trigger data read.
2-9DATA 1~8INParallel data lines for eight-bit data. HIGH
is “1”; LOW is “0”.
10ACKOUTPrinter outputs this pulse for approxi-
mately 9µs to indicate that data read is
completed. Printer becomes ready to
receive new data at the moment the ACK
pulse ends.
11BUSYOUTDC-level signal indicating printer’s cur-
rent status. LOW indicates that printer is
ready to receive the next data; HIGH
indicates that printer is unable to receive.
12PAPER OUTOUTDC-level signal indicating whether printer
has paper. The signal stays LOW while paper
is present; it goes HIGH to indicate that paper
has run out.
13SELECTEDOUTDC-level signal; stays HIGH while printer is
online.
14-15N/CNot used
16SIGNAL GNDSignal ground
17
18+5VOutputs +5V (Max. 50mA)
19-30TWISTEDReturn pins for various signals. Each pin is
31RESETINLOW level causes printer to reset its control
32ERROROUTGoes LOW to indicate that printer is unable to
33EXT GNDGround terminal for external connection
34-35N/CNot used
36––Fixed “HIGH” at printer side
CHASSIS GND
PAIR RETURN
Printer-frame ground
connected to the corresponding signal line by
twisted pair line.
circuitry and return to its initial state.
print.
PARALLEL
– 15 –
6. PERIPHERAL UNIT DRIVE CIRCUIT
A drive circuit for driving peripheral units (such as cash drawers) is featured on
the main logic board of this printer. A modular connector for driving peripheral
units is featured on the output side on the drive circuit. When using this circuit,
connect the cable for the peripheral unit. (Cables must be prepared by the user.)
Use cables which meet the following specifications.
1. Use the modular plug as shown in Figure 6-1.
2. Separate ground wire is required for Europe only.
3. If the printer is to be used in Europe, the noise filter should be attached to the
cable, as shown in Figure 6-2.
CAUTION: DO NOT connect any other plug to the peripheral unit connector.
Modular plug MOLEX 90075-0007,
AMP641337 or JAPAN BURNDY B-66-4
16
Shield
Wire lead
Separated Ground wire
connected to shield (Europe only).
Figure 6-1. Cable specifications for peripheral unit.
– 16 –
Fastener
One loop
Ferrite core
Screw M3×4
Separate ground wire
Peripheral unit drive
circuit connector
Figure 6-2. Separate ground wire and noise filter are required for Europe.
– 17 –
■ Drive circuit
The recommended drive circuit is shown.
[Drive output 24V, max. 1.0 A]
F.G
M-GND
M-GND
TR3
TR1
TR2
+5V
+24V
R2
D1
7824
D2
R1
1
2
3
4
5
6
With shield
L1
L2
Peripheral
unit 2
Frame
ground
Peripheral
unit 1
R3
4.7kΩ
1/4W
Compulsion
switch
NOTES:
1. Peripheral units #1 and #2 cannot be driven simultaneously.
When driving a device continuously, do not use drive duty above 20%.
2. Compulsion switch status is available as status data.
3. Resistance for coils L1 and L2 is not less than 24 ohms.
4. Absolute maximum ratings for diodes D1 and D2 (at Ta=25˚C):
Average rectified current Io = 1A
Maximum forward surge current (60Hz,1-cycle sine wave) I
FSM=40A
5. Absolute maximum rating for transistors TR1 and TR2 (at Ta = 25˚C):
Collector current Ic = 2A
– 18 –
7. ERRORS
The various types of errors can be identified by the buzzer’s sound and the lit
LEDs.
Buzzer: The circled numbers refer to “7-4. Type of buzzer sound”.
Selects an international character set according to the value of n,
as shown below:
nCharacter setnCharacter set
0U.S.A.7Spain I
1France8Japan
2Germany9Norway
3England10Denmark II
4Denmark I11Spain II
5Sweden12Latin America
6Italy
When the value of n is 0 to 9, 0(00H) to 9(09H) or “0”(30H) to
“9”(39H) can be set. When the value of n is 10 to 12, 10(0AH) to
12(0CH) or “A”(41H) to “C”(43H) can be set.
FUNCTION
CODE<ESC> “/”n
HEX
REMARKS
Select zero style
1B2Fn
Causes subsequent zero characters to be printed with a slash when
n is 1, and without a slash when n is 0.
The value of n can be set to 0(00H) or “0”(30H), or 1(01H) or
“1”(31H).
STAR MODE
– 25 –
FUNCTION
CODE
HEX
REMARKS
STAR MODE
Select bar code printing
<ESC> “b”n1n2n3n4di...dk <RS>
1B62n1n2n3n4di...dk1E
Prints bar code according to the value of n1, as shown below:
n1: Type of bar code
When the value of n3 is UPC-E, UPC-A, JAN/EAN-8, JAN/EAN13, CODE128 or CODE93, 1(01H) to 3(03H) or “1”(31H) to
“3”(33H) can be set. When the value of n3 is CODE39, NW-7 or
ITF, 1(01H) to 9(09H) or “1”(31H) to “9”(39H) can be set.
n4: Height of bar code
Can be up to 255 dots (31.9mm).
If the bar code height is larger than the line feed amount, the
line feed amount is automatically multiplied by an integer.
di...dk: Bar code data
STAR MODE
UPC-E/UPC-A: K = 11 (or 12)
The check digit at the 12th digit is automatically added,
and ignored even if it is specified.
JAN/EAN-8: K = 7 (or 8)
The check digit at the 8th digit is automatically added,
and ignored even if it is specified.
JAN/EAN-13: K = 12 (or 13)
The check digit at the 13th digit is automatically added,
and ignored even if it is specified.
CODE39:The value of k is optional, and the maximum
value also differs according to the modes (21
digits maximum in mode 7).
The start/stop code (“
– 27 –
”) is automatically added.
*
STAR MODE
ITF:The value of k is optional, and the maximum
value also differs according to the modes (40
digits maximum in mode 4).
If the data is number of an odd digits, 0 is
automatically added at the beginning of the data.
CODE 128: The value of k is optional, and the maximum
value also differs according to the modes and the
types of character number (51 digits maximum in
mode 1).
The check character is automatically added.
CODE93:The value of k is optional, and the maximum value
also differs according to the modes and the types
of character (30 digits maximum in mode 1).
The check characters (C and K) are automatically
added.
NW-7:The value of k is optional, and the maximum
value also differs according to the modes and the
types of character number (29 digits maximum in
mode 7).
The start/stop code is also contained in the data (it
is not automatically added).
The bar code printing start position is at the upper end of the
current line.
If the bar code is positioned beyond the right margin, neither
the bar code nor the character below the bar code will be
printed.
Data of CODE 128 and CODE 93
When <LF> is used in a command, some kinds of control code
cannot be sent by the host PC. The control code should be sent
as the data as shown below:
• When sending the following data, express as a set of two
characters.
Express “% (25H)” as “%0 (25H30H)”.
Add “40H - 5FH” after “%” for the control codes (00H - 1FH).
Express the control code (7FH) as “%5(25H35H)”.
Add “1 - 4 (31H - 34H)” after “%” for the function code.
Add “6 - 8 (36H - 38H)” after “%” for the start code.
Prints 12-dot pitch characters without an extra space.
FUNCTION
CODE
HEX
STAR MODE
REMARKS
FUNCTION
CODE
HEX
REMARKS
FUNCTION
CODE
HEX
REMARKS
FUNCTION
CODE
Select 14-dot pitch printing
<ESC> “p”
1B70
Prints 12-dot pitch characters with 2-dot spacing between characters.
Select 15-dot pitch printing
<ESC> “P”
1B50
Prints 12-dot pitch characters with 3-dot spacing between characters.
Select 16-dot pitch printing
<ESC> “:”
1B3A
Prints 12-dot pitch characters with 4-dot spacing between characters.
Set the character spacing
<ESC> <SP>n
HEX
REMARKS
1B20n
Sets the space between characters to n dots, where n is a number
from 0 to 15.
When the value of n is 0 to 9, 0(00H) to 9(09H) or “0”(30H) to
“9”(39H) can be set. When the value of n is 10 to 15, 10(0AH) to
15(0FH) or “A”(41H) to “F”(46H) can be set.
– 30 –
FUNCTION
CODE
HEX
REMARKS
Sets the printing magnified double in character width.
<SO>
0E
Prints the subsequent data including a character spacing set by
<ESC><SP> n, magnified double in character width.
FUNCTION
CODE
HEX
REMARKS
FUNCTION
CODE
HEX
REMARKS
FUNCTION
CODE
HEX
REMARKS
Resets the printing magnified in character width.
<DC4>
14
Resets the printing magnified in character width set by <SO>,
<ESC>“W”n and <ESC>“i”n1n2.
Sets the magnification rate in character width.
<ESC> “W”n
1B57n
Prints the subsequent data including a character spacing set by
<ESC><SP> n, magnified in character width by a rate specified by
the value of n.
The values of n1, n2 are 0(00H) to 5(05H) or “0”(30H)” to
“5”(35H).
Underlining
<ESC> “–”n
1B2Dn
When the value of n is 1, underlines the subsequent data including
a character spacing set by <ESC><SP> n.
The part to be skipped by the horizontal tab setting and the block
graphic characters are not underlined.
Resets the underline mode when the value of n is 0.
The value of n can be set to 0(00H) or “0”(30H), or 1(01H) or
“1”(31H).
– 32 –
FUNCTION
CODE
HEX
REMARKS
Upperlining
<ESC> “_”n
1B5Fn
When the value of n is 1, overlines the subsequent data including
a character spacing set by <ESC><SP> n.
The part to be skipped by the horizontal tab setting and the block
graphic characters are not upperlined.
Resets the upperline mode when the value of n is 0.
The value of n can be set to 0(00H) or “0”(30H), or 1(01H) or
“1”(31H).
FUNCTION
CODE
HEX
REMARKS
FUNCTION
CODE
HEX
REMARKS
FUNCTION
CODE
HEX
REMARKS
FUNCTION
CODE
HEX
REMARKS
Select highlight printing
<ESC> “4”
1B34
Prints the subsequent data including a character spacing set by
<ESC><SP> n reversed.
The part to be skipped by the horizontal tab setting is not reversed.
Cancel highlight printing
<ESC> “5”
1B35
Cancels highlight printing.
Inverted printing
<SI>
0F
Causes subsequent characters to be inverted.
Cancel inverted printing
<DC2>
12
Cancels inverted printing.
STAR MODE
– 33 –
FUNCTION
CODE
HEX
CODE
HEX
REMARKS
Select emphasized printing
<ESC> “E”
1B45
<ESC> “G”
1B47
Causes subsequent characters to be emphasized.
FUNCTION
STAR MODE
CODE
HEX
CODE
HEX
REMARKS
Cancel emphasized printing
<ESC> “F”
1B46
<ESC> “H”
1B48
Cancels emphasized printing.
– 34 –
Commands to Set the Page Format
FUNCTION
CODE<ESC> “C”n
HEX
REMARKS
Set page length in lines
1B43n
Sets the page length using the current line spacing, where n is
between 1 and 127.
Changing the line spacing later does not alter the physical page
length.
The current line becomes the top of the page.
Resets the bottom margin.
Default page length is 42 lines.
FUNCTION
CODE<ESC> “C”<0>n
HEX
REMARKS
Set page length in inches
1B4300n
Sets the page length to n × 24 mm, where n is between 1 and 22.
The current line becomes the top of the page.
Resets the bottom margin.
FUNCTION
CODE<ESC> “N”n
HEX
REMARKS
Set bottom margin
1B4En
Sets the bottom margin to n lines at the current line spacing, where
n is between 0 and 127.
Bottom margin is reset when you change the page length.
Setting is invalid if the printing area on one page is 36 mm or less.
STAR MODE
FUNCTION
CODE<ESC> “O”
HEX
REMARKS
Cancel bottom margin
1B4F
Cancels the bottom margin.
– 35 –
FUNCTION
CODE
HEX
REMARKS
Set left margin
<ESC> “l”n
1B6Cn
Sets the left margin at column n (where n is between 0 and 255) at
the current character pitch.
The left margin does not move if the character pitch is changed
later.
Setting is invalid if the printing area for one line would be 36mm
or less.
STAR MODE
FUNCTION
CODE
HEX
REMARKS
Set right margin
<ESC> “Q”n
1B51n
Sets the right margin at column n (where n is between 1 and 255)
at the current character pitch.
The right margin does not move if the character pitch is changed
later.
Setting is invalid if column n is beyond the right edge of the
printing area.
Setting is invalid if the printing area for one line would be 36mm
or less.
– 36 –
Commands to Move the Print Position
FUNCTION
CODE<LF>
HEX
REMARKS
FUNCTION
CODE<CR>
HEX
REMARKS
Line feed
0A
Prints the current line and feeds the paper to the next line.
Carriage return
0D
Prints the current line and feeds the paper to the next line.
This command is ignored when CR code is invalid.
FUNCTION
CODE<ESC> “a”n
HEX
REMARKS
Feed paper n lines
1B61n
Prints the current line and feeds the paper n lines (where n is
between 1 and 127).
FUNCTION
CODE<FF>
HEX
REMARKS
Form feed
0C
Feeds the paper to the top of the next page, according to the page
length set by <ESC>“C”n or <ESC>“C”<0>n when memory switch
1-2 is set to 0. If memory switch 1-2 is set to 1, the paper is fed 18 mm,
cut fully, and then feed back 18 mm. The print position is at the left
margin in both cases.
STAR MODE
FUNCTION
CODE<HT>
HEX
REMARKS
Horizontal tab
09
Moves the print position to the next horizontal tab stop. Ignored if
there is no next horizontal tab stop on the current line.
– 37 –
FUNCTION
CODE
HEX
REMARKS
Vertical tab
<VT>
0B
Prints the current line and feeds the paper to the next vertical tab
stop and moves the print position to the left margin.
Performs paper feed if no vertical tabs are set or if the current line
is at or below the last vertical tab stop.
FUNCTION
STAR MODE
CODE
HEX
REMARKS
FUNCTION
CODE
HEX
REMARKS
FUNCTION
CODE
HEX
REMARKS
Set line spacing to 4 mm
<ESC> “z”“1”or <ESC> “z”<1>
1B7A31or1B7A01
Sets the distance the paper advances in subsequent line feeds to
4 mm.
Set line spacing to 3 mm
<ESC> “0”
1B30
Sets the distance the paper advances in subsequent line feeds to
3 mm.
One time n/4 mm feed
<ESC> “J”n
1B4An
Performs a line feed of n/4mm once only.
The value of n is 1 to 255.
Space setting for lines is not changed.
– 38 –
FUNCTION
CODE
HEX
REMARKS
One time n/4 mm backfeed
<ESC> “j”n
1B6An
Feeds the paper back n/4mm once only.
The value of n is 1 to 255.
Space setting for one line is not changed.
This command can also feed the paper back to the page before the
current page. In this case, the position of the line on the previous
page is determined by the page length control.
FUNCTION
CODE
HEX
REMARKS
FUNCTION
CODE
HEX
REMARKS
One time n/8 mm feed
<ESC> “I”n
1B49n
Performs a line feed n/8mm once only.
The value of n is 1 to 255.
Space setting for lines is not changed.
Set vertical tab stops
<ESC> “B”n1n2...<0>
1B42n1n2...00
Cancels all current vertical tab stops and sets new vertical tab stops
at lines n1, n2, etc., where n1, n2, etc. are numbers between 0 and
255. A maximum of 16 vertical tab stops can be set.
The tab stops must be specified in ascending order; any violation
of ascending order terminates the tab stop list. Standard termination is by the <0> control code.
The vertical tab stops are set in terms of the current line spacing and
do not move if the line spacing is changed later.
STAR MODE
– 39 –
FUNCTION
CODE
HEX
REMARKS
STAR MODE
Set horizontal tab stops
<ESC> “D”n1n2...<0>
1B44n1n2...00
Cancels all current horizontal tab stops and sets new tab stops at
columns n1, n2, etc. at the current character pitch, where n1, n2,
etc. are numbers between 1 and 255. A maximum of 16 horizontal
tab stops can be set.
The tab stops must be specified in ascending order; any violation
of ascending order terminates the tab stop list. Standard termination is by the <0> control code.
– 40 –
Commands to Print Dot Graphics
FUNCTION
Print normal density graphics
CODE<ESC> “K”n<0>m1m2...
HEX
REMARKS
1B4Bn00m1m2...
Prints normal density dot graphics. The graphics image is 24 dots
high and n× 3 dots wide. Maximum width is 576 dots.
m1, m2, ... are the dot data, each a 1-byte value from 0 to 255
representing 24 vertical dots, with the most significant bit representing the top three and the least significant bit representing the
bottom three.
The number of data bytes must be n.
Dots beyond the right margin are ignored.
Relationship between image data and print dots
DOT Position
1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
23
MSB
D8
D7D6D5D4D3D2D1
Image dataLSB
STAR MODE
– 41 –
EXAMPLE
We will create the design below using a bit image.
m30 is converted to hexadecimal, it appears as shown below.
DataBinary
Hexa-
decimal
m1 00000001 01
m2 00011110 1E
m3 00111110 3E
m4 01011111 5F
m5 00011111 1F
m6 01011110 5E
m7 00011110 1E
m8 00111111 3F
m9 00101111 2F
m10 00111110 3E
DataBinary
m11 00111110 3E
m12 00000010 02
m13 00000010 02
m14 00111110 3E
m15 00111110 3E
m16 00101111 2F
m17 00101111 2F
m18 00111110 3E
m19 00101110 2E
m20 00101110 2E
Hexa-
DataBinary
decimal
m21 00111110 3E
m22 00101110 2E
m23 00101110 2E
m24 00111110 3E
m25 00101111 2F
m26 00101111 2F
m27 00111110 3E
m28 00111110 3E
m29 00000010 02
m30 00000010 02
decimal
Hexa-
– 42 –
FUNCTION
CODE
HEX
REMARKS
Print high density graphics
<ESC> “L”n1n2m1m2...
1B4Cn1n2m1m2...
Prints high density dot graphics. The graphics image is 24 dots
high and n1 + n2× 256 dots wide. Maximum width is 576 dots.
m1, m2, ... are the dot data, each a 1-byte value from 0 to 255
representing 24 vertical dots, with the most significant bit representing the top three and the least significant bit representing the
bottom three.
The number of data bytes must be n1 + n2× 256.
Dots beyond the right margin are ignored.
Relationship between image data and print dots
DOT Position
1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
MSB
D8
D7D6D5D4D3D2D1
Image dataLSB
STAR MODE
– 43 –
EXAMPLE
STAR MODE
We will create the design below using a bit image.
m30 is converted to hexadecimal, it appears as shown below.
DataBinary
Hexa-
decimal
m1 00000001 01
m2 00011110 1E
m3 00111110 3E
m4 01011111 5F
m5 00011111 1F
m6 01011110 5E
m7 00011110 1E
m8 00111111 3F
m9 00101111 2F
m10 00111110 3E
DataBinary
m11 00111110 3E
m12 00000010 02
m13 00000010 02
m14 00111110 3E
m15 00111110 3E
m16 00101111 2F
m17 00101111 2F
m18 00111110 3E
m19 00101110 2E
m20 00101110 2E
Hexa-
DataBinary
decimal
m21 00111110 3E
m22 00101110 2E
m23 00101110 2E
m24 00111110 3E
m25 00101111 2F
m26 00101111 2F
m27 00111110 3E
m28 00111110 3E
m29 00000010 02
m30 00000010 02
decimal
Hexa-
Printing Sample
FUNCTION
CODE
HEX
REMARKS
Horizontal density is three times that of the bit image for <ESC>“k”.
(Compare the print samples.)
Print fine density bit image
<ESC>“k”n<0>d1...dk [k = n * 24]
1B6Bn00d1...dk [k = n * 24]
Prints a bit image using 1 horizontal dot and 1 vertical dot for 1 dot
of input data.
n is designated by the number of data bytes in the horizontal
direction and n must be within the range 1 to 72.
The data is ignored if it is longer than 72 digits or goes beyond the
right margin. Relationship between the input data and actual
printing is shown below.
Print fine density graphics
<ESC>“X”n1n2d1...d [(n1+n2*256)*3]
1B5n1n2d1...d [(n1+n2*256)*3]
Prints a bit image of the input data using horizontal and vertical
resolutions of 8 dots/mm.
Data extending past the right margin is ignored.
The relationship between the input data and the actual printing is
shown below.
n1 + n2 × 256 576
1
Dot
Position
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
MSB
b7 b6 b5 b4 b3 b2 b1 b0
d1•••
LSB
MSBLSB
b7 b6 b5 b4 b3 b2 b1 b0
d2•••
MSBLSB
b7 b6 b5 b4 b3 b2 b1 b0
d3•••
STAR MODE
– 47 –
Commands to Print Download Characters
FUNCTION
CODE<ESC> “&”<1><1>nm1m2...m48
HEX
CODE<ESC> “&”“1”“1”nm1m2...m48
HEX
REMARKS
STAR MODE
EXAMPLE
Define download character
1B260101nm1m2...m48
1B263131nm1m2...m48
Defines one new character and stores it in RAM for later use.
n is the character code of the character defined and must be
between 32 and 127.
If the maximum of 32 external characters have already been stored,
the oldest stored external character are deleted so that new external
character can be stored.
The character matrix is 12 dots wide and 24 dots high.
Relationship between the character pattern and the character data
is shown below.
Deletes the download character which was assigned the value n.
Enable download character set
CODE<ESC> “%”“1”or <ESC> “%”<1>
HEX
REMARKS
1B2531or1B2501
Enables the download character set.
– 49 –
FUNCTION
CODE
HEX
REMARKS
STAR MODE
Disable download character set
<ESC> “%”“0”or <ESC> “%” <0>
1B2530or1B2500
Disables the selected download character set and returns to the
built-in ROM character set.
– 50 –
Commands to Control Peripheral Devices
FUNCTION
CODE<ESC><BEL> n1n2
HEX
REMARKS
Define drive pulse width for peripheral device #1
1B07n1n2
Defines the drive pulse width for peripheral devices requiring
other than standard 200 ms pulse time and delay time.
n1 indicates the energizing time and n2 indicates the delay time,
using 10ms units.
FUNCTION
CODE<BEL>
HEX
REMARKS
FUNCTION
CODE <FS>
HEX
REMARKS
FUNCTION
CODE <EM>
HEX
REMARKS
Control peripheral device #1
07
Executes drive pulse for peripheral device #1.
Control peripheral device #1 immediately
1C
Executes drive pulse for peripheral device #1 immediately.
Control peripheral device #2 immediately
19
Drives peripheral device #2. The drive pulse width and delay time
are fixed at 200 ms.
STAR MODE
FUNCTION
CODE<SUB>
HEX
REMARKS
Control peripheral device #2 immediately
1A
Drives peripheral device #2. The drive pulse width and delay time
are fixed at 200 ms.
– 51 –
Commands to Control Auto Cutter
FUNCTION
CODE<ESC> “d”“0”or <ESC> “d”<0>
HEX
REMARKS
FUNCTION
STAR MODE
CODE<ESC> “d”“1”or <ESC> “d”<1>
HEX
REMARKS
Full-cut command to the auto cutter
1B6430or1B6400
Cuts the paper fully when memory switch 2-C is set to 0. If memory
switch 2-C is set to 1, the paper is fed to 18 mm and cut fully.
When auto cutter is invalid, this command is not valid.
Partial-cut command to the auto cutter
1B6431or1B6401
Cuts the paper partially when memory switch 2-C is set to 0. If
memory switch 2-C is set to 1, the paper is fed to 18 mm and cut
partially.
– 52 –
Other Commands
FUNCTION
CODE<CAN>
HEX
REMARKS
Cancel last line & Initialize printer
18
Clears the line buffer, and initializes the commands set already.
Does not affect the external equipment drive conditions set by the
code <ESC> <BEL> n1 n2. (This is the same during a mechanical
error.)
(Line buffer means the print data expansion area.)
FUNCTION
CODE<DC3>
HEX
REMARKS
Deselect printer
13
Deselects the printer. The printer disregards all subsequent characters and commands except <DC1>, which activates the printer.
FUNCTION
CODE<DC1>
HEX
REMARKS
Set select mode
(11)H
When the printer receives a <DC1> code, the deselect mode is
canceled and data following this code is input to the buffer.
STAR MODE
FUNCTION
CODE <RS>
HEX
REMARKS
Beep the buzzer
1E
Sounds a brief beep tone.
– 53 –
FUNCTION
CODE
HEX
REMARKS
STAR MODE
Set memory switch
<ESC> “#N,n1n2n3n4” <LF> <NUL>
1B23N2C n1n2n3n40A00
Set the memory switch. In order to enable changed memory switch
setting, turn the printer OFF and ON again or send printer reset
command (<ESC> “?”) to the printer. Changed memory switch
settings are stored in EEPROM and these setting will be stored as
long as the time when they are changed again.
N:Memory switch number (0, 1, 2, 3, 4)
n1n2n3n4 :Mode settings (For details see below)
Setting
Buffer size
Busy conditions
Data receive error
(Default)
0
Cut
Invalid
(TSP212)
Invalid
(Default)
0
Normal
48
Invalid
4
1
IBM
38
Invalid
3
(Default)
0
4 Kbytes
See 4-3-1 RS-232C Interface
Print “?”
Paper feed
& cut
Valid
(TSP242)
Valid
Katakana
–
Same as
<LF>
4
45 bytes
Ignore
1
IBM
–
Same as
<LF>
3
1
: Available
ESC/POS
Star
–
–
: Available
Star2
: Available
ESC/POSStar
–
–
ESC/POS
–
–
–
STAR MODE
3
FUNCTION
Initialize printer
CODE<ESC> “@”
HEX
REMARKS
1B40
Reinitializes the printer. Clears the print buffer and returns settings
to their power-up values.
Does not clear the input buffer, downloaded characters, or conditions for peripheral devices.
FUNCTION
CODE<ENQ>
HEX
REMARKS
Enquiry
05
Causes the printer to transmit a status byte.
– 55 –
Status byte
STAR MODE
b7 b6 b5 b4 b3 b2 b1 b0
0
Constantly
set at “0”Vertical Parity error
1 : error
Framing error
1 : error
Mechanical error
1 : error
Paper empty
1 : empty
Buffer empty
1 : empty
Buffer overflow
1 : overflow
Compulsion switch
High level
(Switch is set to ON)
FUNCTION
Reset the printer hardware.
CODE<ESC> “?” <LF><NUL>
HEX
REMARKS
1B3F0A00
Resets the printer hardware.
– 56 –
9. CONTROL CODES/ESC/POS MODE
Control CodeHexadecimal CodeFunction
HT09Horizontal tab
LF0APrint line feed
FF0CPage mode print and return
DLE EOT1004Real time transmission of status
DLE ENQ1005Real time request to printer
CAN18Cancel print data in page mode
ESC FF1B FFPrint page mode data
ESC SP1B 20Set right space amount of character
ESC !1B 21Universal print mode designation
ESC #1B 23Set memory switch
ESC $1B 24Designate absolute printing
ESC %1B 25Designate/cancel download character set
ESC &1B 26Define download characters
ESC
*
ESC -1B 2DDesignate/cancel underline
ESC 21B 32Set 1/6 inch line feed amount
ESC 31B 33Set line feed amount
ESC =1B 3DSelect peripheral equipment
ESC ?1B 3FDelete download characters
ESC @1B 40Initialize printer
ESC D1B 44Set horizontal tab position
ESC E1B 45Designate/cancel emphasized print
ESC G1B 47Designate/cancel double print
ESC J1B 4APrint and paper feed
ESC L1B 4CSelect page mode
ESC R1B 52Select international characters
ESC S1B 53Select standard mode
ESC T1B 54Select character print direction in print mode
ESC V1B 56Designate/cancel 90° character rotation
ESC W1B 57Set print range in page mode
ESC \1B 5CDesignate relative position
ESC a1B 61Align position
ESC c41B 6334Select no valid paper detector at print stop
ESC c51B 6335Enable/disable panel switch
ESC d1B 64Print and paper feed “n” lines
ESC i1B 69Partial cut (one section remaining)
ESC p1B 70Designate pulse generation
ESC t1B 74Select character code table
1B 2ADesignate bit image mode
ESC/POS
– 57 –
ESC u1B 75Transmission of peripheral equipment status
ESC v1B 76Transmission of paper detection status
ESC {1B 7BDesignate/cancel inverted printing
GS !1D 21Designate character size
GS $1D 24Designate absolute position of vertical direction of
GS
GS /1D 2FPrint download bit image
GS :1D 3AStart/finish macro definition
GS B1D 42Designate/cancel reverse printing
GS H1D 48Select print position of HRI characters
GS I1D 49Printer ID transmission
GS L1D 4CSet left margin
GS P1D 50Set basic calculated pitch
GS V1D 56Paper cut
ESC/POS
GS W1D 57Set print range
GS \1D 5CDesignate the relative position of vertical characters when
GS ^1D 5EExecute macro
GS a1D 61Enable/disable automatic status transmission
GS f1D 66Select HRI character font
GS h1D 68Set bar code height
GS k1D 6BPrinting of bar code
GS r1D 72Transmission of status
GS w1D 77Set lateral size of bar code
Control CodeHexadecimal CodeFunction
characters in page mode
*
1D 2ADefine download bit image
printing in the page mode
– 58 –
Star Mode
10. CHARACTER CODE TABLES
Hexa-
decimal
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
01234567
<NUL>SP0@P`p
0 163248648096112
<DC1>!1AQaq
1 173349658197113
<DC2>”2BRbr
2 183450668298114
<DC3>#3CScs
3 193551678399115
<DC4>$4DTdt
4 2036526884100116
<ENQ>%5EUeu
5 2137536985101117
&6FVfv
6 2238547086102118
<BEL>’7GWgw
7 2339557187103119
<CAN>(8HXhx
8 2440567288104120
<HT><EM>)9IYiy
9 2541577389105121
<LF><SUB>*:JZjz
102642587490106122
<VT><ESC>+;K[k{
112743597591107123
<FF><FS>,<L\l|
122844607692108124
<CR>–=M]m}
132945617793109125
<SO><RS>.>N^n~
143046627894110126
<SI>/?O_o
153147637995111127
– 59 –
Star Mode
(Character table: Normal)
Hexa-
decimal
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
89ABCDEF
Ä
128144160176192208224240
Ö
129145161177193209225241
Ü
130146162178194210226242
éù
è
eû°
uâ
ßêç°C
131147163179195211227243
§ï¿°F
132148164180196212228244
133149165181197213229245
134150166182198214230246
ª
º
íNΩ
ìnµ
fE∑
135151167183199215231247
¢îσ
136152168184200216232248
1
/
2
137153169185201217233249
N
138154170186202218234250
139155171187203219235251
T
T
X
öix
ó
Å
òX
¥oθ∞
140156172188204220236252
1
/
4
141157173189205221237253
Aüá÷
142158174190206222238254
ôä±
ëúàπ
143159175191207223239255
a
TL
– 60 –
Star Mode
(Character table: katakana)
– 61 –
Star Mode
(Character table: IBM)
Hexa-
decimal
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
89ABCDEF
Ç Éáα≡
128144160176192208224240
üæíβ±
129145161177193209225241
éÆóΓ≥
130146162178194210226242
âôúπ≤
131147163179195211227243
äöñ∑
132148164180196212228244
àò
133149165181197213229245
åû
134150166182198214230246
çù
135151167183199215231247
Ñ
ª
º
êÿ¿Φ°
136152168184200216232248
ë
è
ïδ
î£∞
Ì
Ä
Å
Ö
137153169185201217233249
Ü
138154170186202218234250
1
/
139155171187203219235251
140156172188204220236252
2
1
/
4
¥i
141157173189205221237253
P
t
142158174190206222238254
«∈
ƒ»∩
143159175191207223239255
σ
µ÷
τ≈
Θ
Ω–
∩
2
– 62 –
Star Mode
International Character Set
35 36 64 91 92 93 94 96 123 124 125 126
U. S. A.#$@[\]ˆ`{|}
France#$à°ç§ˆ`éùè¨
Germany#$§ÄÖ܈`äöüß