You are on page 1of 111

PTM01F01

PTM01P01
MTP CONTROL CPU
TECHNICAL REFERENCE
U00026712050

Seiko Instruments Inc.


MTP CONTROL CPU TECHNICAL REFERENCE

Document Number U00026712050

First Edition August 1999

Copyright 1999 by Seiko Instruments Inc.


All rights reserved.

Seiko Instruments Inc. (SII) has prepared this manual for use by SII personnel, licensees, and customers.
The information contained herein is the property of SII and shall not be reproduced in whole or in part
without the prior written approval of SII.

SII reserves the right to make changes without notice to the specifications and materials contained herein
and shall not be responsible for any damages (including consequential) caused by reliance on the
materials presented, including but not limited to typographical, arithmetic, or listing errors.

SII is a trademark of Seiko Instruments Inc.


PREFACE

This reference manual describes the specifications and functions of the control CPU driving the MTP
series microthermal printers. Read this reference manual thoroughly before using the CPUs.

SII has not investigated the intellectual property rights of the sample circuits included in this manual.
Fully investigate the intellectual property rights of these circuits before using.

iii
iv
TABLE OF CONTENTS

Section Page

CHAPTER 1 OVERVIEW

1.1 FEATURES................................................................................................................... 1-1


1.2 TERMINOLOGY ........................................................................................................... 1-2

CHAPTER 2 GENERAL SPECIFICATIONS

2.1 SPECIFICATIONS........................................................................................................ 2-1


2.1.1 Common Specifications................................................................................... 2-1
2.1.2 Mode 0 Specifications...................................................................................... 2-2
2.1.3 Mode 1 Specifications...................................................................................... 2-2
2.1.4 Mode 2 Specifications...................................................................................... 2-3
2.2 THERMAL PAPER ....................................................................................................... 2-4

CHAPTER 3 PIN DESCRIPTION

3.1 CPU PIN DESCRIPTION.............................................................................................. 3-1


3.2 FLAT TYPE (PTM01F01) PIN DESCRIPTION............................................................. 3-3
3.3 DIP TYPE (PTM01P01) PIN DESCRIPTION ............................................................... 3-4

CHAPTER 4 CONTROL FUNCTION

4.1 INITIALIZATION ........................................................................................................... 4-1


4.2 FUNCTION PINS.......................................................................................................... 4-2
4.2.1 Command Mode Selection .............................................................................. 4-2
4.2.2 Mechanism Type Selection.............................................................................. 4-3
4.2.3 Initial Function Selection.................................................................................. 4-4
4.2.4 Communication Function Selection ................................................................. 4-5
4.3 TEST PRINTING .......................................................................................................... 4-6
4.3.1 Test Print Execution......................................................................................... 4-6
4.3.2 Test Print Flow................................................................................................. 4-6
4.4 EEPROM COMMUNICATION ...................................................................................... 4-8
4.4.1 Fonts................................................................................................................ 4-8
4.4.2 Character Spacing ........................................................................................... 4-8
4.4.3 EEPROM Initialization Immediately Following Installation............................... 4-8
4.5 MOTOR DRIVE AND PRINTING ................................................................................. 4-9
4.6 PRINT CONDITIONS ................................................................................................... 4-12

iv
Section Page

4.7 THERMAL PRINT HEAD DRIVE .................................................................................. 4-13


4.7.1 Control Method ................................................................................................ 4-13
4.7.2 Head Pulse Width Setting................................................................................ 4-14
4.8 ERROR MODE ............................................................................................................. 4-17
4.8.1 Error Conditions ............................................................................................... 4-17
4.8.2 Error Processing .............................................................................................. 4-17
4.8.3 Error Status Elimination ................................................................................... 4-17

CHAPTER 5 HARDWARE SPECIFICATIONS

5.1 ELECTRICAL CHARACTERISTICS............................................................................. 5-1


5.1.1 Absolute Maximum Ratings ............................................................................. 5-1
5.1.2 Operating Ranges............................................................................................ 5-2
5.1.3 Electrical Characteristics.................................................................................. 5-2
5.2 POWER CONNECTION ............................................................................................... 5-4
5.3 CPU PERIPHERAL CIRCUITS..................................................................................... 5-5
5.3.1 Reset Circuit .................................................................................................... 5-5
5.3.2 Oscillator Circuit............................................................................................... 5-6
5.4 FUNCTION PIN CIRCUIT............................................................................................. 5-8
5.5 PRINTER CONTROL CIRCUITS ................................................................................. 5-9
5.5.1 Motor Control Circuit ........................................................................................ 5-9
5.5.2 Head Control Circuit......................................................................................... 5-10
5.5.3 Tachogenerator Waveform Shaping Circuit .................................................... 5-11
5.5.4 Home Switch Circuit......................................................................................... 5-11
5.6 TEMPERATURE/VOLTAGE COMPENSATION CIRCUIT........................................... 5-12
5.7 INTERFACE CIRCUITS................................................................................................ 5-13
5.7.1 Parallel Input/Output Control Circuit ................................................................ 5-13
5.7.2 Serial Input/Output Control Circuit ................................................................... 5-16
5.7.3 EEPROM Connection Circuit ........................................................................... 5-19
5.8 OTHER CIRCUITS ....................................................................................................... 5-23
5.8.1 Switch Circuit ................................................................................................... 5-23
5.8.2 Paper Sensor Circuit........................................................................................ 5-24
5.8.3 Display Circuit .................................................................................................. 5-25
5.9 OPERATION TIMING ................................................................................................... 5-26
5.9.1 Immediately Following Reset ........................................................................... 5-26
5.9.2 Software Standby Mode................................................................................... 5-28

CHAPTER 6 PACKAGING

CHAPTER 7 SAMPLE CIRCUIT DIAGRAM

v
Section Page

CHAPTER 8 IMPLEMENTATION CONSIDERATIONS

8.1 SOLDERING CONDITIONS (FOR FLAT TYPE CPU) ................................................. 8-1


8.2 STORAGE CONDITIONS (FOR FLAT TYPE CPU) .................................................... 8-3
8.3 CLEANING CONDITIONS............................................................................................ 8-3
8.4 MECHANICAL AND THERMAL STRESS .................................................................... 8-4

CHAPTER 9 SOFTWARE SPECIFICATION

9.1 MODE 0 ........................................................................................................................ 9-1


9.1.1 Character Codes and Commands ................................................................... 9-1
9.1.2 Command Description ..................................................................................... 9-2
9.2 MODE 1 ........................................................................................................................ 9-13
9.2.1 Character Codes and Commands ................................................................... 9-13
9.2.2 Command Description ..................................................................................... 9-13
9.3 MODE 2 ........................................................................................................................ 9-17
9.3.1 Character Codes and Commands ................................................................... 9-17
9.3.2 Command Description ..................................................................................... 9-17

CHAPTER 10 CHARACTER CODES

10.1 FONT STRUCTURE..................................................................................................... 10-1


10.1.1 Font Structure 1 ............................................................................................... 10-1
10.1.2 Font Structure 2 ............................................................................................... 10-2
10.1.3 Font Structure 3 ............................................................................................... 10-3
10.2 TYPE OF CHARACTER ............................................................................................... 10-4
10.2.1 Mode 0............................................................................................................. 10-4
10.2.2 Mode 1............................................................................................................. 10-10
10.2.3 Mode 2............................................................................................................. 10-14

APPENDIX A COMMAND INDEX

vi
TABLE

Table Page

2-1 Common Specifications ................................................................................................ 2-1


2-2 Mode 0 Specifications................................................................................................... 2-2
2-3 Mode 1 Specifications................................................................................................... 2-2
2-4 Mode 2 Specifications................................................................................................... 2-3
2-5 Recommended Thermal Paper..................................................................................... 2-4

3-1 CPU Pin Definitions ...................................................................................................... 3-1

4-1 EEPROM Initial Recognition ......................................................................................... 4-1


4-2 Function Pin Assignment .............................................................................................. 4-2
4-3 Command Mode Selection............................................................................................ 4-2
4-4 Mechanism Type Selection (Character Printer) ............................................................ 4-3
4-5 Mechanism Type Selection (Graphic Printer) ............................................................... 4-3
4-6 Initial Function Selection ............................................................................................... 4-4
4-7 Communication Function Selection .............................................................................. 4-5
4-8 Baud Rate Selection ..................................................................................................... 4-5
4-9 Oscillation Frequency Adjustment ................................................................................ 4-14
4-10 Energy Applied to Thermal Print Head ......................................................................... 4-16
4-11 Head Resistance Ranking ............................................................................................ 4-16

5-1 Absolute Maximum Ratings .......................................................................................... 5-1


5-2 Operating Range Characteristics.................................................................................. 5-2
5-3 Electrical Characteristics............................................................................................... 5-2
5-4 Allowable Current.......................................................................................................... 5-3
5-5 Power Pin Connection................................................................................................... 5-4

6-1 CPU Dimensions........................................................................................................... 6-1

7-1 Parts List ....................................................................................................................... 7-1

10-1 Alphanumeric and Japanese kana Character Codes ................................................... 10-5


10-2 Extended Graphics Character Set Codes..................................................................... 10-6
10-3 International Character Codes ...................................................................................... 10-7
10-4 Special Character Codes .............................................................................................. 10-8
10-5 Zero Font Code............................................................................................................. 10-9
10-6 Alphanumeric and Japanese kana Character Codes ................................................... 10-11
10-7 International Character Codes ...................................................................................... 10-12
10-8 Special Character Codes .............................................................................................. 10-13
10-9 Alphanumeric and Japanese kana Character Codes ................................................... 10-15

vii
FIGURES

Figures Page

3-1 PTM01F01 Pin Configuration ....................................................................................... 3-3


3-2 PTM01P01 Pin Configuration ....................................................................................... 3-4

4-1 Test Print Sample 1 ...................................................................................................... 4-7


4-2 Test Print Sample 2 ...................................................................................................... 4-7
4-3 Print Start Timing and Character Print Timing Chart .................................................... 4-10
4-4 Continuous Printing Timing Chart................................................................................. 4-11
4-5 Thermal Print Head Pulse Width and Oscillator Output ............................................... 4-13

5-1 Sample Reset Circuit .................................................................................................... 5-5


5-2 Oscillator Circuit............................................................................................................ 5-6
5-3 Sample Oscillator Configuration ................................................................................... 5-7
5-4 Sample Function Pin Circuit (SW1, SW2) .................................................................... 5-8
5-5 Sample Function Pin Circuit (SW3) .............................................................................. 5-8
5-6 Sample Motor Drive Circuit........................................................................................... 5-9
5-7 Sample Head Control Circuit ........................................................................................ 5-10
5-8 Sample Tachogenerator Waveform Shaping Circuit .................................................... 5-11
5-9 Sample Home Switch Circuit ........................................................................................ 5-11
5-10 Sample Temperature/Voltage Compensation Circuit ................................................... 5-12
5-11 Parallel Data Input/Output Timing................................................................................. 5-14
5-12 Sample Parallel Input/Output Circuit............................................................................. 5-14
5-13 Data Input/Output Timing Using the Sample Circuit..................................................... 5-15
5-14 Serial Data Input/Output Timing ................................................................................... 5-17
5-15 RS-232C Level Conversion Circuit ............................................................................... 5-18
5-16 EEPROM Data Input/Output Timing (Write) ................................................................. 5-20
5-17 EEPROM Data Input/Output Timing (Read) ................................................................. 5-21
5-18 Sample EEPROM Connection Circuit........................................................................... 5-22
5-19 Sample Switch Circuit................................................................................................... 5-23
5-20 Sample Paper Sensor Circuit ....................................................................................... 5-24
5-21 Sample Display Circuit.................................................................................................. 5-25
5-22 Operation Timing Immediately Following Reset ........................................................... 5-27
5-23 Software Standby Mode Transition Timing................................................................... 5-28
5-24 Software Standby Mode Return Timing........................................................................ 5-28

6-1 Flat type (PTM01F01) CPU Dimensions ...................................................................... 6-2


