Page 2
(see the automatic carriage return function in the printer setup). When the printer is in parallel connection and in EPSON mode, a line feed is inserted automatically after a carriage return if Setup"...
Page 3
ESC ] Sets a reverse line feed. (IBM) ASCII Code ESC ] Hexadecimal Value 1B 5D Decimal Value 27 93 This code is a terminator code; when received, it causes the current contents of the print buffer to be printed out, before reversing the paper by one line at the current vertical spacing.
Page 4
ESC J Advances paper n/216 inch. (EPSON) ASCII Code ESC J n Hexadecimal Value 1B 4A n Decimal Value 27 74 n Range 1 < n < 255 This is a terminator code; it therefore causes the current contents of the print buffer to be printed out before performing a single line feed of n/216 inch.
Page 5
ESC $ Sets the absolute printing position. (EPSON) ASCII Code ESC & n Hexadecimal Value 1B 24 n Decimal Value 27 36 n Range 0 < n < 255 0 < n < 127 This command specifies the distance from the left margin where you want to print subsequent characters.
Page 6
ESC [ \ Sets vertical units. (IBM) ASCII Code ESC [ \ m Hexadecimal Value 1B 5B 5C m Decimal Value 27 91 92 m Range 0 < t < 255 0 < t < 255 = 180 or 216 This command changes the base units for the graphics line spacing commands (ESC J, ESC 3).
Page 7
[(current position) – (horizontal position)] 32768-MOD The default unit is 1/120 inch in Draft mode and 1/180 inch in LQ mode. If it would move the print position outside the printing area, the printer ignores this command. defined unit defined unit...
ESC / m Selects the Vertical Format Unit (VFU) channel. (EPSON) ASCII Code ESC / m Hexadecimal Value 1B 2F m Decimal Value 27 47 m Range 0 < n < 7 This command selects the vertical tab set m. The values for m specifies the number of the tab set being changed.
Page 9
ESC 2 Selects 1/6-inch line spacing. (EPSON) ASCII Code ESC 2 Hexadecimal Value 1B 32 Decimal Value 27 50 This command causes the line spacing to be set to 1/6 inch. If the line spacing is changed, it does not affect previous settings for vertical tabs or page length. ESC 2 Enables the line spacing set by ESC A command.
Page 10
ESC 3 Sets graphics line spacing at n/216 inch. (IBM) ASCII Code ESC 3 n Hexadecimal Value 1B 33 n Decimal Value 27 51 n Range 0 < n < 255 This command sets graphics line spacing at n default unit defined by the ESC [ \ command.
Page 11
ESC A Sets text line spacing at n/72 inch. (IBM) ASCII Code ESC A n Hexadecimal Value 1B 41 n Decimal Value 27 65 n This command changes the line spacing to n/72 inch. The line spacing value is stored and activated only after the ESC 2 code is received.
Page 12
ESC C 0 Sets form length to n inches. (IBM, EPSON) ASCII Code ESC C 0 n Hexadecimal Value 1B 43 00 n Decimal Value 27 67 0 n Range 1 < n < 22 This command sets the form length to the number of inches specified by n. The current position of the paper is assumed as top of form.
Page 13
In IBM mode, the tab stop position is memorized as logical position in the page so that it is affected by changing the horizontal spacing. The columns are numbered 1 through 136. In EPSON mode, the tab stop position set by ESC D is memorized as physical position in the page and therefore it is not affected by changing the horizontal spacing.
Page 14
ESC l Sets left margin (10 cpi). (EPSON) ASCII Code ESC l n Hexadecimal Value 1B 6C n Decimal Value 27 108 n Range 0 < n < 255 This code sets the left margin at the current horizontal spacing. It must be sent at the beginning of the line.
Page 15
ESC N Sets the skipover perforation to n lines. (IBM, EPSON) ASCII Code ESC N n Hexadecimal Value 1B 4E n Decimal Value 27 78 n Range 1 < n < 127 (EPSON mode) 1 < n < 225 (IBM mode) The skipover perforation is the sum of top and bottom margins values at the selected vertical spacing.
Page 16
If the sum of the top and bottom margins values set via operator panel is less than the skipover value, the following values for the margins will be set: Top margin = operator panel value Bottom margin = the difference between skipover value and top margin value Changing the vertical spacing does not affect the skipover distance.
Page 17
ESC Q Sets the right margin (10 cpi). (EPSON) ASCII Code ESC Q n Hexadecimal Value 1B 51 n Decimal Value 27 81 n Range 1 < n < 255 This code sets the line length at the current horizontal spacing. It must be sent at the beginning of the line.
ESC R Sets all tabs to power-on settings. (IBM) ASCII Code ESC R Hexadecimal Value 1B 52 Decimal Value 27 82 This command sets horizontal tab stops every eight columns starting from column 9 and cancels all vertical tab stops. ESC SP Sets intercharacter space.
Advances paper to the top of the next page. (IBM, EPSON) ASCII Code Hexadecimal Value Decimal Value This code is a terminator code, when received, causes all data in the print buffer to be printed out. Then it advances the paper to the first printable line of the next form. The line counter is set to the first line value and the column counter is set to the left margin value.
Page 20
In EPSON mode, the vertical tabulations are referred to the VHF channel selected by the ESC / m. If no VFU channels have been selected, the printer assumes as default channel 0. This command resets the double width printing set by SO or ESC SO command.
Sets 10 cpi printing. (IBM) ASCII Code Hexadecimal Value 12 Decimal Value This is a terminator code. It causes all data present in the print buffer to be printed. This command is accepted at any position within the line. The character that follows this command will be printed at 10 cpi.
Cancels double width printing. (IBM, EPSON) ASCII Code DC 4 Hexadecimal Value Decimal Value This code cancels the double width printing set by SO or ESC SO code. It has no effect if the ESC W or ESC has set double width commands. ESC - Sets or cancels underlined printing.
Page 23
ESC ! Mater Select. (EPSON) ASCII Code ESC ! n Hexadecimal Value 1B 21 n Decimal Value 27 33 n Range 0 < n < 255 This command selects any combination of several attributes. The parameter n is the sum up of the printing style values to be used. To print the desiderated combination of printing attributes, calculate the n parameter by adding up the values of each attribute.
Page 24
Line Cancel score line Single continuous line Double continuous line Single broken line Double broken line Any combination of scoring may be set simultaneously. Each type is independent of other types. Graphics characters are not scored. ESC : Sets 12 CPI. (IBM) ASCII Code ESC : Hexadecimal Value...
Page 25
ESC [ @ Sets double high printing and double line feed. (IBM) ASCII Code ESC [ @ l h m Hexadecimal Value 1B 5B 40 l h m Decimal Value 27 91 64 l h m l =normally 4 h = normally 0 This command sets height, width and vertical spacing.
Page 26
Character Width No change Standard width character Double width character ESC _ Sets or cancels overscore printing. (IBM mode) ASCII Code ESC _ n Hexadecimal Value 1B 5F n Decimal Value 27 95 n Enables or disables the overscore printing. See the following table: Overscore Printing Enabled (all spaces and characters that follow are overscored) Disabled...
Page 27
ESC 5 Cancels italics printing. (EPSON) ASCII Code ESC 5 Hexadecimal Value 1B 35 Decimal Value 27 53 Sets the style attribute of the font to normal (cancels the italic style attribute previously selected with the ESC 4 command). ESC a Sets Letter Quality justification printing.
Page 28
Subsequent data will be printed at 15 cpi. This command is accepted at any position within the line. If you change the pitch during proportional mode (selected with the ESC p command) the change takes effect when the printer exits proportional mode. A-27...
Page 29
ESC H Cancels double strike printing. (IBM, EPSON) ASCII Code ESC H Hexadecimal Value 1B 48 Decimal Value 27 72 This command cancels double-strike printing with the ESC G command. ESC I Selects printing type for resident and DLL characters. (IBM) ASCII Code ESC I n Hexadecimal Value...
Page 30
0, proportional mode is reset. If the any horizontal spacing command is sent to the printer when the proportional printing is set, the command will be stored and will be activated as soon as the proportional printing will be reset.
Page 31
The changes made to the fixed-pitch setting with ESC P, ESC M or ESC g commands during proportional mode take effect when the printer exits proportional mode. The printer automatically switches to LQ mode when the printer exits proportional mode.
ESC SI Selects condensed mode. (IBM, EPSON) ASCII Code ESC SI Hexadecimal Value 1B 0F Decimal Value 27 15 This command selects the condensed mode in which character width is reduced as follows: → 10 CPI 17.14 CPI → 12 CPI 20 CPI →...
Page 33
ESC T Cancels subscript or superscript printing. (IBM, EPSON) ASCII Code ESC T Hexadecimal Value 1B 54 Decimal Value 27 84 This command cancels subscript or superscript printing selected by ESC S command. ESC W Sets or cancels double width printing. (IBM, EPSON) ASCII Code ESC W n Hexadecimal Value 1B 57 n...
Page 34
Letter Quality printing If you select proportional spacing with the ESC p command during Draft printing, the printer prints an LQ font instead. When you cancel proportional spacing with the ESC p command, the printer returns to Draft printing. ESC y Selects yellow ribbon band.
Page 35
Sets condensed printing. (IBM, EPSON) ASCII Code Hexadecimal Value Decimal Value This command selects the condensed mode in which character width is reduced as follows: → 10 CPI 17.14 CPI → 12 CPI 20 CPI Proportional → ½ width DC2 code cancels the condensed printing. Sets double width printing (one line).
Page 36
ESC [ T Selects a Code page. ASCII Code ESC [ T 4 0 0 0 Hc Lc Hexadecimal Value 1B 5B 54 04 00 00 00 Hc Lc Decimal Value 27 91 84 4 0 0 0 Hc Lc This sequence allows changing the current code page.
Page 38
ESC \ Prints characters from all characters table. (IBM) ASCII Code ESC \ n Hexadecimal Value 1B 5C n Decimal Value 27 92 n Range 0 < n < 255 0 < n < 255 This command prints the next n characters.
Page 39
Selects one of the available LQ fonts in Letter Quality mode. See the following table: Types Courier Gothic Courier OCR-B OCR-A If the Draft mode is selected when this command is sent, the new LQ font will be selected when the printer returns to LQ printing. A-38...
Page 40
ESC R Selects an international character set. (EPSON) ASCII Code ESC R n Hexadecimal Value 1B 52 n Decimal Value 27 82 n Range 0 < n < 12 This code causes the national character set to be selected according to the parameter See the following table: Character Sets France...
Page 41
ESC t Selects characters table. (EPSON) ASCII Code ESC t n Hexadecimal Value 1B 74 n Decimal Value 27 116 n Range 0 < n < 3 Selects the character table to be used for printing from among the four character tables described below: Character Tables Standard Italic Character Set...
Page 42
ESC & Defines user-defined characters. (EPSON) The format for this command depends on whether you are defining draft characters or LQ characters. Draft mode ASCII Code ESC & NUL n m [ a Hexadecimal Value 1B 26 00 n m [ a Decimal Value 27 38 0 n m [ a Range...
Page 43
Maximum character width (height x width): Print quality 10 cpi Draft 24 x 12 Normal size 24 x 36 Super/subscript 16 x 36 ESC : Copies characters from ROM to RAM. (EPSON) ASCII Code ESC : NUL n m Hexadecimal Value 1B 3A 00 n m Decimal Value 27 58 n m Range...
Page 44
ESC = Defines downloaded characters. (IBM) ASCII Code ESC = n m id p t Hexadecimal Value 1B 3D n m id p t Decimal Value 27 61 n m id p t This sequence allows you to design and then down-line load special characters not present in the character set in use.
Page 45
All graphics characters are 30 dot high. An underscored character is defined as a blank graphic (all zeros) and it is automatically generated by the printer. A shading character repeats dots 1-6 of each column as dots 25 through 30 respectively. A line drawing character repeats dots 23 and 24 as the pairs 25 and 26, 27 and 28, 29 and 30.
Page 46
Indicate the byte number of the sequence n is the low part and m is the high part. Indicate the printer model. The id related to your printer is 23H. p and t Indicate the memory address of the character that you wish to replace. p is the low part and t is the high part.
Page 47
ESC * Sets dot graphics mode. (EPSON) ASCII Code ESC * m n Hexadecimal Value 1B 2A m n Decimal Value 27 42 m n m = 0,1,2,3,4,6,32,33,38,39,40 0 < n < 255 0 < n < 12 This command prints dot-graphics in 8-dot columns or 24-dot columns, depending on the following parameters: Specifies the dot density Specify the total number of columns of graphics data according to the...
Page 48
ESC ? Reassigns dot graphics mode. (EPSON) ASCII Code ESC ? n m Hexadecimal Value 1B 3F n m Decimal Value 27 63 n m Reassigns one of the dots graphics mode (described in the command ESC *) to one of the following commands: ESC K, ESC L, ESC Y and ESC Z.
Page 49
ESC K Normal density dot graphics printing (60 dpi). (IBM, EPSON) ASCII Code ESC K n Hexadecimal Value 1B 4B n Decimal Value 27 75 n Range 0 < n < 255 0 < n < 31 0 < p < 255 Terminator code.
Page 50
ESC L Double density dot graphics printing (120 dpi). (IBM, EPSON) ASCII Code ESC L n Hexadecimal Value 1B 4C n Decimal Value 27 76 n Range 0 < n < 255 0 < n < 31 0 < p < 255 Terminator code.
Page 51
ESC Y Double density dot graphics printing at double-speed graphics (120 virtual dpi). (IBM, EPSON) ASCII Code ESC Y n Hexadecimal Value 1B 59 n Decimal Value 27 89 n Range 0 < n < 255 0 < n < 31 0 <...
Page 52
ESC Z Quadruple density dot graphics printing (240 virtual dpi). (IBM, EPSON) ASCII Code ESC Z n Hexadecimal Value 1B 5A n Decimal Value 27 90 n Range 0 < n < 255 0 < n < 31 0 < p < 255 Terminator code.
This code clears all data stored in the preceding print buffer but does not change the current print position. Selects printer. (IBM) ASCII Code Hexadecimal Value Decimal Value This command causes the printer to be enabled after it has been disabled by the ESC Q 22 command. A-52...
Selects printer. (EPSON) ASCII Code Hexadecimal Value Decimal Value This command causes the printer to be enabled after it has been disabled by the DC3 command. Deselects printer. (EPSON) ASCII Code Hexadecimal Value Decimal Value This code deselects the printer. The printer remains deselected until it receives a DC1 command or power is turned off then on again.
Page 55
Decimal Value 27 81 n This sequence tells the printer not to accept data from the host. The host must reset the printer or select the printer by using DC1 (Select Printer) to accept data. To deselect the printer, use ESC Q22.
ESC @ Initializes the printer. (EPSON) ASCII Code ESC @ Hexadecimal Value 1B 40 Decimal Value 27 64 This sequence causes the printer to be initialized and resets the printer to its default settings. A-55...
Page 57
1B 6A n Decimal Value 27 106 n This command stops the printer. The printer goes offline and a BUSY signal is sent to the computer. To place the printer online, press the Online/Offline key. ESC U Sets printing direction. (IBM, EPSON)
Page 58
This printer according to the Native COMPUPRINT Mode supports the following printer commands. Each command has the following structure: • Name and function description. • Information about protocol. • The hexadecimal and decimal codes for the command: n represents variable parameters of the command.
Decimal Value 20 20 27 51 56 This command sets vertical spacing to 8 lines per 30 mm. DC4 DC4 ESC A Sets the horizontal spacing to 15, 17, 20 CPI. (Compuprint) ASCII Code DC4 DC4 ESC A n Hexadecimal Value...
Page 60
27 25 n This command controls cut sheet feeding (ASF) according to the parameters below: Description Disables ASF and the printer (off line) after ejecting cut sheet Enables the ASF and selects Bin 1 Enables the ASF and selects Bin 2...
Page 61
First sheet fed from bin 1 and following from bin 2 Selects envelope tray Ejects the sheet without selecting DC4 DC4 ESC g Selects LQ fonts (Compuprint). ASCII Code DC4 DC4 ESC g n Hexadecimal Value 14 14 1B 67 n...
Page 62
DC4 DC4 ESC S Selects character set ISO Character Sets or Code Pages. (Compuprint) ASCII Code DC4 DC4 ESC S n Hexadecimal Value 14 14 1B 53 n Decimal Value 20 20 27 83 n Character Set ISO 8859/1 Latin 1...
Page 63
Character Set TASS Cyrillic CP 852 Eastern Europe CP 876 OCR-A CP 877 OCR-B CP 855 Cyrillic CP 866 Russian GOST Cyrillic CP 437G Greek CP 853 Turkish CP 857 Turkish CP 867 Turkish CP 858 Euro PC Multilingual 96 Greek A-62...
Page 64
DC4 DC4 ESC ! Bar Code Selection (Compuprint). ASCII Code DC4 DC4 ESC ! h t f F r o q b s B S i EM Hexadecimal Value 14 14 1B 21 h t f F r o q b s B S i EM...
Page 65
F = Font selection for the printable characters Selection Selected font by r value Default font for text Special font for OCR-A o OCR-B bar codes according to the t value Special font for OCR-A bar codes Special font for OCR-B bar codes r = Bar code rotation Selection No rotation...
Page 66
EAN-8 DC4 DC4 ESC! n 1 p EM The EAN-8 bar code data field must only contain numeric data, and must be eight bytes long, check digit included. The EAN-8 character repertoire provides 0 to 9 ASCII numeric figures. n indicates the bar code height in units of 1/6 inch and must be in the range 1 to 12.
Page 67
2 of 5 DC4 DC4 ESC! n 17 p EM Interleaved The 2/5-INTERLEAVED bar code does not have a defined format length. However, the total sum of the characters must be even. n indicates the bar code height and must be in the range 1 to 12. p must be NUL (hex.
Page 68
A B C D E N T * a b c d e n t (only as START/STOP characters) The printer allows any combination of START/STOP characters. If the first and last characters of the received string do not belong to the START/STOP characters subset, question marks will be printed in place of HRC string, if possible.
Page 69
ASCII character set, including control codes. Since GS and EM control codes used within the Compuprint DC4 DC4 ESC (...EM ”Print Bar Code” control sequence are part of the supported character set, the host application must SET THE HIGHER-ORDER BIT of the above control codes to allow the printer distinguish between encodable data and string terminators.
Page 70
DC4 DC4 ESC @ Hexadecimal Value 14 14 1B 40 Decimal Value 20 20 27 64 This command resets the printer mode and clears the buffer of printable data. DC4 DC4 ESC Y Selects emulation. (Compuprint) ASCII Code DC4 DC4 ESC Y n...
Page 71
This appendix contains the selected character sets and the hexadecimal to decimal conversion table.
Page 73
“ § & ‘ ’ Ç É á ü æ í é Æ ó â ô ú ä ö ñ à ò Ñ å û ª º ç ù ¿ ê ÿ • ë ö ¬ è Ü ½ ï ¢...
Page 74
FRANCE GERMANY U.K. £ DENMARK 1 ½ SWEDEN ITALY • SPAIN 1 JAPAN ½ NORWAY DENMARK 2 SPAIN 2 LATIN AMERICA < > < > à ° ç § < > § Ä Ö Ü < > < > Æ Ø...
Page 75
Ø ↕ “ ± & ↕ ‘ ° • • ’ Ç É á ü æ í é Æ ó â ô ú ä ö ñ à ò Ñ å û ª º ç ù ¿ ê ÿ • ë ö...
Page 111
This appendix provides technical information for the parallel interface serial interface.
Page 112
The parallel interface of this printer fully supports the specific features requested by the EPSON and IBM printer connection in monodirectional mode and the Compatibility and Nibbles modes in bidirectional mode, plus the negotiation phases and the device identifier (as The parallel interface is available on a specific 36 contact connector type AMPHENOL 57-40360-12-D56 or equivalent connector for 1284 Type B.
Page 113
According to the IEEE - P1284 Standard, the pins assume different meanings and are identified by different names depending on the actual handshaking mode as follows: • Compatibility mode (Centronics) This is the lower level mode provides an asynchronous, byte-wide forward (host-to-peripheral) channel with data and status lines used according to their original definitions.
Page 114
The link protocol is mainly based on the following three phases: • Negotiation Phase This phase is activated always by the host, only when in compatibility mode, and defines: − whether a bidirectional link protocol can be established. − the handshaking mode as well as the communications mode to be used. −...
Page 115
Clock signal which controls data transmission with its falling edge Negative pulsed signal indicating that the printer has received data and is ready to accept the next set of data. Also sent when the printer is switched from off-line to on-line and at the end of the initialization time.
Page 116
The pins 1 to 14 of the printer are connected to the pins with the same number of the The pins 19 to 30 of the printer are connected to the pins 18 to 25 of the parallel port of The pins 31, 32 and 36 of the printer are connected respectively to the pins 16, 15 and 17 of the parallel port of the host.
Page 117
Common Logic Ground Chassis Ground Pin N° for Return Wire 16 and Return Wires Source HOST HOST in Compatibility mode and negotiation phase. NOT USED in Nibble mode. BIDIRECTIONAL in Byte mode. PRINTER PRINTER PRINTER PRINTER HOST PRINTER HOST PRINTER...
Page 118
Compatibility Mode: Negotiation Phase: Reverse Data Transfer Phase: Set Active low to transfer data into printer input latch. Data is valid while nStrobe is low. Set active low to transfer extendibility request value into printer input latch. Data is valid on the falling edge of HostClk.
Page 119
Set high to indicate that the printer in on-line. Negotiation Phase: The Xflag refers to extendibility flag. Used by the printer to reply to the requested extendibility byte sent by the host during the negotiation phase. The signal level is low for Nibble Mode, high for Byte Mode.
Page 120
1284 idle phase is being aborted and the interface returns to Compatibility Mode. Peripheral Logic High (+ 5V) Set high to indicate that all other signals sourced by the printer are in valid state. Set low to indicate the printer is off. n.a. (nInit)
Page 121
Set high in conjunction with Host Busy being set low to request a 1284 mode. Reverse Data Transfer Phase: Set high to indicate that bus direction is printer to host. Set low to terminate 1284 mode and set bus direction host to printer.
Page 122
Timing and Handshaking depend upon the connection mode. Our Centronics mode supports the BUSY-WHILE-STROBE busy signal timing and ACK-IN-BUSY as BUSY-ACK relationship. Legend Time interval Data Setup Time Strobe Pulse Width Data Hold Time Busy While Strobe Ack in Busy Min.
Page 124
This printer provides the RS-232/C The interface mode is selected via printer setup (see “Printer Setup” in the User Manual). • Transmission Type Data is sent and received in start/stop (asynchronous) transmission. • Character Format Each character is transmitted in the following format: 1 START BIT + 8 DATA BITS + 1 PARITY BIT + 1 STOP BIT The least significant bit of the data bits is sent first after the start bit.
Page 125
Circuit Source Circuit Printer Data Set Printer C-15 Description This printer is shipped with pin 1 connected to the frame ground (protective ground). Transmitted Data Signal (an output from printer). A MARK condition is held during IDLE communication state. An...
Page 126
Active HIGH level signal. Indicates that the host or data set is ready to be connected to the printer and is ready for data transfer. Active HIGH level signal. Indicates that the host is transmitting or the data set is receiving the Data Carrier signal.
A MARK level is expected when sender is in idle state. Receive Return. Signal Ground. Always connected to the 0 Volt of the power supply. Cable Shield. Optionally connected to the frame ground of the printer via a suitable jumper. C-17...
Need help?
Do you have a question about the 4051 and is the answer not in the manual?
Questions and answers