The TSP400 series is ideal for printing text, bar code and graphics.
The TSP400 series has the following features:
1. extremely quiet and fast printing (50 mm/sec.) using the direct line thermal
printing method
2. a straight paper path, which prevents paper jams and is ideal for label printing
3. support for many bar code types
(UPC, JAN/EAN-8, JAN/EAN-13, CODE 39, IFT 2 OF 5, CODE 128, CODE
93, NW-7)
4. a black mark sensor that detects the top of the page
5. a transmissive sensor that detects the gap between labels (no black mark is
necessary)
6. a large-diameter (115 mm) roll
7. a wide selection of interchangeable interfaces (RS232C, Centronics Parallel,
RS422A)
8. an installed heavy-duty and reliable cutter (TSP442 only)
9. enclosed utility software (TSPLABEL) that makes it easier to design and print
bar code labels
10.a memory switch that enables a wide selection of printer default settings and
easy setup using the enclosed utility software (TSPSETUP)
The printer has two different software modes which can be selected using the
memory switch. In order to enable changed memory switch settings, turn the
printer OFF and ON again or send printer reset command (<ESC>“?”) to the
printer.
(Factory setting: Page Mode)
Page Mode:
Code<ESC>“#0,0000”<LF><NUL>
Hex1B23 30 2C 30 30 30 300A00
Ideal for bar code label, graphics and text data printing.
Can locate and rotate bar code and text. Accepts a non-compressed BMP file so
that the printer can import and print a BMP file which is scanned or edited in
Windows applications.
– 1 –
Line Mode:
Code<ESC>“#0,0001”<LF><NUL>
Hex1B23 30 2C 30 30 30 310A00
This mode is compatible with Star Receipt printers, such as the SP300 and SP200
series.
For improvement purposes, the descriptions and specifications in this manual are
subject to change without notice.
– 2 –
2. MEMORY SWITCH AND DIP SWITCH
Functional settings are made using the printer’s EEPROM memory switches and
the DIP switches located on the interface board.
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 7 and 8".
The factory settings are shown in the table below.
For the detailed functions and the settings of theDIP switches, please refer to
"Installation manual".
– 3 –
3. DISPLAY PANEL AND FUNCTIONS
3-1. LED
LEDFunction
POWERLights up when the printer is turned on
HEAD UP
NO PAPERLights up when an error occurs (Refer to 6-1 Errors.)
ERROR
ON LINELights up when the printer is on line; goes off when the printer
is off line; lights up when the head temperature is too high
3-2. Switches
SwitchFunction
ON LINESwitches between on line and off line
FEEDEnable starting position: Feeds the paper to the next starting
position
Disable starting position: Feeds the paper while pressed
3-3. Power switch and ON LINE/FEED switch combinations
The following can be set when the power switch is turned on.
1) Power + FEED switches
1 short beep… Test print
HEAD UP LED lights up
2) Power + ON LINE switches
Approx. 2 sec.Approx. 2 sec.
1 short beep…2 short beeps…3 short beeps…
abc
HEAD UP LEDNO PAPER LEDERROR LED
lights uplights uplights up
Pause at a: HEX dump
Pause at b: sensor selection
Press ON LINE1 short beepReflecting sensor
Press FEED2 short beepsTransmissive sensor
– 4 –
Pause at c: command mode selection
Press ON LINE1 short beepPage mode
Press FEED2 short beepsLine mode
3) Power + ON LINE + FEED switches
Approx.Approx.Approx.Approx.
2 sec.2 sec.2 sec.2 sec.
1 short beep … 2 short beeps … 3 short beeps … 1 long beep ……
abcde
HEAD UPNO PAPERERRORLEDs flash All LEDs
LEDLEDLEDsuccessivelylight up
lights uplights uplights uplights up
Pause at a: RAM backup cleared
Pause at b: feed function selection
Press ON LINE1 short beepDisable starting position
Press FEED2 short beepsEnable starting position
Pause at c: sensor adjustment mode
Pause at d: no operation
Pause at e: clearing of all memory switches and test print
3-4. Sensor adjustment mode
a) Reflecting sensor (black mark sensor)
• Insert the paper in front of the sensor mechanism so that the sensor is not
positioned at a black mark.
• Turn the reflecting sensor adjustment controller VR4 on the PCB until the
HEAD UP LED lights up.
b) No paper sensor
• Insert the paper in front of the sensor mechanism so that the sensor is not
positioned at a black mark.
• Turn the reflecting sensor adjustment controller VR3 on the PCB until the NO
PAPER LED lights up.
c) Transmissive sensor
• Insert only the label’s base paper in front of the sensor mechanism.
• Turn the reflecting sensor adjustment controllers VR1 and VR2 on the PCB
until the ERROR LED lights up.
• VR1 is used for coarse adjustment and VR2 is used for fine adjustment.
– 5 –
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)
RS-422A.....................Mark = Logic “1” (“A” negative with respect to
“B” by at least 0.2V: A B – 0.2V)
Space = Logic “0” (“A” positive with respect to
“B” by at least 0.2V: A B + 0.2V)
Handshaking .........................DTR or XON/XOFF mode (Selected by DIP
switch)
SERIAL
Mark [1]
Space [0]
b0b1b2b3b4b5b6(b7)
ABCD
A: Start bit
B: Data bits
C: Vertical parity bit
D: Stop bit
– 6 –
4-2. Interface Circuit
4-2-1. RS-232C Interface
SERIAL
Input (RXD, CTS)
PrinterHost computer
Output (DTR, FAULT, TXD, RCH, RTS)
PrinterHost computer
75188 or equivalent
4-2-2. RS-422A Interface
Input (RD, RS)
PrinterHost computer
A
B
Output (SD, CS)
PrinterHost computer
A
B
– 7 –
4-3. Connectors and Signal Names
131
25
14
4-3-1. RS-232C Interface
Pin noSignal name
1F-GND–Frame ground
2TXDOUTOutgoing data
3RXDINIncoming data
4RTSOUTRequest To Send: The printer sets this signal
5CTSINThe host sets this signal to “SPACE” when it
6N/CNot used
7S-GND–Signal ground
8N/CNot used
9 ~ 10N/CNot used
11RCHOUTThe printer sets this signal to “SPACE” when
12N/CNot used
13S-GND–Signal ground.
14FAULTOUTThe printer sets this signal to “MARK” to
15
16
Multi-Printer TXD
Multi-Printer DTR
17 ~ 19N/CNot used
20DTROUTData Terminal Ready: The printer sets this
21 ~ 22N/CNot used
23 ~ 25N/CNot used
Direction
Function
to “SPACE” when it is ready to send.
is ready to send. NOTE: The printer does not
monitor this signal.
it is ready to receive. This pin outputs the
same signal as pin 20, to which it is connected.
indicate an error condition (machine error, no
paper, etc.).
OUTDiode gate TXD
OUTDiode gate DTR
signal to “SPACE” when it is ready to re-
ceive.
SERIAL
– 8 –
4-3-2. RS-422A Interface
SERIAL
Pin noSignal name
9SD(+)OUT
10SD(–)OUT
17RD(+)IN
18RD(–)IN
19CS(+)IN
23CS(–)IN
24RS(+)OUT
25RS(–)OUT
Direction
Function
These pins carry data from the printer.
These pins carry data to the printer.
The host sets this signal to “SPACE” when it
is ready to send.
NOTE: The printer does not monitor this
signal.
The host sets this signal to “SPACE” when it
is ready to receive.
NOTE: The printer does not monitor this
signal.
The printer sets this signal to “SPACE” when
it is ready to receive.
The printer sets this signal to “SPACE” when
it is ready to receive.
– 9 –
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]
[RS-422A]
Printer #n
RD
SD
Printer sideIBM PC side
F-GND
TXD
RXD
RTS
CTS
S-GND
FAULT
DTR
1
2
3
4
5
7
14
20
Printer sideHost side
17
18
9
10
Twisted pair cable
SERIAL
F-GND
1
TXD
2
RXD
3
RTS
4
CTS
5
DSR
6
S-GND
7
DCD
8
DTR
20
SD
RD
Printer #n+1
RD
SD
17
18
9
10
– 10 –
4-5. Data Protocol
4-5-1. DTR/DSR mode
SERIAL
This mode is accessed when the DIP switch 1-3 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”
Nearly emptyEmpty
256 bytes
DTR
“SPACE”
– 11 –
■ 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.
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.
– 12 –
4-5-2. X-ON/X-OFF mode
This mode is accessed when DIP switch 1-3 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.
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, 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.
– 13 –
Nearly emptyEmpty
256 bytes
Pinter outputs
X-ON.
4-5-3.STX-ETX mode
This mode is accessed from whichever DTR mode or XON/XOFF mode.
To set this mode, the data buffer must be empty.
The host computer sends an ENQ code to the printer and acknowledges the printer
status. Then, the host computer checks if the printer buffer is empty. After the host
computer detects that the buffer is empty, a STX code and data are transmitted.
After 1 block of data is transmitted, the host computer sends an ENQ code to the
printer and then receives the printer status and check byte (horizontal parity for
the printer).
At this point, the host computer performs a status and horizontal parity check.
When the host computer determines that there was no error, it transmits an ETX
code which serves as text end code. After the printer receives the ETX code, data
in the data buffer is printed out. If an error occurs, a CAN code is transmitted by
the host computer. (In this instance, the data which was previously sent to the
buffer is cleared, thus, the host computer must retransmit the same data to the
printer.)
A flowchart of this operation is shown on the next page.
SERIAL
– 14 –
SERIAL
Starts the
STX-ETX mode.
Sends an ENQ signal.
Sends ENQ
Receives status byte.
NO
Is the data buffer
empty?
YES
Sends STX signal
Is an odd parity
check?
YES
(FF) H is set for the text
byte.
Acquires the exclusive OR of the content
of the text byte and the data to sent, then
it is used as the content of the test byte.
NO
The test byte is set at (0)H.
Receives status signal.
Receives a check byte.
Is the status an
error?
Horizontal
parity check
Ends the
STX-ETX mode.
NO
Check byte =
test byte?
YES
Sends ETX
(Printing)
YES
NO
Sends CAN
Transmits the data to
the printer.
NO
Is this the last data in
a block?
YES
Check byte:
Horizotal parity of the printer.
Test byte:
Horrizontal parity of the host
computer.
– 15 –
Is there a data block in
the STX-ETX mode?
YES
NO
RET
4-6. Error Status
Page Mode
During Label-Mode operation, the printer sends the following statuses to the host.
The printer outputs the “Printing in progress” status only upon receipt of a status
request command. The printer issues the “Printing finished” status when printing
finishes, but never in response to a status request command. All other statuses are
issued both when the event occurs and upon request.
A “system error” indicates one of the following: 1 cutter error, 2 communication error, or 3 command error.
Compulsion switch
High level
(Switch is set to ON)
■ Compulsion switch
When pin 6 of the peripheral unit drive circuit connector is set “high”, status bit
7 becomes “1”.
TUP400 Only
b7b6b5b4b3b2b1b0
0
Constantly
set at “0”
– 17 –
01
Constantly
set at “1”
Constantly
set at “0”
Inside near-end sensor
1: Near-end
Paper empty
1 : empty
Outside near-end sensor
1: Near-end
Presenter paper jam error
1: Paper jam error
Presenter no paper sensor
1: Paper is installed.
5. PARALLEL INTERFACE
5-1. Interface Specifications
1 Interface:Conforms with Centronics parallel interface standard
2 Data transfer speed:1000 ~ 6000 CPS
3 Synchronization:External strobe pulse
4 Handshaking:Using ACK and BUSY
5 Logic level:TTL-level compatible
5-2. Interface Timing
A C K
DATA
STROBE
BUSY
PARALLEL
Approx. 9ms
TTT
T: At least 0.5ms
– 18 –
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
– 19 –
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.
The printer holds this signal “HIGH”
during any of the following conditions.
1 While data entry is in progress
2 While printer is offline
3 While error condition exists
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
– 20 –
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.)
Note that Page Mode does not support external-device drive commands. Drive
commands are available only in Line Mode.
Use cables which meet the following specifications.
1. Use the modular plug as shown in Figure 1.
2. Separate ground wire is required for Europe only.
3. Use if the printer is to be used in Europe, the noise filter and the cable should
be separate, as shown in Figure 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.
Distance within 5cm.
Noise filter
( Ferrite-ring enclosed
to printer package. )
Ground wire
1 turn
Figure 6-2. Separate ground wire and noise filter are required for Europe.
– 21 –
■ 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
– 22 –
6-1. Errors
The various types of errors can be identified by the buzzer’s sound and the lit
LEDs or the test print result.
Buzzer: The circled numbers refer to the type of buzzer sound.
LED: The circle (
a) Recoverable errors
The printer goes off line (ON LINE LED goes off) when these errors occur.
After the cause of the error is removed, operation of the printer should return after
the ON LINE switch is pressed.
) indicates that the LED is lit up.
ErrorCauseBuzzer
Head up errorThe head is up.2
No paper errorPaper is not installed.3
Label size error
The paper size differs from
the set size.
4
ERROR
LED
HEAD UP
NO PAPER
b) Unrecoverable errors
The printer goes off line (ON LINE LED goes off) when these errors occur.
Operation of the printer cannot be returned after the cause of the error is removed.
ErrorCauseBuzzer
CommandThere is an error in the
error*1command.
Cutting errorThe paper was not cut
properly.
TransmissionThere is an abnormality in
error*2the received data.
*1 Only in page mode
*2 Only with the serial interface
If a framing error or a vertical parity error occurs in Line Mode, “?” is printed.
5
5
5
ERROR
LED
HEAD UP
NO PAPER
c) Other errors (only in page mode)
• Data errors (<ESC> “PC” command: defines character and bar code data)
A data error will occur if an invalid character or bar code type is selected or
if the print result extends outside the print area. When a data error occurs, all
commands become invalid (character strings and bar codes cannot be printed).
However, the printer will not go off line and the LEDs will not light up.
– 23 –
7. CONTROL CODES/PAGE MODE
7-1. General Flow for Programming the Page Mode ................................... 25
7-4. Appendix: How to set various bar codes............................................... 50
7-5. Sample Program .................................................................................... 58
PAGE MODE
– 24 –
7-1. General Flow for Programming the Page Mode
START
PAGE MODE
Set Memory Switches
(if necessary)
Clear Format (if necessary)
Define Print Area (page length)
Define Ruled Line
Format Define Character String Format
Define Bar Code Format
Enable Cutter (if installed)
Set Character String Data
Set Bar Code Data
Copy BMP graphic file
Print Label
<ESC> "#"
<ESC> "C"
<ESC> "D"
<ESC> "L"
<ESC> "PC"
<ESC> "PB"
<ESC> "B"
<ESC> "RC"
<ESC> "RB"
<ESC> "H"
<ESC> "I"
Yes
Yes
Re-print same label?
No
Change character and/or bar code data and print?
Use same format settings
No
END
– 25 –
7-2. Command Summary
The printer has the following control commands. Each control code starts with
<ESC> code and ends with <LF> <NUL> codes, except for the Request status
command <ENQ> and the Call Download Character command <ESC> “G”.
Format Definition
Control codes
<ESC> “C”<LF> <NUL>
<ESC> “D n1n2n3n4” <LF>