6-2 DIP type (PTM01P01) CPU Dimensions ...................................................................... 6-2

7-1 Sample Circuit .............................................................................................................. 7-2

8-1 Recommended Infrared Reflow Profile......................................................................... 8-2


8-2 Recommended Vapor Phase Reflow Profile ................................................................ 8-2

10-1 Print Sample ................................................................................................................. 10-9

viii
CHAPTER 1

OVERVIEW

1.1 FEATURES

Supports all twelve models of the MTP series character and graphic printers.

Has software modes compatible with those of earlier models (MTPI-CN, CC, GNP, GNS).

Download characters can be printed when the EEPROM has been connected.

Accepts both parallel and serial input.

Provides double-width printing, character spacing control, and inversion (flip) printing.

Provides various fonts including alphanumeric and Japanese kana characters, an extended
graphics character set, international characters, and special characters.

Can print all input data as bit image data.

1-1
1.2 TERMINOLOGY

Dot
A character or bit image is composed of picture elements called dots. A dot corresponds to one of
the serial thermal head elements.

Character spacing
The space between two characters in the direction perpendicular to the paper feed direction.

Input buffer
The memory inside the interface for storing the data (characters and commands) received from
the host device. The command is executed at the time when fetching from the input buffer. The
characters are fetched from the input buffer and stored in the line buffer. The capacity of the input
buffer is 120 bytes.

Line buffer
The memory for storing one line of character data fetched from the input buffer. When the input
buffer is filled with character data or the printing conditions are made valid through a command,
the data in the input buffer is printed.

Line buffer full print


The printing executed when the data in the line buffer exceeds on line. The overflowing data is
stored at the beginning of the next line.

Font
The form of a character. A character is composed of dots in a group. The user can define a font
using the download font, etc., if the EEPROM has been connected.

EEPROM
Non-volatile semiconductor memory (memory information is retained even if the power is turned
off). Using this memory, you can write and erase electrically. CMOS type serial EEPROM is
available for this CPU.

1-2
CHAPTER 2

GENERAL SPECIFICATIONS

2.1 SPECIFICATIONS

2.1.1 Common Specifications

The common specifications of this CPU are listed in Table 2-1.

Table 2-1 Common Specifications

Item Specifications
Print method Thermal serial dot printing
Print direction Left to right in relation to the paper feed direction
Operating voltage range (VCC) 5 V 10 %
Operating frequency 4.91 MHz 0.5 % (25 C)
Current consumption*
during operation 25 mA max.
during standby 5 A max.
* Vih min=VCC-0.5 V, Vil max=0.5 V,
When all output pins are without a load and input pull-up MOS is off.

The following command modes can be selected using the function pins.

Mode 0: Contains the most functions. Download characters can be used if the EEPROM has been
connected.
Mode 1: MTPI-GNP, GNS compatible mode
Mode 2: MTPI-CN, CC compatible mode

2-1
2.1.2 Mode 0 Specifications

The mode 0 specifications of this CPU are listed in Table 2-2.

Table 2-2 Mode 0 Specifications

Item Specifications
Applicable model MTP series character and graphics printers, 12 models
Available character type Alphanumeric and Japanese kana characters
Extended graphics character set (default setting is available
using SW1-7.)
Special characters
International characters
EEPROM download character
Font size Character printer (76 dot matrix)
Graphics printer (86 dot matrix)
Character spacing Character printer (one dot space)
Graphics printer (no space)
Space is changeable according to the command.
Input/output control Centronics (STROBE, BUSY hand shaking)
method RS-232C (BUSY control, Xon/Xoff control)

2.1.3 Mode 1 Specifications

The mode 1 specifications of this CPU are listed in Table 2-3.

Table 2-3 Mode 1 Specifications

Item Specifications
Applicable model MTP series character and graphics printers, 12 models
Available character type Alphanumeric and Japanese kana character
Special character
International character
Font size Character printer (76 dot matrix)
Graphics printer (86 dot matrix)
Character spacing Character printer (one dot space)
Graphics printer (no space)
Input/output control Centronics (STROBE, BUSY hand shaking)
method RS-232C (BUSY control)

2-2
2.1.4 Mode 2 Specifications

The mode 2 specifications of this CPU are listed in Table 2-4.

Table 2-4 Mode 2 Specifications

Item Specifications
Applicable model MTP series character printers, 6 models
Available character type Alphanumeric and Japanese kana character
Font size Character printer (75 dot matrix)
Character spacing Character printer (two dot space)
Input/output control method Centronics (STROBE, BUSY hand shaking)

2-3
2.2 THERMAL PAPER

Use the recommended thermal paper as in Table 2-5.

Table 2-5 Recommended Thermal Paper

Manufacturer Normal thermal paper High-sensitivity thermal paper


Nippon Paper Industries TP50KS-A TP50KS-E2C
Honshu Paper Co., Ltd. FH65BX-14N FH65BU-2
Mitsubishi Paper Co., Ltd. F-200U7N5 F-200U9W3
* High-sensitivity paper reacts at a lower applied energy than normal thermal paper.
Refer to section 4.7.2, Head Pulse Width Setting, for a more detailed explanation.

2-4
CHAPTER 3

PIN DESCRIPTION

3.1 CPU PIN DESCRIPTION

Negative logic signals have ! at the beginning of the signal name.


Input/output directions as viewed from the CPU are indicated by the following.

I: Input
SI: Schmitt trigger input
O: Output
I/O: Input/output

Table 3-1 CPU Pin Definitions

Pin No. FLAT Pin No. DIP Signal Name I/O Function
1 9 XTAL I Clock input
2 10 EXTAL I Clock input
3 11 MD1 I CPU mode pin (Must be connected to V CC.)
4 12 MD0 I CPU mode pin (Must be connected to VCC.)
5 13 !NMI I Must be connected toVCC.
6 14 VCC Power
7 15 !STBY I Must be connected toVCC.
8 16 VSS GND
9 17 HDCNT I Head applied pulse width clock input
10 18 SW1-1 I Mechanism selection SW1
11 19 SW1-2 I Mechanism selection SW2
12 20 SW1-3 I Mechanism selection SW3
13 21 SW1-4 I Mechanism selection SW4
14 22 SW1-5 I Graphic mode selection
15 23 O System clock (Must not be connected to anything.)
16 24 SW1-6 I Inversion (Flip) print selection
17 25 SW1-7 I Character set selection
18 26 SW1-8 I Initial one line feed selection
19 27 SBUSY O Serial busy
20 28 TxD O Serial transmission data
21 29 RxD I Serial input data
22 30 DSR I IF use enable /disable
23 31 !STROBE SI Parallel strobe
24 32 CMDSEL I Command mode selection pin
25 33 !PBUSY O Parallel busy
26 34 !ACK O Parallel acknowledge
27 35 SDA I/O EEPROM data input/output

3-1
Table 3-1 CPU Pin Definitions (Continued)

Pin No. FLAT Pin No. DIP Signal Name I/O Function
28 36 SCL O EEPROM clock output
29 37 MTSP O Must not be connected to anything.
30 38 MT O Motor drive output
31 39 VCC Power
32 40 HD8 O Head data 8
33 41 HD7 O Head data 7
34 42 HD6 O Head data 6
35 43 HD5 O Head data 5
36 44 HD4 O Head data 4
37 45 HD3 O Head data 3
38 46 HD2 O Head data 2
39 47 HD1 O Head data 1
40 48 VSS GND
41 49 SW2-8 I Serial data control method selection
42 50 SW2-7 I Serial data bit length selection
43 51 SW2-6 I Parity selection
44 52 SW2-5 I Parity enable/disable selection
45 53 SW2-4 I Baud rate selection SW3
46 54 SW2-3 I Baud rate selection SW2
47 55 SW2-2 I Baud rate selection SW1
48 56 SW2-1 I Communication method selection
49 57 DATA0 I Parallel data 0
50 58 DATA1 I Parallel data 1
51 59 DATA2 I Parallel data 2
52 60 DATA3 I Parallel data 3
53 61 DATA4 I Parallel data 4
54 62 DATA5 I Parallel data 5
55 63 DATA6 I Parallel data 6
56 64 DATA7 I Parallel data 7
57 1 PS SI Paper sensor
58 2 PE O Paper end
59 3 !ERROR O Error
60 4 !FEED SI Feed
61 5 !SSBY SI Software standby mode clear
62 6 HP SI Home position
63 7 TG SI Tachogenerator input
64 8 !RESET I CPU reset

3-2
3.2 FLAT TYPE (PTM01F01) PIN DESCRIPTION

Figure 3-1 shows the pin configuration of the flat type CPU. This figure is a top view of the IC.

64

63

62

61

60

59

58

57

56

55

54

53

52

51

50

49
1 48

2 47

3 46

4 45
Lot No.
HD6433238xxxF
5 PTM01F01 44

6 43

7 42

8 41
JAPAN

9 40

10 39

11 38

12 37

13 36

14 35

15 34

16 33
17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

Figure 3-1 PTM01F01 Pin Configuration

3-3
3.3 DIP TYPE (PTM01P01) PIN DESCRIPTION

Figure 3-2 shows the pin configuration of the flat type CPU. This figure is a top view of the IC.

1 64
2 63
3 62
4 61
5 60
6 59
7 58
8 57
9 56
10 55
11 54
12 53
Lot No. JAPAN
HD6433238xxxP
PTM01P01

13 52
14 51
15 50
16 49
17 48
18 47
19 46
20 45
21 44
22 43
23 42

24 41
25 40
26 39

27 38
28 37
29 36

30 35
31 34
32 33

Figure 3-2 PTM01P01 Pin Configuration

3-4
CHAPTER 4

CONTROL FUNCTIONS

4.1 INITIALIZATION

The CPU is initialized following power-on reset release and also following reset release using the
!RESET terminal. During initialization, the following operations are conducted:

(1) Initialization of each port and register

(2) RAM cleared

(3) Function pin setting (see Section 4.2) read

(4) EEPROM recognition (see Table 4-1)


Character spacing and fonts are set according to Table 2-3 in Mode 1 and according to Table 2-4 in
Mode 2. In both cases the EEPROM recognition is not executed.

Table 4-1 EEPROM Initial Recognition

EEPROM included (non-initialized) Initialized according to Section 4.4.3.


EEPROM included (initialized) Set to the EEPROM font and character spacing.
EEPROM not included Character spacing is set according to Table 2-2.
Fonts are set according to SW1-7.
* For more detailed information refer to section 4.4, EEPROM communication.

(5) Mechanism initialization


If the thermal print head is not already in the home position when initialization is executed, it is
returned to the home position.
One line of paper feed is performed if the setting is for one line of feed. SW1 pin 8 can be used
to determine whether or not paper feed will be performed.

(6) Test printing (if the !FEED terminal is low)

4-1
4.2 FUNCTION PINS

The CPU has 18 function pins. The functions are given in Table 4-2.

Table 4-2 Function Pin Assignment

Pin Function
CMDSEL pin, SDA pin Command mode selection
SW1 pins 1 through 4 Mechanism type selection
SW1 pins 5 through 8 Initial function selection
SW2 pins 1 through 8 Communication function selection

For details concerning pin numbers, see Section 3.1

NOTE

These settings are read into the CPU at initialization. It is necessary to


perform initialization (see Section 4.1) each time the settings are changed.

4.2.1 Command Mode Selection

The CMDSEL pin and SDA pin are used to select the command mode.
When making the selection, be aware that the validity of the function pins (SW1 pins 1 through 8, SW2
pins 1 through 8) is affected by the command mode.
When invalid, it is the same as high level, but should be set to high.

Table 4-3 Command Mode Selection

Command mode CMDSEL pin SDA pin Valid/Invalid


Mode 0 High * All pins are valid.
Mode 1 (MTPI-GNP, Low High SW1 pins 7 and 8 and SW2 pin 8 are invalid.
GNS compatible mode)
Mode 2 (MTPI-CN, CC Low Low SW1 pins 1, 2, and 3 are valid. All other pins are
compatible mode) invalid.
* Never fix the SDA pin to low when Mode 0 has been selected.
Mode 0 must be selected when the EEPROM has been connected.

4-2
4.2.2 Mechanism Type Selection

SW1 pins 1 through 4 are used to select the mechanism type.

Table 4-4 Mechanism Type Selection (Character Printer)

MTP type Dots Digits *N SW1-1 SW1-2 SW1-3 SW1-4


MTP102-13B 91 13 160 High High High High
MTP102-16B 112 16 200 Low High High High
MTP102-18A-K 126 18 240 High Low High High
MTP201-20B 140 20 230 Low Low High High
MTP201-24B 168 24 276 High High Low High
MTP401-40B 280 40 450 Low High Low High
* The total number of TG pulses in one round trip of the print head.

NOTE

The number of digits is calculated at one dot space.


If SW1 pin 4 is set to high and the settings for the other pins differ from
those indicated above, MTP401-40B will be selected. However, you
should always use the settings given in Table 4-4 to select MTP401-40B.

Table 4-5 Mechanism Type Selection (Graphic Printer)

MTP type Dots Digits *N SW1-1 SW1-2 SW1-3 SW1-4


MTP201-G128 128 21 276 High High High Low
MTP201-G128-B 138 23 230 Low High High Low
MTP201-G166 166 27 276 High Low High Low
MTP401-G192 192 32 360 Low Low High Low
MTP401-G256 256 42 450 High High Low Low
MTP401-G280 280 46 450 Low High Low Low
* The total number of TG pulses in one round trip of the print head.

NOTE

The number of digits is calculated at no space.


If SW1 pin 4 is set to low and the settings for the other pins differ from
those indicated above, MTP401-G280 will be selected. However, you
should always use the settings given in Table 4-5 to select MTP401-G280.

4-3
4.2.3 Initial Function Selection

SW1 pins 5 through 8 are used to select the initial functions.


Always set SW1 pin 7 to high when SW1 pin 5 is set to the hard graphic mode.

Table 4-6 Initial Function Selection

Pin No. Function Low High


SW1-5 Graphic mode Hard Soft
SW1-6 Inversion (Flip) printing Inversion (Flip) printing Normal printing
selection
SW1-7 Character type selection Extended graphics Alphanumeric and
character set Japanese kana characters
SW1-8 Initial paper feed No paper feed One line paper feed

NOTE

If the hard graphic mode is selected:


All received data is printed as bit image data.
Printing is executed only when the line buffer becomes full.
All the function codes (for example, CR, LF) are processed as bit image
data.
The LSB (the lowest bit) of image data is the uppermost first dot. Please
refer to section 10.1.2, Font Structure 2.

4-4
4.2.4 Communication Function Selection

Communication functions are selected using SW2 pins 1 through 8.


If pin 1 is set to parallel, pins 2 through 8 are ignored. However, you should set pins 1 through 8 all to
high.
If pin 5 is set to no parity, be sure to set pin 6 to high.

Table 4-7 Communication Function Selection

Pin No. Function Low High


SW2-1 Communication method Serial Parallel
SW2-2 to 4 Baud rate See Table 4-8.
SW2-5 Parity (yes/no) No Yes
SW2-6 Parity (odd/even) Odd Even
SW2-7 Serial data bit length 7 bits 8 bits
SW2-8 Serial data control Xon/Xoff BUSY

Table 4-8 Baud Rate Selection

Mode 0 Mode 1 SW2-2 SW2-3 SW2-4


150 bps 75 bps High High High
300 bps 150 bps Low High High
600 bps 300 bps High Low High
1200 bps 600 bps Low Low High
2400 bps 1200 bps High High Low
4800 bps 2400 bps Low High Low
9600 bps 4800 bps High Low Low
19200 bps 9600 bps Low Low Low

NOTE: Baud rates differ between Mode 0 and Mode 1.

4-5
4.3 TEST PRINTING

4.3.1 Test Print Execution

There are two methods of test print execution.

(1) With the !FEED terminal set to low, switch the power on.
(2) Set the !RESET terminal to low.
Set the !FEED terminal to low, then set the !RESET terminal to high.

If one of the above operations is performed immediately following installation of the EEPROM, !FEED
terminal detection is conducted then the EEPROM is initialized (see Section 4.4.3). Following the
EEPROM initialization, the test print begins.

4.3.2 Test Print Flow

Test print items are printed in the following order:

(1) Firmware version

(2) CPU ROM checksum

(3) All characters


If the EEPROM is not connected, codes 20H to FEH are printed according to the settings of SW1
switches 1 through 8. If alphanumeric and Japanese kana characters have been selected, 7FH is
excluded (see Table 4-1).

If the EEPROM is connected, the codes from 0H to FEH that have been registered in the EEPROM
are printed (see Table 4-2).

(4) 10 lines of zigzag pattern (every other dot is printed)

(5) Items (3) and (4) are repeated while the !FEED terminal remains low.

NOTE

Under Mode 2 specifications, the codes within the range of 20H through 7FH
and A0H through DFH are printed. Item (4) above is not printed.

4-6
<When the EEPROM is not connected>
Mode 0
MTP201-G128
Alphanumeric and Japanese kana characters selected
Normal printing

Figure 4-1 Test Print Sample 1

<When the EEPROM is connected>


Mode 0
MTP201-G128
Normal printing

Figure 4-2 Test Print Sample 2

4-7
4.4 EEPROM COMMUNICATION

The EEPROM can be used when Mode 0 has been selected as the command mode.
XICORs X24C16 is used as the EEPROM.
Though the CPU can be used without the EEPROM, if the EEPROM is connected, the initial states of
fonts and character spacing can be changed.

4.4.1 Fonts

Both the alphanumeric and Japanese kana character set and the extended graphics character set are
contained in ROM. The fonts that can be used differ according to whether or not the EEPROM is used.

(1) When the EEPROM is not connected


The characters contained in CPU ROM are used for printing.
Alphanumeric and Japanese kana characters are used when SW1 pin 7 is high, and extended
graphics characters are used when it is low.
The font can be changed using commands.

(2) When the EEPROM is connected


The download characters defined in the EEPROM are used for printing.
Commands can be used to download fonts into the EEPROM.
Commands can also be used to switch to the fonts contained in ROM.

4.4.2 Character Spacing

Initial character spacing differs according to whether or not the EEPROM is used.

(1) When the EEPROM is not connected


Character spacing is 1 dot for character printers and no space for graphic printers.

(2) When the EEPROM is connected


The character spacing written into the EEPROM is used for printing.
Commands can be used to store character spacing in memory.
By storing character spacing in the EEPROM, the character spacing immediately following
initialization can be changed.

4.4.3 EEPROM Initialization Immediately Following Installation

Nothing is written into the EEPROM at the time it is installed. After the EEPROM is installed, the fonts in
the ROM indicated by SW1 pin 7 are sent to the EEPROM. The character spacing amount is also written
into the EEPROM according to the printer type. The EEPROM is initialized when the power is switched
on following installation.

CAUTION: During the approximately 3 seconds required to initialize the EEPROM, do not reset
the CPU or execute an errant command.

4-8
4.5 MOTOR DRIVE AND PRINTING

Motor drive and printing are conducted according to the following procedures.

(1) The motor comes on when the print conditions given in Section 4.7 have been met during data
input standby.

(2) When home switch ON is detected, the first dot line of the first character or bit image data is
printed in synchronization with the first leading edge of the tachogenerators print timing signal.
Home position is detected every 1 ms. ON is judged to have been detected after it is detected
four times.

(3) Printing is carried out in synchronization with the leading edge of the signal from the
tachogenerator.

(4) Printing ends and paper is fed mechanically.

(5) If print conditions have not been met by the time the thermal print head comes near the home
position, the motor stops at the home position.
If the motor stops, set the home position (print start position determination) again.

(6) If print conditions have been met by the time the thermal print head comes near the home
position, the motor does not stop but continues printing.
Once the home position has been set at the start of printing, the print position is determined
according to the tachogenerator count, making it unnecessary to set the home position again
until the motor stops.
During continuous printing, the tachogenerator count is initialized each time the count has
completed one full cycle (see Figure 4-4).

A print start timing and character print timing chart is given in Figure 4-3.

4-9
ON

OFF
Motor drive
signal OFF Home switch ON detection

Home
switch ON

Home
switch signal

TG signal

Print timing
signal

Synchronized with print timing


signal leading edge.

OFF
Dot 1
ON ON ON
OFF
Dot 2

Dot 3

Dot 4

Dot 5

Dot 6

Dot 7

Dot 8

Example of printing the number 8. The character generator has an 86


configuration. Dots 2 through 8 are used with a character printer.

Figure 4-3 Print Start Timing and Character Print Timing Chart

4-10
The continuous printing timing chart is given in Figure 4-4.

ON

Motor drive
OFF
signal

ON (Line 1) (Line 2) (Line 3)


Home switch
signal OFF

Ignored Ignored
1 2 3 N 1 2 3 N 1 2 3
Timing
signal

(Tachogenerator signal)

Figure 4-4 Continuous Printing Timing Chart

4-11
4.6 PRINT CONDITIONS

The CPU starts printing of one line under any of the following conditions:

(1) When a CR code is processed within the CPU, the data in the line buffer is printed.

(2) When a LF code is processed within the CPU, the data in the line buffer is printed. (Excluding
Mode 2.)

(3) When the line buffer becomes full, printing is executed.


Conditions for printing when the line buffer becomes full differ according to the mode as indicated
below.

<Mode 0>

When printing normal characters


If the total dot count of the data in the line buffer is greater than (right margin dot count6) dots, and
character data is input to the line buffer, printing is executed.

When printing characters in the double-width mode


If the total dot count of the data in the line buffer is greater than (right margin dot count12) dots,
and character data is input to the line buffer, printing is executed.

Printing is also executed when the line buffer becomes full in the hard graphic mode.

<Mode 1>
Character printer: X=7
Graphic printer: X=6

When printing normal characters


If the total dot count of the data in the line buffer is greater than (maximum dot countX) dots, and
the CPU enters the bit image mode or character data is input to the line buffer, printing is executed.

When the last character in a line is double-width mode or when the double-width mode is used
immediately preceeding the line
If the total dot count of the data in the line buffer is greater than (maximum dot count2X) dots, and
the CPU enters the bit image mode or character data is input to the line buffer, printing is executed.

Printing is also executed when the line buffer becomes full in the bit image mode.

<Mode 2>

If the number of places in the character data in the line buffer is at the maximum amount, and character
data is input to the line buffer, printing is executed.

4-12
4.7 THERMAL PRINT HEAD DRIVE

4.7.1 Control Method

Thermal print head activation is performed through a form of historical control based on the thermal
voltage compensation oscillation circuit pulse which has been input from the head pulse width clock input
terminal (HDCNT).
A 20-pulse count is used for dots in which the previous dot was not driven, and a 16-pulse count for dots
in which the previous dot was driven. For a 16-pulse count, the drive is not conducted for the first four
pulses of a 20-pulse count. The drive begins immediately after the fourth pulse.

20-count

16-count

1 2 3 4 5 6 18 19 20
Oscillator output

Figure 4-5 Thermal Print Head Pulse Width and Oscillator Output

NOTE

If a tachogenerator signal has been received before the twenty pulses end,
thermal print head activation is stopped. In the next head drive pulse step, the
thermal print head activation resumes.
Be careful so that an error signal is not output in this situation.

If this problem occurs, the following are possible causes:


Head pulse width increased due to abnormally low temperature or low
voltage.
Noise enters with the tachogenerator signal.

4-13
4.7.2 Head Pulse Width Setting

Connect the temperature/voltage compensation circuit (or any other circuit having the function of
changing the output pulse frequency to provide the proper applied energy to the thermal head to
compensate, as needed, for changes in temperature and voltage) to the HDCNT pin.

The CPU will count the input pulse and decide the head pulse width. For a more detailed explanation of
the temperature/voltage compensation circuit, refer to section 5.6, Temperature/Voltage Compensation
Circuit.

When using the temperature/voltage compensation circuit described in section 5.6:


There is a need to preadjust the head pulse width before printing, according to the volume of print.
The amount to adjust the oscillation frequency depends on the type of printer used
(character/graphic) and the head resistance ranking (A, B, C).
Adjust the output pulse of the oscillation frequency of the temperature/voltage compensation circuit
according to Table 4-9, with Vcc=5V and the temperature=24 C. There is some deviation when
using the resistance ranking; therefore, using the printout as a guage, adjust the oscillation
frequency within the ranges listed in Table 4-9.

Table 4-9 Oscillation Frequency Adjustment

(Vp=5 V, T=24 C, VCE (SAT)=0.2 V, When using the LB1256 as the head driver)
Resistance Rank A B C
High sensitivity thermal Character printer 12.80.9kHz 14.01.1kHz 15.51.3kHz
paper Graphic printer 11.20.7kHz 12.30.8kHz 13.61.0kHz
Character printer 11.80.8kHz 12.91.0kHz 14.21.2kHz
Normal thermal paper
Graphic printer 10.30.6kHz 11.30.8kHz 12.50.9kHz

4-14
When using a temperature/voltage compensation circuit other than that described in section 5.6:
Use a circuit that fulfills the conditions in the figure below. If the circuit does not compensate for
temperature and voltage changes accordingly, there is a chance that the print head will incur
damage due to surplus energy.
Ensure that there is at least 1S between the High and the Low of the input pulse from the HDCNT
pin.

1S Or 1S
More Or More

4.0V to 6.0V
HDCNT Pin Input

Applied energy compensation

V0+V T0T
E= E0 (1+ )
2V 100

Head pulse width calculation

RE
t=
2
V

Oscillation circuit output frequency

20
f=
t

E0: Rated energy (mj) (See Table 4-9.)


E: Applied energy (mj)
V0: Rated voltage (5.0 V)
V: FPC terminal voltage (V) (Vp minus head driver VCE (sat))
T0: Room temperature (24 C)
T: Operation temperature (C)
t: Pulse width (ms) for rated energy application
R: Head resistance ()
f: Frequency (kHz) of pulse output from oscillator

4-15
Table 4-10 Energy Applied to Thermal Print Head
(Environmental temperature: 24C)
Thermal print head applied voltage (V) 4.0 V 5.0 V 6.0 V
Rated applied High sensitivity paper 2.59 2.30 2.11
energy (mj) Normal paper 2.81 2.50 2.29
Maximum applied energy (mj) 3.37 3.00 2.75

Table 4-11 Head Resistance Ranking

Rank A B C
Character printer 15.31 14.01 12.71
Graphic printer 17.61 16.01 14.41

There is a 5% dispersion in resistance between dots on the same thermal print head. Ranking is
made according to average values.

The rank is indicated on the FPC.

4-16
4.8 ERROR MODE

4.8.1 Error Conditions

The following are error conditions:

(1) The home switch is off for too long a period of time.

<Causes>
The mechanism type of setting made with the function pins does not match the type of mechanism
that has been connected.
The home switch is damaged.

(2) Motor tachogenerator is signal spacing exceeds the specified values.

Specified value

Motor startup: 1 second


Motor drive: 100 ms

<Causes>
A paper jam has occured.
Vp power is not on.
This error occurs if the initial line of paper feed is specified and Vp power has not turned on within
1 second or less after the Vcc power has been turned on.

(3) An approximate 10 tachogenerator count shift from the set tachogenerator position has occured
during continuous printing.

<Causes>
The mechanism type of setting made with the function pins does not match the type of mechanism
that has been connected.
Noise enters with the tachogenerator signal.

(4) The home switch is on for too long a period of time.

<Causes>
The mechanism type of setting made with the function pins does not match the type of mechanism
that has been connected.
The home switch is damaged.

4.8.2 Error Processing

When the following processing is performed, an error occurs.

(1) All printer output (M-, HD1 through HD8) goes off.
(2) Low is output from the !ERROR terminal.
(3) Data input is prohibited.

4.8.3 Error Status Elimination

To eliminate the error status, remove the cause of the error, then set the !RESET terminal to low or turn
the power off then on once again (power-on reset).

4-17
4-18
CHAPTER 5

HARDWARE SPECIFICATIONS

5.1 ELECTRICAL CHARACTERISTICS

Since the CPU is a CMOS device, if it exceeds the absolute maximum ratings, there is a possibility of
breaking the chip by voltage, heat, latch-up, etc.
Also, malfunctions may occur if the operating range is exceeded. When designing the peripheral circuits,
pay attention to the absolute maximum ratings, the operating ranges, and the electrical characteristics.
Latch-up means that when a voltage of VCC+0.3 V or more, or GND0.3 V or less, is applied to the signal
terminal, the IC is damaged by the flow of excessive current in the IC.

5.1.1 Absolute Maximum Ratings

Tables 5-1 lists the absolute maximum ratings of the CPU.

Table 5-1 Absolute Maximum Ratings

Item Symbol Rating


Power supply voltage VCC 0.3 V to 7 V
Input voltage VIN 0.3 V to VCC+0.3 V
Operating temperature TOPR 20 C to 75 C
Storage temperature TSTG 55 C to 125 C

5-1
5.1.2 Operating Ranges

Table 5-2 lists the operating ranges of the CPU.

Table 5-2 Operating Range Characteristics

Rating
Item Symbol
MIN STD MAX
Power supply voltage Vcc 4.5 V 5.0 V 5.5 V
External clock F (Xin) 4.90 4.91 4.92
input frequency MHz MHz MHz
Schmitt trigger *1 Vt 1.0 V
input voltage Vt+ Vcc 0.7 V
(Vt+) (Vt) 0.4 V
High input *2 Vih Vcc 0.7 V Vcc + 0.3 V
voltage Pins other than*1, *2 Vih 2.0 V Vcc + 0.3 V
Low input *3 Vil 0.3 V 0.5 V
voltage Pins other than*1, *3 Vil 0.3 V 0.8 V
*1 PS, !FEED, !SSBY, HP, TG, !STROBE
*2 !RESET, !STBY, MD1, MD0, EXTAL, !NMI
*3 !RESET. !STBY, MD1, MD0, EXTAL

5.1.3 Electrical Characteristics

Table 5-3 lists the electrical characteristics of the CPU.

Table 5-3 Electrical Characteristics

Rating
Item Symbol Conditions
MIN STD MAX
High output Ioh=200 A Vcc 0.5 V
All output pins Voh
voltage Ioh=1.0 mA 3.5 V
Low output All output pins IoI=1.6 mA 0.4 V
Vol
voltage HD1 to HD8 IoI=10.0 mA 1.0 V
Input leak !RESET Vin=0.5 V to 10 A
Iin
current *4 Vcc0.5 V 1.0 A
Three-state Vin=0.5 V to
*5 ITSI 1.0 A
leak current Vcc 0.5 V
Input pull-up
*6 Ip Vin=0 V 30A 250 A
MOS current
*4 !STBY, MD1, MD0, !NMI
*5 Input /output pins excluding XTAL and those listed in *2 (when input pull-up MOS is off)
*6 Input pins using input pull-up MOS

5-2
Table 5-4 Allowable Current

Item Symbol MIN TYP MAX


Low output allowable current HD1 to HD8 Iol 10 mA
(for each pin) Output pins other than 2.0 mA
HD1 to HD8
Low output allowable current HD1 to HD8 (total) Iol 80 mA
(total) Total of all output pins 120 mA
High output allowable current All output pins Ioh 2.0 mA
(for each pin)
High output allowable current Total of all output pins Ioh 40 mA
(total)

To maintain LSI reliability, be sure that the output current does not exceed the values given in Table 5-4.

5-3
5.2 POWER CONNECTION

The CPU power pins must be connected as listed in Table 5-5.


A 0.01 to 0.1 F bypass capacitor must be connected between the CPUs Vcc and GND, as close to the
chip as possible.

Table 5-5 Power Pin Connection

Pin No.
Symbol Connected to
Flat DIP
6 14 Vcc Vcc
31 39 Vcc Vcc
8 16 Vss GND
40 48 Vss GND

5-4
5.3 CPU PERIPHERAL CIRCUITS

5.3.1 Reset Circuit

When !RESET is set to low, current processing is terminated and the CPU enters the reset state. When
!RESET goes from low to high, initialization is started.
!RESET must maintain low level for at least 20 ms in order to ensure that the CPU will be reset.
Low level must be maintained for at leas 4 s when executing reset during operation.

A sample reset circuit is shown in Figure 5-1.

Vcc

HSM123 10 k Vcc

RESET IN
2
100 k
1 CPU
S-80736-AN-D0 !RESET
Vc DIP (8)
FLAT(64)
3
0.1F 0.1F

Figure 5-1 Sample Reset Circuit

5-5
5.3.2 Oscillator Circuit

The CPU is provided with an internal oscillator circuit. Bus cycle operation is based on a clock which has
a rate obtained by dividing by two the frequency of the clock input to EXTAL.

(1) When connecting a resonator

Connect a 4.91 MHz ceramic or crystal resonator to EXTAL and XTAL.


Use an AT cut parallel resonator for the crystal resonator.

Figure 5-2 shows a sample oscillator configuration using a ceramic resonator.

CPU
XTAL EXTAL
DIP (9) DIP (10)
FLAT (1) FLAT (2)
1 3

CST4.91MGW
4.91 MHz

Part used: CST4.91MGW (MURATA)

* When using a ceramic resonator without internal load capacity, load


capacity should be from 15 to 22PF.

Figure 5-2 Oscillator Circuit

5-6
(2) When inputting an external clock

When using external clock input, input an opposite phase clock to EXTAL and XTAL.
The external clock must be high in the standby mode.

External clock frequency: 4.91 MHz


Duty ratio: 45% to 55%

Figure 5-3 shows a sample oscillator configuration that makes use of an external clock signal.

EXTAL
External clock input

74HC04

XTAL

Figure 5-3 Sample Oscillator Configuration

5-7
5.4 FUNCTION PIN CIRCUIT

The CPU has function pins for 16 bits. Refer to Section 4.2 for the function of each bit.
The function pins are pulled up to Vcc internally.
Unused pins must be open.
Though the pins are pulled up to Vcc internally, they should be pulled up to Vcc with a 1.2 to 10 k
resistor if the signal line is long or if the device is being used in an environment in which it is easy to
receive noise.

Sample function pin circuits are shown in Figures 5-4 and 5-5.

Vcc

10 k16

DIP FLAT
(18) (10) 1 1
SW1-1 (19) (11) 2 2
SW1-2 (20) (12) 3 3
SW1-3 (21) (13) 4 SW1 4
SW1-4 (22) (14) 5 5
SW1-5 (24) (16) 6 6
SW1-6 (25) (17) 7 7
SW1-7 (26) (18) 8 8
SW1-8 DIP FLAT
CPU (56) (48) 1 1
SW2-1 (55) (47) 2 2
SW2-2 (54) (46) 3 3
SW2-3 (53) (45) 4 SW2 4
SW2-4 (52) (44) 5 5
SW2-5 (51) (43) 6 6
SW2-6 (50) (42) 7 7
SW2-7 (49) (41) 8 8
SW2-8

Figure 5-4 Sample Function Pin Circuit (SW1, SW2)

VCC

10k2

CPU
FLAT DIP
(24) (32) SW3
CMDSEL (27) (35)
SDA

Figure 5-5 Sample Function Pin Circuit (SW3)

5-8
5.5 PRINTER CONTROL CIRCUITS

5.5.1 Motor Control Circuit

The CPUs MT terminals are used to drive and stop the motor. Counter electromotive force is used to
brake and stop the motor in a short amount of time.

The sample circuit given in Figure 5-6 can be used to drive and stop the motor using only the MT
terminal.
This circuit is included internally in LB1256M (9-pin input, 12-pin output). When using the character
printer, if LB1256M is used, a motor control circuit is not needed, leave the MTSP terminal open.

VP
M+

270
2SC1740R +
CPU M
MTSP NC 1SS138
300
DIP (38) 2SC3243D
3 K M
FLAT (30)
MT 2SC1740R

30 K
2SC3243D

2 K

Part used: 2SC1740R (ROHM)


Part used: 2SC3243D (MITSUBISHI)

Figure 5-6 Sample Motor Drive Circuit

5-9
5.5.2 Head Control Circuit

The head signals are output from the head data terminals (HD1 to HD8).

A sample head control circuit is given in Figure 5-7.

VP Thermal print
head
VP 0.1F

DIP FLAT 11 10
CPU DOT COM
(47) (39) 9 12
HD1 DOT 1
(46) (38) 8 13
HD2 DOT 2
(45) (37) 7 LB1256M 14
HD3 DOT 3
(44) (36) 6 15
HD4 DOT 4
(43) (35) 5 X8 16
HD5 DOT 5
(42) (34) 4 17
HD6 DOT 6
(41) (33) 3 18
HD7 DOT 7
(40) (32) 2 19
HD8 DOT 8
1 20
NC

Part used: LB1256M (SANYO)

Figure 5-7 Sample Head Control Circuit

5-10
5.5.3 Tachogenerator Waveform Shaping Circuit

The tachogenerator signal is output from a signal output device directly coupled to the motor. Two cycles
of simulated sine wave are generated for each revolution of the motor. It is necessary to use the
tachogenerator waveform shaping circuit to convert the tachogenerator signal into a short-form wave print
timing signal and input it to the tachogenerator terminal (TG).
The tachogenerator terminal is pulled up to Vcc internally.

A sample tachogenerator waveform shaping circuit is given in Figure 5-8.

DIP (7) 2SC2462LC


CPU FLAT (63)
TG 100 K
TG
820pF
TG COM

Part used: 2SC2462LC (HITACHI)

Figure 5-8 Sample Tachogenerator Waveform Shaping Circuit

5.5.4 Home Switch Circuit

The printers home position status is detected from the home position terminal (HP). If the home position
signal is off, the thermal print head is in the home position. If the home position signal is on, the thermal
print head is not in the home position.
The home switch terminal is pulled up to Vcc internally.

A sample home switch circuit is given in Figure 5-9.

DIP (6)
CPU FLAT (62) 1 K Home switch
HP
0.1F

Figure 5-9 Sample Home Switch Circuit

5-11
5.6 TEMPERATURE/VOLTAGE COMPENSATION CIRCUIT

The output pulse width changes to provide stable energy to the thermal print head even when the
temperature or voltage changes. See Section 4.7.2 for details concerning head energy.

Temperature compensation range: 0 C to 40 C


Voltage compensation range: 4.0 V to 6.0 V

A sample temperature/voltage compensation circuit is given in Figure 5-10.

C1
820PF

100 K 22 K 160 K
TC4069UB

FLAT (9) Volume


1 K
CPU DIP (17) 47 K
HDCNT

7 14
VP
2.2 K 12 K

0.1F

Part used: 2SC2462LC (HITACHI)


Part used: HSM221C (HITACHI)
Part used: TC4069UB (TOSHIBA)

NOTE: Use C1 with a capacitance tolerance (for temperature compensation)


of 5% or less.

Figure 5-10 Sample Temperature/Voltage Compensation Circuit

5-12
5.7 INTERFACE CIRCUITS

5.7.1 Parallel Input/Output Control Circuit

The CPU receives parallel data using an 8-bit parallel handshake method. Data reception can be
executed during printing. The !PBUSY and !ACK signal are output every byte.
If 120 bytes have been stored in the input buffer, processing continues and !PBUSY continues to be low
until the amount of data stored in the input buffer becomes less than 120 bytes.
The following pins are used for parallel input/output.

Parallel strobe
!STROBE (FLAT: pin 23, DIP: pin 31): Input

Strobe signal for reading data.


Data is read at the transition of this signal to low.
This signal is ignored when !PBUSY is low.

Parallel data n
DATAn (FLAT: pins 49 to 56, DIP: pins 57 to 64): Input

8-bit parallel data signal.


When High is 1 and Low is 0, the data is read by the !STROBE signal.
Pulled up to Vcc internally.

Parallel busy
!PBUSY (FLAT: pin 25, DIP: pin 33): Output

The BUSY signal indicates that data can be input.


When the !PBUSY signal is high, data can be input.
This signal remains low until the input processing of one byte of data is complete.
This signal goes to low if an error occurs.

Parallel acknowledge
!ACK (FLAT: pin 26, DIP: pin 34): Output

The !ACK signal indicates that data reception is complete.


The !ACK signal is normally high. A low pulse is generated when one-byte of data has been input.
Further data can be input after !ACK has been output.

* If parallel input/output is not used, connect !STROBE and DATA0 through DATA7 to GND, and leave
!PBUSY and !ACK open.

Data input/output timing is given in Figure 5-11 and a sample parallel input/output circuit is given in
Figure 5-12. In the sample circuit, series resistance and a buffer IC are used to prevent CPU latchup.

5-13
DATA0 to DATA7

T3
!STROBE T1 T2

T4 T7
!PBUSY

T5 T6
!ACK

MIN MAX UNIT


T1: Data setup time for !STROBE.
T1 10.0 ns T2: !STROBE pulse width.
T2 300.0 ns T3: Data hold time for trailing edge of !STROBE.
T4: Time between trailing edge of !STROBE and point at which
T3 120.0 ns !PBUSY becomes low.
T4 150.0 ns T5: Time between trailing edge of !ACK and leading edge of !PBUSY,
T6: Time between leading edge of !PBUSY and leading edge of
T5 3.25 3.26 s
!ACK.
T6 3.25 3.26 s T7: Time from leading edge of !PBUSY during which next !STROBE
T7 0 ns can be input.

Figure 5-11 Parallel Data Input/Output Timing

VCC VCC
2.2 k 4.7 k

CONNECTOR
DIP FLAT CPU
1 470 (31) (23)
STROBE !STROBE
2 (57) (49)
DATA0 DATA0
3 (58) (50)
DATA1 DATA1
4 (59) (51)
DATA2 DATA2
5 (60) (52)
DATA3 DATA3
6 (61) (53)
DATA4 DATA4
7 (62) (54)
DATA5 DATA5
8 (63) (55)
DATA6 DATA6
9 (64) (56)
DATA7 DATA7
10 (34) (26)
ACK !ACK
11 (33) (25)
BUSY !PBUSY
32 (3) (59)
ERROR !ERROR
74LS06
16, 19-30, 33
GND 74LS07

Figure 5-12 Sample Parallel Input/Output Circuit

5-14
Data input/output timing using the sample circuit is given in Figure 5-13.

DATA0 to DATA7

T3
T1 T2
STROB

T4
T7

BUSY

ACK T5 T6

MIN MAX UNIT


T1 0.5 s
T2 0.5 s
T3 0.5 s
T4 0.5 s
T5 3.0 3.5 s
T6 3.0 3.5 s
T7 0 s

Figure 5-13 Data Input/Output Timing Using the Sample Circuit

5-15
5.7.2 Serial Input/Output Control Circuit

The input and output of serial data is performed using asynchronous serial communication. The CPU
sends and receives serial data at the TTL level.

(1) Input/output ports

Serial busy
SBUSY (FLAT: pin 19, DIP: pin 27) : output

Indicates whether or not data can be received.


When the SBUSY signal is low, data can be input.
When Xon/Xoff control is selected, SBUSY is always low.

Serial transmission data


TxD (FLAT: pin 20, DIP: pin 28) : output

When Xon/Xoff control is selected, the Xon/Xoff signal is output.


Data is output according to the transmission conditions which are set by the function pins.
Always high when BUSY control has been selected.

Serial reception data


RxD (FLAT: pin 21, DIP: pin 29) : input

Data input port


Data is input according to the transmission conditions which are set by the function pins.
Pulled up to Vcc internally.

I/F use
DSR (FLAT: pin 22, DIP: pin 30) : input

This signal determines whether or not the interface board will be used.
If low is input, reception is possible.
If high is input, neither reception or feed input is possible.
This pin should ordinarily be fixed at low.
Pulled up to Vcc internally.

* If centro input/output has been selected, the above pins all become input pins and are pulled up to Vcc
internally.
If serial input/output is not used, RxD and DSR should be open or pulled up to Vcc with a 2 to 10 k
resistor.
TxD and SBUSY should be open.

Serial input/output parameters are set using the function pins. See Section 4.2.4 for details.

5-16
(2) Error processing when receiving serial data

The CPU receives and checks serial data according to the transmission conditions.

When the chip set has received one byte of data without errors, the data is stored in the input buffer. If
there are any errors, the following data is stored in the input buffer according to the type of error.

Error type Error code

Parity error ! 21H


Framing error, overrun error ? 3FH

If the input data cannot be printed correctly and instead ! or ? is printed, the transmission conditions
between the host device and the CPU most likely do not match. If this happens, adjust the conditions so
that they match.

Serial data input/output timing is given in Figure 5-14.

T1

SBUSY

START STOP
RxD
1 0 0 0 1 1 0 0

T2
STOP
TxD
1 1 0 0 1 0 0 0

T1 : Typ.80 s
T2 : Typ.80 s+transmission time for 1 bit (1/baud rate) When 31H is received and the buffer
becomes full.

Figure 5-14 Serial Data Input/Output Timing

5-17
A level conversion circuit when using RS-232C is given in Figure 5-15.

LT1181ACN
0.1 F Vcc 0.1 F

15 16 4 5 DIP FLAT CPU
14 11 (28) (20)
TxD
RxD
13 12 (29) (21)
RxD
TxD
8 9 (30) (22)
DSR
Stop signal
7 10 (27) (19)
SBUSY
CTS
1 3  2 6
GND 0.1 F
0.1 F  0.1 F 

Part used: LT1181ACN (Linear Technology)

Figure 5-15 RS-232C Level Conversion Circuit

5-18
5.7.3 EEPROM Connection Circuit

By connecting the EEPROM to the CPU, it is possible to use download characters in command mode 0.

(1) Basic EEPROM operation

Data read and write can be executed if the EEPROM having the following specifications is
connected.

<EEPROM specifications>
CMOS type serial EEPROM
Capacity: 2048 bytes (256 bytes 8 pages)
2-wire serial interface method
16-byte page write mode

<Recommended EEPROM>
X24C16(XICOR)
AT24C16(ATMEL)

EEPROM communication includes the following operations.


Data communication is performed according to bidirectional data transmission protocol. For more
details about the bidirectional protocol, please refer to the EEPROM manual.

<EEPROM write operations>


Character font data copy
Download character copy
Character space volume write
User-defined character delete

<EEPROM read operations>


One font data read
Character space volume read
EEPROM write completion confirmation at initialization

(2) EEPROM pins

EEPROM data input/output


SDA (FLAT: pin 27, DIP: pin 35) : input/output

Data input/output terminals for communication with the EEPROM


Input when reading the EEPROM data. Output when writing the EEPROM data.

EEPROM clock output


SCL (FLAT: pin 28, DIP: pin 36) : output

Outputs the clock used for input and output of data to and from the EEPROM.

* If the EEPROM is not used, the SCL and SDA become input pins and are pulled up to Vcc internally.
If command mode 0 has been selected and the EEPROM is not used, SDA and SCL should be open.

5-19
The EEPROM data input/output timing is given in Figure 5-16 and 5-17.

1-byte write

TW1 TW2 TW3 TW4

SCL
SDA
7 6 5 4 3 2 1 0

Start bit output ACK detection

TW5 TW6 TW7 TW8

7 6 5 4 3 2 1 0

Stop bit output


ACK detection
TW1 typ. 6.4 s
TW2 typ. 10.4 s
TW3 typ. 16.0 s (When high is output)
typ. 17.6 s (When low is output)
TW4 typ. 6.4 s
TW5 typ. 20.0 s
TW6 typ. 17.6 s
TW7 typ. 12.0 s
TW8 typ. 9.0 s

Figure 5-16 EEPROM Data Input/Output Timing (Write)

5-20
1-byte read

TR1 TR2

SCL
SDA
7 6 5 4 3 2 1 0

Start bit output ACK output

TR3 TR4 TR5 TR6

7 6 5 4 3 2 1 0

TR8 TR7

TR1 typ. 17.6 s Stop bit output


TR2 typ. 6.4 s
TR3 typ. 21.0 s
TR4 typ. 10.0 s
TR5 typ. 12.0 s
TR6 typ. 9.0 s
TR7 typ. 4.0 s
TR8 typ. 6.0 s

Figure 5-17 EEPROM Data Input/Output Timing (Read)

5-21
A sample EEPROM connection circuit is given in Figure 5-18.

Vcc

Vcc
0.1 F

10 k
1 8
A0 Vcc
2 7
A1 TEST DIP FLAT
3 6 (36) (28) CPU
A2 SCL
4 5 (35) (27) SCL
Vss SDA SDA

X24C16

Part used: X24C16 (XICOR)


AT24C16 (ATMEL)

Figure 5-18 Sample EEPROM Connection Circuit

5-22
5.8 OTHER CIRCUITS

5.8.1 Switch Circuit

Feed switch
!FEED (FLAT: pin 60, DIP: pin 4) : input

If !FEED goes to low during data input standby, paper is fed one line.
Pin status is detected when the thermal print head comes near the home position and paper feed
is conducted if it is low.

Chattering prevention processing for !FEED is performed in the software.


Low must be maintained for at least 30 ms to ensure proper function.

Software standby mode release switch


!SSBY (FLAT: pin 61, DIP: pin 5) : input

If the software standby mode has been entered using software commands, the software standby
mode is released if !SSBY goes to low.

* !FEED and !SSBY are pulled up to Vcc internally.


If !FEED and !SSBY are not used, they should be open or pulled up with a resistance of 2 k to
10 k.

A sample switch circuit is given in Figure 5-19.

Vcc

4.7 k CPU
4.7 k
DIP FLAT
100
Feed switch (4) (60)
!FEED

100
Software standby mode (5) (61)
!SSBY
release switch

Figure 5-19 Sample Switch Circuit

5-23
5.8.2 Paper Sensor Circuit

Paper sensor
PS (FLAT: pin 57, DIP: pin 1) : input

Valid only in mode 0.


If input is high, there is no paper. If input is low, there is paper.
Detected at initialization, during data input standby, and after completion of one line of printing
(after exceeding the print area).
Even if there is no paper when the !FEED pin goes low, it feeds one line.
The status of the DSR pin is also detected when there is no paper.
If !FEED goes to low when there is no paper, paper is fed one line.
If the printer does not detect any paper immediately following reset, it will wait until after it detects
paper to return the print head to the home position and to feed one line of paper.
* PS is pulled up to VCC internally.

NOTE

If PS is not used it should be fixed at low.

A sample paper sensor circuit using a photointerrupter is given in Figure 5-20.

Vcc Vcc

CPU

330 100 k DIP FLAT


(1) (57) PS

GP2S04B

Part used: GP2S04B (Sharp)

Figure 5-20 Sample Paper Sensor Circuit

5-24
5.8.3 Display Circuit

Paper end
PE (FLAT: pin 58, DIP: pin 2) : output

High is output from PE when there is no paper.


Low is output from PE when there is paper.

Error
!ERROR (FLAT: pin 59, DIP: pin 3) : output

Low is output from !ERROR when there is an error.

* If PE and !ERROR are not used they should be open.

A sample display circuit is given in Figure 5-21.

Vcc

330 (2)

LED (2)
DIP FLAT
CPU
(2) (58)
PE
(3) (59)
!ERROR

* Off when high. On when low.

74LS07

Figure 5-21 Sample Display Circuit

5-25
5.9 OPERATION TIMING

5.9.1 Immediately Following Reset

The operation timing immediately following reset is given in Figure 5-22. However, the timing given in
Figure 5-22 is for when none of the following conditions exist. The time needed for initialization
immediately following reset varies according to which of the following conditions exists.

The EEPROM initialization is executed.


The EEPROM initialization takes approximately three seconds.
Do not reset the CPU or send an errant command during initialization.

Test printing is executed.

The thermal print head is not in the home position.

An error has occured.

There is no paper.

DSR is high when serial input is being used.

5-26
!RESET
T1
Parallel input

!PBUSY

!ACK

Serial input, Busy control


T2

SBUSY

Serial input, Xon/Xoff control


T3

TxD

T4

SBUSY

T1 typ.132.8 ms
T2 typ.133 ms
T3 typ.133.6 ms+1/baud rate
T4 typ.133 ms

* indicates irregular portion.

Figure 5-22 Operation Timing Immediately Following Reset

NOTE

In parallel input, the low pulse of !ACK is not output following reset release.

During initialization immediately following reset, the !ERROR signal does


not become low.

5-27
5.9.2 Software Standby Mode

The software standby mode can be entered using the DC2+stp command in mode 0.
After the transition to the software standby mode, output becomes high. See Section 9.1.2 for details.

(1) If the DC2+stp code is processed internally while the motor is driven, driving of the motor is
completed and transition is made to software standby mode after T1 has elapsed. T1 is typically
106.5 ms.

The timing of transition to the software standby mode is given in Figure 5-23.

MT

T1

Figure 5-23 Software Standby Mode Transition Timing

(2) Processing is restarted after T2 has elapsed following the trailing edge of each release signal. T2 is
typically 26.0 ms.

The timing of return from the software standby mode is given in Figure 5-24.

Released using !SSBY

!SSBY

T2

Released using parallel input

!STROBE

T2

Figure 5-24 Software Standby Mode Return Timing

5-28
CHAPTER 6

PACKAGING

Table 6-1, Figures 6-1, and 6-2 show the type and dimensions of the CPU.

Table 6-1 CPU Dimensions

Name PTM01F01 PTM01P01


Type 64 pin QFP 64 pin shrink DIP
Dimensions
17.217.22.7mm 57.617.07.62mm
(WDH)
Structure C MOS LSI C MOS LSI

6-1
Figure 6-1 Flat type (PTM01F01) CPU Dimensions

Figure 6-2 DIP type (PTM01P01) CPU Dimensions

6-2
CHAPTER 7

SAMPLE CIRCUIT DIAGRAM

Table 7-1 lists the parts used in the sample circuit and Figure 7-1 shows a sample circuit for the CPU.

Table 7-1 Parts List

Type Number Vendor Remarks


LB1256M SANYO Electric Co., Ltd. Driver IC
S-80736AN-D0 Seiko Instruments Inc. Reset IC
TC4069UBF TOSHIBA Corporation IC
X24C16S8 XICOR EEPROM
2SC2462LC Hitachi, Ltd. Transistor
DTC123EK Rohm Transistor
2SC1740R Rohm Transistor
2SC3243D Mitsubishi Transistor
HSM221C Hitachi, Ltd. Diode
HSM123 Hitachi, Ltd. Diode
1SS138 Rohm Diode
CST4.91MGW MURATA MFG. CO,. LTD. Ceramic resonator

7-1
Figure 7-1 Sample Circuit
7-2
CHAPTER 8

IMPLEMENTATION CONSIDERATIONS

8.1 SOLDERING CONDITIONS (FOR FLAT TYPE CPU)

The CPU is placed in a moisture-proof pack. When installing the CPU using a method, such as the
Vapor Phase Soldering technique, in which the entire package is heated, make sure that the conditions
given below are satisfied. Otherwise, the package may crack or the CPU may be damaged.

(1) Solder the CPU within 168 hours after opening the moisture-proof pack.

Storage conditions
Temperature: 5 C to 30 C
Humidity: 60%RH or less

(2) If over 168 hours have elapsed after opening the moisture-proof pack, perform baking under the
conditions given below before soldering.

Baking conditions
+8Hr
125 C10 C, 16Hr 0Hr Not activated
(in heat-resisting tray)

After baking, storage conditions and the time until soldering are the same as (1).

8-1
(3) Figures 8-1 and 8-2 show the recommended reflow temperature profiles.

10 sec. max.
235 C max.
140 to 160 C

1 to 4 C/sec.
TEMPERATURE to 60 sec.

1 to 5 C/sec.

TIME

Figure 8-1 Recommended Infrared Reflow Profile

30 sec.
max.

215 C
140 to 160 C

TEMPERATURE to 60 sec.

1 to 5 C/sec.

TIME

Figure 8-2 Recommended Vapor Phase Reflow Profile

Note) If using the infrared soldering technique, there should be no problem if conditions are within those
shown in Figure 8-1.

8-2
8.2 STORAGE CONDITIONS (FOR FLAT TYPE CPU)

Storage period in a moisture-proof pack 1 year

Note 1) If the color of the indicator in silica gel has changed from blue to pink after opening the moisture-
proof pack, be sure to perform prebaking under the conditions in Section 8.1 (2).

Note 2) Baking can not be performed at 125 C because the tray for shipping does not resist heat.
Transfer the CPU to a heat-resisting tray before baking. Baking can be performed with trays
marked HEAT PROOF.
Do NOT perform baking with the CPU in the moisture-proof pack.

8.3 CLEANING CONDITIONS

Although it is essential to clean flux off of the solder to ensure high system quality, improper cleaning may
cause the device to be affected by the solvent, thus reducing device quality. Use of solvents that contain
chlorine ions (e.g., CHLOROCEN) will result in adverse effects on device reliability.
Be careful of the following items when cleaning the CPU.

(1) Perform ultrasonic cleaning under the following conditions.


Frequency: 28 kHz to 29 kHz
Power: 15 W/liter maximum
Time: 30 second or less
Other: Do not put the printed circuit board or device in direct contact with a vibration source.

(2) Marking may be dimmed due to cleaning for an extended period of time. Apply the conditions given
above after confirming actual conditions of use.

(3) If using detergent, it is necessary to consider public environmental and safety standards.

8-3
8.4 MECHANICAL AND THERMAL STRESS

External lead fractures, moisture resistance deterioration, or internal lead pin disconnections may occur
while the packages or external lead pins are being cut out or bent. Care must be taken so that excessive
mechanical stress is not applied to the printed circuit board and the external leads of the IC device after
the device is installed on the board.

Since the IC devices are made of various materials having different thermal expansion coefficients,
quality deterioration or internal lead disconnections may occur if the devices are exposed to high
temperatures for a long period or to sudden temperature changes during the soldering process. Try to
keep any mechanical or thermal stress on the IC devices at a minimum.

8-4
CHAPTER 9

SOFTWARE SPECIFICATIONS

9.1 MODE 0

9.1.1 Character Codes and Commands

If the EEPROM is connected, the character fonts in the EEPROM and the internal ROM can be selected
using the ESC+% command.
If the EEPROM is not connected, the character fonts in the internal ROM are read.

(1) When the EEPROM character font is selected:

Mode 0 function codes are processed as commands.


For commands other than the mode 0 function codes, if the character fonts are registered, the
character fonts are read.

(2) When the internal ROM character font is selected:

When the alphanumeric and Japanese kana characters are selected:


0 through 1FH: Mode 0 function codes are processed as commands.
For codes other than mode 0 function codes, the code is ignored when
recognized as a non-Mode 0 code.
20H through FEH: Character codes.
FFH: Ignored.
* For the contents of the character fonts, see Table 10-1.

When extended graphics character set is selected:


0 through 1FH: Mode 0 function codes are processed as commands.
For codes other than mode 0 function codes, the code is ignored when
recognized as a non-Mode 0 code.
03H to 06H, and 15H are character codes.
20H through FFH: Character codes.
* For the contents of the character fonts, see Table 10-2.

<Mode 0 function code>


09H (HT), 0AH (LF), 0DH (CR), 0EH (SO), 12H (DC2), 14H (DC4), 18H (CAN), 1BH (ESC)

9-1
9.1.2 Command Description

(1) Byte function codes

HT Horizontal tabulation

Code 0916 or 910

Function Moves the printing position to the next tabulation position.


The tabulation position is set from the left margin every eight characters (9th line, 17th
line, and so on) regarded the following number of dots as one character.

Character printer: 7 dots


Graphic printer: 6 dots

The tabulation position is not changed according to the print mode setting.
If HT exceeds the right margin position, line buffer full print is not executed.

LF Line Feed

Code 0A16 or 1010

Function Prints the data in the line buffer, then feeds paper one line.

Only line feed is performed when the line buffer is empty.

CR Carriage Return

Code 0D16 or 1310

Function Prints the contents of the line buffer, then feeds paper one line.
Only line feed is performed when the line buffer is empty.
LF received immediately following CR is ignored.

SO Double-Width (with automatic reset ) ON

Code 0E16 or 1410

Function Sets double-width mode.


Characters that follow this command are printed at twice their normal width.
Character spacing is also doubled.
Double-width mode is cleared by input of DC4, LF, CR, ESC+W+0 or line buffer full
print.

9-2
DC4 Double-Width (with automatic reset) OFF

Code 1416 or 2010

Function Resets double-width mode with automatic reset. The CPU is placed in this mode when
initialized.

CAN Cancel

Code 1816 or 2410

Function Cancels the data in the line buffer that has been received before this code.

HT is also canceled and the print start position is from the left margin.

9-3
(2) Escape Sequences

If codes other than the specified command are input following ESC codes, the command is ignored. For
example, if ESC+F is input, ESC+F is ignored.

ESC+SP+n Character Spacing

Code 1B16 + 2016 + n, or 2710+ 3210 + n


0n15 (n is an integer)

Function Sets the character spacing to n dots.


The highest four bits are ignored.
n indicates the number of dots.
The character spacing is twice the number of dots in the double-width mode.

Default When EEPROM is connected: the value set in EEPROM


When EEPROM is not connected: the value below
Character printer: 1 dot
Graphic printer: None

ESC+@ Reset

Code 1B16 + 4016, or 2710 + 6410

Function Initializes the interface.


The contents of the line and input buffers are cleared.
After reset command is input, the data input before resetting is cleared.

ESC+,+n Inversion (Flip)

Code 1B16+4916+n or 2710+7310+n

Function Turns on/off inversion for each individual line.


n=0 Normal
n=1 Inversion
The highest seven bits are ignored.
The mode selected last in each line becomes effective.
In the inversion mode, each of the characters is printed upside down. The sequence
of characters in a line is also reversed.
The character sent first is printed at the right margin and subsequent characters are
printed from right to left.

Default The value set by SW1 pin 6.

9-4
ESC+K+n1+n2+image data Bit Image

Code 1B16+4B16+n1+n2+image data, or 2710+7510+n1+n2+image data

0H (n2100H+n1) 1FFH

Function Prints the data that follows ESC+K+n1+n2 as bit images.


The highest seven bits of n2 are ignored.
n2 (higher-order bytes) and n1 (lower-order bytes) specify the number of dot lines of
the bit image.
Data exceeding the line is discarded. In this case, line buffer full print is not executed.
MSB of image data is the uppermost first dot.
Please refer to section 10.1.3, Font Structure 3.

ESC+Q+n Right Margin

Code 1B16+5116+n or 2710+8110+n


2nX (n is an integer)

Function Sets the right margin.


X: Maximum number of characters for each printer indicated in Section 4.2.2.
(Ignores ESC+Q+n when exceeding the definition range.)
The printable area extends to n characters.
The data in the line buffer is discarded.
Ignored if the right margin is set to less than (left margin+1). At this time, data in the
line buffer is discarded.
In an inversion mode, the printable area extends n characters from the right end of the
line.
If the right margin is set to X, the margin is automatically set to the maximum number
of dots of the printer.

Default n=X

ESC+W+n Double-Width

Code 1B16+5716+ n, or 2710+8710+n

Function Turns on/off the double-width mode.


n = 1: Turns the double-width mode on.
n = 0: Turns the double-width mode off.
The highest seven bits are ignored.
Characters that follow this command are printed at twice their normal width.
Character spacing is also doubled.
Double-width mode set by this code is not cleared by DC4 codes or line feed.

Default n=0

9-5
ESC+l+n Left Margin

Code 1B16+6C16+n or 2710+10810+n


0nX-2 (n is an integer)

Function Sets the left margin.


X: Maximum number of characters for each printer indicated in Section 4.2.2.
(Ignores ESC+I+n when exceeding the definition range.)
The non-printable area extends to n characters.
The data in the line buffer is discarded.
The right margin value is automatically set to the maximum number of dots of the
printer if it is set larger than (right margin-1).
At this time, the left margin is set to the specified value. The contents of the line
buffer are discarded.
In the inversion mode, the non-printable area extends n characters from the right end
of the line.

Default n=0

9-6
(3) Font extended function codes

ESC+R+n International character set

Code 1B16+5216+n, or 2710+8210+n


0Hn0CH (n is a integer)

Function Changes the type of international character set.


The highest four bits are ignored.
Ignores ESC+R+n when exceeding the definition range.
n
0: USA
1: FRANCE
2: GERMANY
3: U.K.
4: DENMARK1
5: SWEDEN
6: ITALY
7: SPAIN1
8: JAPAN
9: NORWAY
A: DENMARK2
B: SPAIN2
C: LATIN
Selects the following characters from the 13 types of characters: 23H, 24H, 40H, 5BH,
5CH, 5DH, 5EH, 60H, 7BH, 7CH, 7DH, 7EH.
For the contents of the character fonts, see Table 10-3.
When using the EEPROM font, the international character of the fonts for which the
character set is copied can be specified.

Default Set to JAPAN for alphanumeric and Japanese kana characters, and to USA for the
extended graphic character set.

9-7
ESC+c+n Special character

Code 1B16+6316+n, or 2710+9910+n

Function Specify characters E0H to FEH in the character codes table as normal characters or
special characters
n=0 Normal character
n=1 Special character
The highest seven bits are ignored
Normal characters and the special characters can be printed in the same line.
The modes switch at the time ESC+c+n is processed in the CPU.
When using the EEPROM font, the fonts for which the character set is copied can be
specified as either normal characters or special characters.
For the contents of the character fonts, see Table 10-4.

Default n=0

ESC+t+n Character code table

Code 1B16+7416+n, or 2710+11610+n

Function Selects the character code table.


n=0 Ignores ESC+t+0
n=1 Extended graphics character set
n=2 Ignores ESC+t+2
n=3 Alphanumeric and Japanese kana character
The highest six bits are ignored
The international character remains unchanged.
The modes switch at the time ESC+t+n is processed in the CPU.
When using the EEPROM font, the type of font for which the character set is copied
can be specified.

Default Set in the character code table specified using SW1 pin 7.

9-8
ESC+z+n Zero font

Code 1B16+7A16+n, or 2710+12210+n

Function Selects the zero font.


n=0 with slash
n=1 without slash
The highest seven bits are ignored
The modes switch at the time ESC+z+n is processed in the CPU.
When using the EEPROM font, the zero font of the font for which the character set is
copied can be specified.
For the contents of the character font, see Table 10-5.

Default n=0

9-9
(4) EEPROM function codes

These commands are valid only when EEPROM is connected. ESC+(1 byte code) is ignored when
EEPROM is not connected.

ESC+%+n Font

Code 1B16+2516+n, or 2710+3710+n

Function Selects the EEPROM font or the internal ROM font.


n=0 Internal ROM font select
n=1 EEPROM font select
The highest seven bits are ignored

Default If EEPROM is connected, the EEPROM font is read.

ESC+&+n+m+font data Download 86 font

Code 1B16+2616+n+m+font data, or 2710+3810+n+m+font data

00HnmFFH

Function Registers the download character.


if n>m, or n and m are specified out of the definition range, the download character
registration is invalidated and the character pattern data is processed as normal
character codes.)
n represents the beginning of the registration codes and m represents the end;
download characters are registered in the codes from n to m. If n=m, only one
character can be registered.
Following the registration codes (n,m), input the pattern data of the character to be
defined. One character is composed of 6 bytes. Therefore, the number of pattern
data is (6number of registration code<m - n+1>[bytes])
Even if a one-byte function code is specified for n and m, it is not printed as a font. To
register immediately following the previous registration, specify the number of
registration characters, ignoring the function codes. For example, to register in 08H to
0CH, number of data is 63=18 because 09H and 0AH are the function codes.
If you specify a new download character in one previously defined, the previously
defined download character is cleared, then the new one defined.
Character codes for which download characters are not registered are ignored and
not printed.
MSB of the font data is the uppermost first dot.
Please refer to section 10.1.3, Font Structure 3.

9-10
ESC+:+s+n+m Character Set Copy

Code 1B16+3A16+s+n+m, or 2710+5810+s+n+m

Function Download and copy the internal ROM font.


s=0, n=0, m=0
Ignores ESC+:+s when s is not 0.
Ignores ESC+:+s+n when n is not 0.
Ignores ESC+:+s+n+m when m is not 0.

The currently selected type of font, international characters, special characters, and zero
font are valid.
Before inputting this code, specify the character set to be copied.

ESC+:+s+SP+SP Download Character Clear

Code 1B16+3A16+s+A016+A016, or 2710+5810+s+16010+16010

Function Clears all download characters registered in EEPROM.


s=0
Ignores ESC+:+s when s is not 0.
Ignores ESC+:+s+SP when the first SP is not A0H.
Ignores ESC+:+s+SP+SP when the second SP is not A0H.

If this command is executed, characters can not be printed until the font is downloaded or
the character set is copied.

ESC+:+SP+n Change Default Value of Character Spacing

Code 1B16 + 3A16 +2016+ n, or 2710+5810+3210+n


0n15 (n is an integer)

Function Changes the default value of character spacing following initialization.


The highest four bits are ignored.
Ignores ESC+:+SP+n when n is specified out of the definition range.

The currently selected character spacing is not changed.

9-11
(5) Other codes

DC2+stp Set to Software Standby Mode

Code 1216 + 7316 +7416+7016, or 1810+11510+11610+11210

Function The CPU is transferred to the software standby mode.


Since current consumption during program standby is extremely reduced by transition
to the software standby mode, the function of the internal module, including not only
the CPU but also the clock, is halted. However, the content of the CPUs register and
the internal RAM is maintained.
Enters the software standby mode after printing one line and returning to the home
position.
The software standby mode is cleared by any of the following procedures:
Set !RESET to low level. The CPU is tranferred to reset status
Set !SSBY to low level.
Input data normaly in the parallel input mode. However, even if you input the
trailing signal to !STROBE to clear the software standby mode before transferring
to the standby mode internally after inputting this command, the data is only
stored in the input buffer, but the standby mode is not cleared. To control the
standby mode surely, do not input data from the time this command is input to the
time of transition to the standby mode.
In the serial input mode, the software standby mode can not be cleared by data input
through the serial signal, and data input in the standby mode is ignored.
To clear the standby mode in the serial input mode, use method or .

9-12
9.2 MODE 1

9.2.1 Character Codes and Commands

0 through 1FH: Mode 1 function codes are processed as commands.


For codes other than mode 1 function codes, the code is ignored when
recognized as a non-Mode 1 code.

[Mode 1 function code]


0AH (LF), 0DH (CR), 0EH (SO), 0FH (SI), 18H (CAN), 1BH (ESC)

20H through FEH: Character codes.


FFH: Ignored.
* For the contents of the character fonts, see Table 10-6.

9.2.2 Command Description

(1) 1 Byte function code

LF Line Feed

Code 0A16 or 1010

Function Prints the data in the line buffer, then feeds paper one line.
Only one line feed is performed when the line buffer is empty.
After printing under the following conditions, the data in the line buffer is printed, then
a carriage return is executed; and then, 1 line is fed:
Character printer: X=7
Graphic printer: X=6
When printing normal characters:
When the number of dots of data in the line buffer is more than (maximum
number of dots - X), if LF code or data+CR+LF are input, the data in the line
buffer is printed, then a carriage return is executed; and then, 1 line is fed.
When the rightmost character of the line is in the double-width mode or the
double-width mode was selected immediately before printing one line:
When the number of dots of data in the line buffer is more than (maximum
number of dots - 2X), if LF code or data+CR+LF are input, the data in the line
buffer is printed, then a carriage return is executed; and then, 1 line is fed.

9-13
CR Carriage Return

Code 0D16 or 1310

Function Prints the contents of the line buffer, then feeds paper one line.
Nothing is performed when the line buffer is empty.
LF received immediately following CR is ignored.
Only CR None
Data+CR Printing+one line feed
Data+CR+LF Printing+one line feed

SO Double-Width ON

Code 0E16 or 1410

Function Selects the double-width mode.


This command is cleared by input of the SI code.
The spaces between characters are not doubled.

SI Double-Width OFF

Code 0F16 or 1510

Function Clears the double-width mode.

CAN Cancel

Code 1816 or 2410

Function Cancels line buffer data that has been received before this code.

9-14
(2) Escape Sequences

If codes other than the specified command are input following ESC codes, the command is ignored. For
example, if ESC+F is input, items up to ESC+F are ignored.

ESC+S+ n1n2n3n4+image data Bit Image (software graphic mode)

Code 1B16+5316+n1n2n3n4+image data, or 2710+8310+n1n2n3n4+image data

0(30H) n1n2n3n4 9(39H)

Function Prints the data that follows ESC+S+n1n2n3n4 as bit images.


n1n2n3n4, a four-digit decimal number, represents the number of bytes of bit image
data to be printed. If data which does not meet the format is input, this command is not
executed and ESC+S+ n1n2n3n4 is ignored.
In this case, image data input following this command is valid, however, it is printed as
characters.
Data exceeding the maximum number of dots is printed in the next line.
LSB of image data is the uppermost first dot (see section 10.1.2, Font Structure 2).
When the line buffer is full, if LF or CR codes are input, the data in the line buffer is
printed, then a carriage return is executed; and then, 1 line is fed.

ESC+c Special character

Code 1B16+6316, or 2710+9910

Function Specifies characters F9H to FDH in the character codes table as normal characters or
special characters.
Normal characters and special characters are switched following this command.
Normal characters and special characters can be printed in the same line. For
example, and can be printed in one line
The modes switch at the time ESC+c is processed in the CPU.
For the contents of the character fonts, see Table 10-8.

NOTE

In MTPI-GNP and GNS (earlier SII products), the special character selection
status was selected at the end of the line, which prevented normal characters
and special characters from being contained in the same line.
For example, using BASIC in normal character selection status, executing:

LPRINT CHR$(&H1B); c;CHR$(&HF9);CHR$(&H1B); c;CHR$(&HFA),


will result in with the MTPI-GNP and GNS, and with the CPU.

9-15
ESC+R+n International character set

Code 1B16+5216+n, or 2710+8210+n


0Hn06H (n is a integer)

Function Changes the type of international character set.


Ignores ESC+R+n when exceeding the definition range.
n
0: JAPAN
1: FRANCE
2: GERMANY
3: U.K.
4: SWEDEN
5: ITALY
6: USA
Selects the following characters from the 7 types of characters: 23H, 24H, 40H, 5BH,
5CH, 5DH, 5EH, 60H, 7BH, 7CH, 7DH, 7EH.
For the contents of the character fonts, see Table 10-7.

Default Set to JAPAN.

9-16
9.3 MODE 2

9.3.1 Character Codes and Commands

0 through 1FH: Mode 2 function codes are processed as commands.


For codes other than mode 2 function codes, the code is ignored when
recognized as a non-Mode 2 code.

[Mode 2 function code]


0DH (CR), 18H (CAN)

20H through 7FH: Character codes.


80H through 9FH: Ignored.
A0H through DFH: Character codes.
E0H through FFH: Ignored.
* For the contents of the character fonts, see Table 10-9.

9.3.2 Command Description

CR Carriage Return

Code 0D16 or 1310

Function Prints the contents of the line buffer, then feeds paper one line.
One line of feed is performed when the line buffer is empty.
If CR is input at the maximum place, the data in the line buffer is printed, then a
carriage return is executed; and then, 1 line is fed.

CAN Cancel

Code 1816 or 2410

Function Cancels line buffer data that has been received before this code.

9-17
9-18
CHAPTER 10

CHARACTER CODES

10.1 FONT STRUCTURE

10.1.1 Font Structure 1

Graphic printer 86 font


Character printer 76 font (One dot at the top is not printed.)

* When Mode 2 is selected, the font structure becomes 75 and the uppermost dot and the dot on the
right are not printed.

Example 1) Printing the letter A on a graphic printer:

Head 1 2 3 4 5 6 Head 1 2 3 4 5 6 7 8 9 10 11 12
DOT1 DOT1
DOT2 DOT2
DOT3 DOT3
DOT4 DOT4
DOT5 DOT5
DOT6 DOT6
DOT7 DOT7
DOT8 DOT8

Normal character Double-width character

Example 2) Printing the letter A on a character printer:

Head 1 2 3 4 5 6 Head 1 2 3 4 5 6 7 8 9 10 11 12
DOT1 DOT1
DOT2 DOT2
DOT3 DOT3
DOT4 DOT4
DOT5 DOT5
DOT6 DOT6
DOT7 DOT7

Normal character Double-width character

10-1
10.1.2 Font Structure 2

Pattern data is input by bytes where 1 represents a dot that will print, and 0 represents that will not.

When the following is input, DOT 1 of the head becomes the LSB of the input data:
Data in Hard Graphic Mode
Bit image data in Mode 1
(ESC+S+ n1n2n3n4+bit image data)

Example) When inputting data for an A, and printing it on a graphic printer:

1 byte data

MSB LSB
Head 1 2 3 4 5 6
LSB DOT1
DOT2
DOT3
DOT4
DOT5
DOT6
DOT7
MSB DOT8

Input data
8
4
2
4
8
0

Hexidecima
F

F
2
2
2

In order to print the above data as bit image data after ESC+S+ n1n2n3n4 in BASIC, execute the
following:
LPRINT CHR$(&H1B); S; 0006;
LPRINT CHR$(&HF8);CHR$(&H24);CHR$(&H22);CHR$(&H24);CHR$(&HF8);CHR$(&H0)

10-2
10.1.3 Font Structure 3

Pattern data is input by bytes where 1 represents a dot that will print, and 0 represents that will not.

When the following is input, DOT 1 of the head becomes the MSB of the input data:
Bit Image data in Mode 0
(ESC+K+n1+n2+bit image data)
Down Loaded Characters
(ESC+&+n+m+down loaded characters)

Example) When inputting data for an A, and printing it on a graphic printer:

1 byte data

MSB LSB
Head 1 2 3 4 5 6
MSB DOT1
DOT2
DOT3
DOT4
DOT5
DOT6
DOT7
LSB DOT8

Input data
1
2
4
2
1
0

Hexidecimal
F
4
4
4
F
0

In order to print the above data as bit image data after ESC+K+n1+n2 in BASIC, execute the
following:
LPRINT CHR$(&H1B); K;CHR$(&H6);CHR$(&H0);
LPRINT CHR$(&H1F);CHR$(&H24);CHR$(&H44);CHR$(&H24);CHR$(&H1F);CHR$(&H0)

10-3
10.2 TYPE OF CHARACTER

10.2.1 Mode 0

(1) Character codes

The character code tables for the alphanumeric and Japanese kana character and extended graphic
character sets are stored in the internal ROM of the CPU.
The default status can be selected using SW1 pin 7. The character code tables can be changed using
commands.
Table 10-1 lists the alphanumeric and Japanese kana character codes and Table 10-2 lists the extended
graphic character set codes.

10-4
Table 10-1 Alphanumeric and Japanese kana Character Codes
10-5

SP means space.
Codes for blanks are ignored.
Thick bordered cells indicates function codes.
Table 10-2 Extended Graphics Character Set Codes
10-6

SP means space.
Codes for blanks are ignored.
Thick bordered cells indicates function codes.
(2) International characters

The following character codes of the internal ROM can be replaced with the characters of each country,
by using commands.

23H, 24H, 40H, 5BH, 5CH, 5DH, 5EH, 60H, 7BH, 7CH, 7DH, 7EH

Table 10-3 International Character Codes

10-7
(3) Special characters

The following character codes of the internal ROM can be replaced with the characters of each country,
by using commands.

E0H to FEH

Table 10-4 Special Character Codes

Alphanumeric and Japanese kana character Extended garaphics character set

10-8
Division Root

Figure 10-1 Print Sample

(4) Zero font

The zero font (character code 30H) of the internal ROM can be selected using commands.

Table 10-5 Zero Font Code

ESC+z+0
with slash
0
ESC+z+1
without slash
0

(5) EEPROM internal characters

If the EEPROM is connected, font characters contained in the EEPROM can be selected.

10-9
10.2.2 Mode 1

(1) Character font table

In Mode 1, only alphanumeric and Japanese kana characters can be used.


Table 10-6 lists the alphanumeric and Japanese kana character codes.

10-10
Table 10-6 Alphanumeric and Japanese Kana Character Codes
10-11

SP means space.
Codes for blanks are ignored.
Thick bordered cells indicates function codes.
(2) International characters

The following character codes of the internal ROM can be replaced with the characters of each country,
by using commands.

23H, 24H, 40H, 5BH, 5CH, 5DH, 5EH, 60H, 7BH, 7CH, 7DH, 7EH

Table 10-7 International Character Codes

10-12
(3) Special characters

The following character codes of the internal ROM can be replaced with the characters of each country,
by using commands.

F9H to FDH

Table 10-8 Special Character Codes

10-13
10.2.3 Mode 2

(1) Character font table

In Mode 2, only alphanumeric and Japanese kana characters can be used.


Table 10-9 lists the alphanumeric and Japanese kana character codes.

10-14
Table 10-9 Alphanumeric and Japanese kana Character Codes
10-15

SP means space.
Codes for blanks are ignored.
Thick bordered cells indicates function codes.
10-16
APPENDIX A

COMMAND INDEX

<Mode 0>

(1) Byte function codes

Function Code Name Page


HT Horizontal tabulation 9-2
LF Line feed 9-2
CR Carriage return 9-2
SO Double-width (with automatic reset) ON 9-2
DC4 Double-width (with automatic reset) OFF 9-3
CAN Cancel 9-3

(2) Escape sequences

Function Code Name Page


ESC+SP+n Character spacing 9-4
ESC+@ Reset 9-4
ESC+I+n Inversion (Flip) 9-4
ESC+K+n1+n2+image data Bit image 9-5
ESC+Q+n Right margin 9-5
ESC+W+n Double-width 9-5
ESC+l+n Left margin 9-6

(3) Font extended function codes

Function Code Name Page


ESC+R+n International character set 9-7
ESC+c+n Special character 9-8
ESC+t+n Character table select 9-8
ESC+z+n Zero font 9-9

A-1
(4) EEPROM function codes

Function Code Name Page


ESC+%+n Font 9-10
ESC+&+n+m+font data Download 86 font 9-10
ESC+:+s+n+m Character set copy 9-11
ESC+:+s+SP+SP Download character clear 9-11
ESC+:+SP+n Change default value of character spacing 9-11

(5) Other codes

Function Code Name Page


DC2+stp Set to software standby mode 9-12

A-2
<Mode 1>

(1) Byte function codes

Function Code Name Page


LF Line feed 9-13
CR Carriage return 9-14
SO Double-width ON 9-14
SI Double-width OFF 9-14
CAN Cancel 9-14

(2) Escape sequences

Function Code Name Page


ESC+S+ n1n2n3n4+image data Bit image (software graphic mode) 9-15
ESC+c Special character 9-15
ESC+R+n International character set 9-16

<Mode 2>

Function Code Name Page


CR Carriage return 9-17
CAN Cancel 9-17

A-3
A-4

You might also like