Transcript
IF1101 THERMAL PRINTER CONTROLLER Operation Manual - Version 1.0 June-2006
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
Revision list for the IF1101 thermal printer controller operation manual. Date: 19-6-06 Page
Type of revision
Before change
After change
2
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
INDEX IMPORTANT NOTES ON IF1101 INTERFACE HANDLING................................ 4 1- INTRODUCTION.............................................................................................. 5 2- INSTALLATION................................................................................................ 6 2.1- POWER SUPPLY CONNECTOR....................................................... 7 2.2- SERIAL PORT CONNECTOR (RS232).............................................. 8 2.3- PARALLEL PORT CONNECTOR (CENTRONICS)............................ 9 2.5- EXPANDER CONNECTORS.............................................................. 9 2.6- INTERFACING WITH A PERSONAL COMPUTER............................ 10 2.6.1- Parallel input/output.............................................................. 10 2.6.2- Serial input/output................................................................. 12 3- BASIC OPERATION......................................................................................... 14 3.1- LOADING PAPER............................................................................... 14 3.1.1- Automatically loading paper.................................................. 14 3.1.2- Manually loading paper......................................................... 14 3.2- PAPER FEED..................................................................................... 15 3.3- TEST PRINT PROCEDURE............................................................... 15 3.3.1- Programming the baud rate.................................................. 15 3.3.2- Hexadecimal mode............................................................... 16 4- ERROR PROCESSING................................................................................... 17 5- PRINTER COMMANDS................................................................................... 18 APPENDIX A- SPECIFICATIONS........................................................................ 27 APPENDIX B- EXTERNAL COMPONENTS IN IF1101 INTERFACE...................28 APPENDIX C- PHISICAL DIMENSIONS.............................................................. 29
3
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
IMPORTANT NOTES ON IF1101 INTERFACE HANDLING In order to guarantee a long life of the printer, it is necessary to keep some precautions on IF1101 interface handling. Please read carefully next lines to make a good use of the printer. • Beware not to invert power supply polarity. This may irremediably damage the interface. • Use power supply voltage within specified range. Overvoltage may irremediably damage both interface or printer. Voltage under the specified range may cause incorrect operations. FENIX advise to use, at least, a 30W power supply (for VCC=VP= 5V DC) . • When switching the power supply ON, turn on Vcc and Vp simultaneously, or turn on Vcc first, and then Vp. • When switching the power supply OFF, turn off Vcc and Vp simultaneously, or turn off Vp first, and then Vcc. • Before connecting any input interface, verify the correct operation of both IF1101 interface and LTP1245 thermal printer mechanism, with self test feature. • Avoid using IF1101 interface in environments where there are excessive temperatures or moisture. • Never modify the IF1101 interface.
4
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
____________________________________________________________________
1 – INTRODUCTION IF1101 are low cost-high performance interface which covers any application that is available a small place, need low noise and low power supply. It have graphics capabilities and bar code. Main features of IF1101 interface are: • • • • • • • • • • • • •
Easy maintenance structure. Easy installation procedure. Compact and lightweight. Single 5V DC power supply. High resolution printing (8 dots/mm). Both parallel CENTRONICS and serial RS-232 data input interfaces. Allowed normal, double width, double height and double width-height attributes. Programmable character and line space. Graphic bitmap printing capabilities. CODE39 Bar Code. Hexadecimal mode for easy software debugging. Supports an auto-loading function, so paper exchange. Self test feature.
This manual is a guide of interface operations and is addressed to the application’s designer. In following chapters there is a detailed description of hardware and software configuration to use the features of IF1101 interface.
5
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
2 - INSTALLATION Before using IF1101 interface, you must follow basic steps: 1- User can connect a LED (CON2), which main function is visual power supply indicator, and a push-button (CON3), which main function is feed paper (see APPENDIX B-EXTERNAL COMPONENTS IN IF1101 INTERFACE). 2- Connect the expander cable (CON4). 3- Connect data interface cables to the interface (CON6 for serial interface or CON5 for parallel interface). 4- Connect power supply cables (CON1). IF1101 connectors are located according to next picture: EXPANDER CONNECTOR
LED
PUSHBUTTON
PUSHBUTTON ON BOARD
SERIAL INTERFACE
PARALLEL INTERFACE
POWER SUPPLY
Fig. 2.1- On board connectors.
Fig. 2.2- IF1101–IFCON1500 connection. 6
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
To check the correct operation of printer/interface, use the self-test feature. To enter self-test mode, user must power the printer on with paper feed button pressed. Depending on the construction materials, care must be taken with static electricity; otherwise tickets may get stuck in the paper guide and never reach the receptacle. Be sure to make a good earth connection, performing one of the following schemes:
IF1101
Power supply C0N1
shorted
a) The earth connection is at the power supply and shorted with the negative terminal. The chassis is connected to earth shorting the jumper J1.
Con7 Chassis earth
IF101
Power supply C0N1
NOT shorted
b)The negative terminal is floating. The chassis is connected to earth by a cable from the main earth connection.
Con7 Chassis
Fig. 2.3- IF1101 earth connection. 2.1- POWER SUPPLY CONNECTOR Attach power supply cable to connector CON1. Verify power supply voltage before making the connection. Terminal nº Signal Name 1 GND 2 VCC 3 VP 4 GND
1
2
Function GND Logical power (5V DC) Printer power (5V DC) GND
3
4
Fig.2.2- Power supply connector CON1. Use a connector JST Ref.
VHR-4N (housing)
SVH-21T-P1.1 (contacts)
7
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
The power supplies must satisfy the following conditions: VCC (for logic electronics) : VP (for thermal head and motor):
5V DC +/- 0,25v , 0,2 A 5V DC +/- 0,25v
The maximum current consumption (Ipmax) for thermal head and motor change according to the following equation : Ip = N*Vp/(Rh) +0,4 (A) Ip: Peak current (A) N: Number of dots that are driven at the same time (max=192 max.) Vp: Head driven voltage (V) Rh: Head resistance (176 Ohms) 0,4 : maximum current for driving the motor •
For example, if VP = VCC = 5V DC, N =64 and Rh = 176 ohms Ipmax = 64*5/(176)+0,4 = 2,2 A
•
If VP=VCC = 5V DC, N=192 and Rh = 176 ohms Ipmax = 192*5/(176)+0,4 = 5,8 A
WARNING : Beware not to invert the polarity of power supply. This may irremediably damage the printer. Power must be turned on in proper order. Turn on both Vcc and Vp simultaneously, or turn on Vcc first and then Vp. Otherwise, the LTP1245 thermal printer may be damaged. To turn the power off, first turn off Vp and then Vcc or turn off both Vcc and Vp simultaneously. FENIX advise to use, at least, a 30w power supply (VCC=VP=5V DC). 2.2- SERIAL PORT CONNECTOR (RS232/TTL) If you use serial interface, attach serial port cable to connector CON6. Terminal nº 1 2 3 4 5 6 7-8 9-10
Signal Name DTR DSR TxD CTS RxD RTS NC GND
Function Out!Data Terminal Ready In "Data Source Ready Out!Transmit Data In "Clear To Send In "Receive data Out!Request To Send GND
RS 232 2 1
10 9
Fig. 2.3 - RS-232/TTL connector CON6. Use a connector JST Ref.- RA-1011 (housing)
RA-SC1290 (contacts) 8
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
2.3- PARALLEL PORT CONNECTOR (CENTRONICS) If you use parallel interface, attach CENTRONICS cable to connector CON5. Terminal nº 1 2 3 4 5 6 7 8 9 10 11 12 13 14-16
Signal Name /STB DATA0 DATA1 DATA2 DATA3 DATA4 DATA5 DATA6 DATA7 /ACK BUSY PE /ERROR GND
Function In " Strobe In " Data Bus
Out!Acknowledge Out!Busy Out!Paper Error Out!Error GND
CENTRONICS 2 1
16 15
Fig. 2.4 - Centronics connector CON5. Use a connector JST Ref.-
RA-1611 (housing) RA-SC1290 (contacts)
2.5- EXPANDER CONNECTOR This connector allows to carry all the Seiko LTP1245 thermal printer mechanism control lines, by a flat cable, to the IFCON1500 board, that incorporates the original LTP1245 connectors. So, It doesn’t need to install the interface extremely near to the mechanism.
Terminal nº 1 2 3 4 5 6 7 8 9 10 11-12 13-14
Signal Name nc PED /B B A /A PE CABD CAB GND VP GND
Function Paper sensor driver Out!Motor drive Out!Motor drive Out!Motor drive Out!Motor drive Out-of-paper detector Head-up sensor driver Head-up detector GND Thermal head voltage GND 9
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
15 TERM Thermistor signal 16 VCC Logic power supply 17-18-19-20- DST6-DST5-DST4 Thermal head print 21-22 DTS3-DTS2-DTS1 activation signal 23 HLATCH Print data latch 24 HCLK Synchronising signal 25 HDATA Data signal 26-27-28 GND GND 29-30 VP Thermal head voltage 31-32-33-34 Nc
Use a connector JST Ref.-
RA-3411 (housing) RA-SC1290 (contacts)
2.6- INTERFACING WITH A PERSONAL COMPUTER Before connecting any cable to IF1101 interface check the correct pinout. 2.6.1- PARALLEL INPUT/OUTPUT Following drawings show how to make the interface cables with a compatible PC.
/Strobe Data 0 Data 1 Data 2 Data 3 Data 4 Data 5 Data 6 Data 7 /Acknowledge Busy Paper end /Error GND GND GND
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 PANEL-10 CENTRONICS CONNECTOR
1 2 3 4 5 6 7 8 9 10 11 12 15 18 to 25
PC CENTRONICS DB-25M CONNECTOR
Fig. 2.8 - Centronics cable pinout. The busy and acknowledge signal are output every byte. If 128 bytes have been stored in the IF1101 input buffer, the busy status continues until the amount of data stored in the input buffer becomes 127 bytes or less.
10
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
Use a connector JST Ref.-
RA-1611 (housing) RA-SC1290 (contacts)
DATA
VALID T3
T4
T5
!STROBE
BUSY
T1
!ACK
T2
T1 - T2 : APROX. 5 uS T3 - T5 : 0,5 uS OR MORE
Fig.2.9 - Timing for receiving parallel data.
Strobe (!STROBE) : input pin, CON4-1 • Triggers reading of 8-bit parallel data (DATA0~DATA7). • This signal is ignored when the BUSY signal is high. • The !STROBE signal is normally high. The data on the data lines (DATA0~DATA7) are placed into the buffer at the transition of this signal to low. Data (DATA0~DATA7): input pin, CON4-2 through 9 • Carries 8-bit parallel signals from the host device. • When high is 1 and low is 0, the data on these lines are placed by the !STROBE signal. Busy (BUSY): output pin, CON4-11 • The BUSY signal indicates that the IF1101 interface is ready to receive data. • When the BUSY signal is low, data can be input. This signal remains high from the transition of the !STROBE signal to low until the time when the data input processing is complete to indicate that the IF1101 is unable to receive data. Acknowledge (!ACK): output pin, CON4-10 • The !ACK signal indicates that data reception is complete. • The !ACK signal is normally high. A pulse approximately 5 uS wide is generated when one-byte of data has been input. • The IF1101 interface generates this signal to indicate to the host device that it can receive further input data.
11
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
2.6.2- SERIAL INPUT/OUTPUT The IF1101 interface continues to receive data during print operation. The IF1101 interface serial input/output signals are RS232C level. The IF1101 interface receives and checks serial data according to the transmission bauds programmed. If the input data cannot be printed correctly, the transmission conditions between the host device and the IF1101 interface most likely does not match. If this happens, adjust the conditions so that they match.
1 2 3 4 5 6 7 8 9 10
DTR DSR Transmit CTS Receive RTS N.C. N.C. GND GND
DSR DTR Receive RTS Transmit CTS
GND
PANEL-10 CONNECTOR
1 2 3 4 5 6 7 8 9 10
DTR DSR Transmit CTS Receive RTS N.C. N.C. GND GND
6 4 2 7 3 8
5
PC RS-232 DB-9F CONNECTOR
DSR DTR Receive RTS Transmit CTS
GND
PANEL-10 CONNECTOR
6 20 3 4 2 5
7
PC RS-232 DB-25F CONNECTOR
Fig. 2.10 - RS-232 cable pinout CON2. Use a connector JST Ref.-
RA-1011 (housing) RA-SC1290 (contacts)
12
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
T1
SBUSY
T1: typ. 20uS T2: typ. 20 uS + 1/baud rate START
RXD
STOP 1
0 0 0
1
1
0
0 T2
STOP
TXD 1
1
0
0
1
0
0
0
When 31H is sent and the buffer becomes full
Fig.2.11- Serial input/output signal timing char. Serial data output (TXD): output pin, CON6-3 • Data is output according to the transmission conditions which has been programmed . Serial data input (RXD): input pin, CON6-5 • Data input port • Data is input from the host device according to the transmission conditions which has been programmed. Serial busy (/RTS): output pin, CON6-6 • Indicates whether or not the IF1101 interface is ready to receive data. • When the /RTS signal is low, data can be input. Serial error (/DTR): output pin, CON6-6 • Indicates whether or not the IF1101 interface has an error. • When the /DTR signal is low, data shouldn’t input.
13
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
________________________________________________________________
3 - BASIC OPERATIONS ________________________________________________________________ IF1101 interface is initialised through power-on (power-on reset). When an error occurs in the peripheral circuits, the error code is send by serial output. 3.1- LOADING PAPER IF1101 interface allows two ways to load the paper in the LTP1245 thermal printer mechanism . 3.1.1- AUTOMATICALLY LOADING PAPER The IF1101 interface has an auto-loading function for replacing paper easily. Autoloading function loads paper automatically when paper is inserted at the paper inlet and the head is down. When the head is up, the auto-loading function is not performed. The amount of paper sent in auto-loading is 320 dot lines (approx. 4 cm).In this case, the driving speed is a quarter of the maximum drive speed determined from Vp voltage. The operation of auto-loading is as follows: Cut the edge of the paper so that the corners of the paper are square (170º).
Fig. 3.1 - Cut paper to load. 1. The LTP1245 must have no paper. If there is paper in the LTP1245 mechanism, remove the paper by feeding the paper in the forward direction. 2. Insert the paper into the paper inlet with the head in down position until the paper stops, then the paper load automatically. 3.1.2 - MANUALLY LOADING PAPER When the head is up, it is possible to load paper manually. Guide sharp paper to printer paper input (see Fig. 3.1) and be careful to align paper with panel hole perfectly. 1. The head must be in the up position. 2. Insert the paper into the paper entrance until the paper comes out of the paper exit. 3. Make sure that the paper is straight in the printer, then put the head in the down position. Then, the IF1101 interface will feed automatically an amount of paper (approx. 4 cm).
14
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
3.2 - PAPER FEED IF1101 interface has two on-board pads to solder the push-button cables. Main function is to allow user to do paper feeding when paper is loaded. IF1101 interface feeds paper until the push-button is release. 3.3 - TEST PRINT PROCEDURE By the push-button, the IF1101 interface performs the self-test function, too. To enter in self-test mode, user must power the IF1101 interface on with paper feed pushbutton pressed. The current baud setting and all available characters are printed when a test print is performed. Through this function, you can simply confirm the current baud setting and whether or not the IF1101/LTP1245 prints correctly. 3.3.1- PROGRAMING THE BAUD RATE In the IF1101 interface only is necessary to configure the baud rate (if serial interfacing communication is used). To enter in programming mode, user must perform the autotest and hold the pushbutton pressed at the end. Automatically, the IF1101 interface will print the text: ~~~~~~~~~ PROGRAMING SERIAL PORT ~~~~~~~~~~ Release the button to 19200 BAUD If user release the push-button within the next 5 seconds, the IF1101 interface will print the text: SERIAL PORT SAVED AT ... 19200 BAUD Otherwise, if user hold the push-button pressed after the 5 seconds, the IF1101 interface will print the text corresponding to the next allowed baud: Release the button to 9600 BAUD The process go on in the same way, printing the texts Release the button to 4800 BAUD Release the button to 2400 BAUD cyclically, until user release the push-button at one of them.
15
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
3.3.2- HEXADECIMAL MODE Immediately after baud rate is programmed, IF1101 interface will print the text: ~~~~~~~HEXADECIMAL MODE~~~~~~~~~ Press the button for enter in HEXADECIMAL MODE .................................
If user press the push-button within the next 5 seconds, IF1101 interface will print the text: ---HEXADECIMAL MODE ACTIVATED--reporting that IF1101 is in hexadecimal mode. Else, IF1101 interface is in normal mode, waiting for some command or data. When the hexadecimal mode is activated, all data received are printed in hexadecimal code (no command is performed). Through this function, user can confirm simply whether or not the data sent from the host device are received correctly or the correct data from the host device has been sent.
16
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
________________________________________________________________
4 – ERROR PROCESSING ________________________________________________________________ The IF1101 processes 2 types of error: • Head temperature error. • Head-up/Out-of paper error. When an error occurs, the IF1101 reports it to the host sending a one-byte code via TxD (CON4, Pin 15), in the present baud rate configuration. Printing is not available and no other operation is performed. Reception of data is not allowed (/RTS=1 and /DTR=1 CON4, PIN16 for serial transmission, BUSY = 1 CON4, PIN11 for parallel transmission). The error is continuously transmitted until its cause disappears (in case that the IF1101 can recover from that error). The causes of the errors and the corresponding recovery are listed below. •
HEAD TEMPERATURE ERROR. If the thermal head temperature is higher than 80ºC, a head temperature error occurs. The IF1101 reports the error sending the 68H code via TxD (for the serial transmission) and setting the CON4, PIN13 (/ERR) to 0 (for the parallel transmission). This is a recoverable error. The IF1101 allows printing when thermal head temperature goes below 59ºC.
•
HEAD-UP/OUT-OF PAPER ERROR. If the head is up or is not paper, an error occurs. IF1101 interface rapports the error sending the 63H code from TxD. It is possible to know this error testing PE signal (CON4, Pin 12). This error is not recoverable. User must lower the head (2) and load paper (3).
Fig. 4.2 – Head-up and paper input. 17
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
________________________________________________________________
5 - PRINTER COMMANDS ________________________________________________________________ The IF1101 has two printing modes of operation. First one is text mode, which prints normal text in ASCII code. Second one is graphic mode which allows printing bitmap images and pictures. The IF1101 printer is designed like a terminal that can recognize some software control codes. There are some codes which perform the same action. This allows compatibility with some popular printers. Next figure shows the set of characters supported by the IF1101: .
Fig. 5.1- PC437 Standard Europe character table
WARNING: To ensure that the printed area of the ticket goes totally out of the LTP1245 mechanism before being cut, just after the last printed byte user must send the paper feed command “ESC J n” ( n = 100 approx.) so as the last printed line in the ticket advances from the thermal head to the user outlet.
18
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
________________________________________________________________ LF LINE FEED ________________________________________________________________ Decimal codes: <10> Hexadecimal codes: <0A> Function: Provides the same function as CR. Any LF code received immediately following a CR is ignored. ________________________________________________________________ CR CARRIAGE RETURN ________________________________________________________________ Decimal codes: <13> Hexadecimal codes: <0D> Function: Prints the contents of the line buffer in the currently selected print mode, and then feeds paper a predefined distance. Operation: Line spacing is initialised to 16 dots when power is turned on or when a reset is performed. The IF1101 only performs a line feed operation when the line buffer is empty. The amount of paper feed for one line is the amount of line spacing plus the character height which is set at that time. Any LF code received immediately following a CR is ignored. ________________________________________________________________ CAN CANCEL _______________________________________________________________ Decimal codes: <24> Hexadecimal codes: <18> Function: Cancels the contents of the line buffer that have been received before this code. Operation: Clears the print buffer. ________________________________________________________________ ESC + ‘@‘ RESET ________________________________________________________________ Decimal codes: <27><64> Hexadecimal codes: <1B><40> Function: Initializes the IF1101 Operation: The IF1101 clears the contents of the line and input buffers. Be careful that all data which has been input before reset processing disappears after reset code input.
19
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
________________________________________________________________ ESC + ‘J‘ + n n-dot LINE FEED ________________________________________________________________ Decimal codes: <27><74> Hexadecimal codes: <1B><4A> Function: Feeds the paper forward. n can take on value from 0 to FFH (0 to 255 dot line). Operation: Feeds the paper by the specified line spacing then feeds n dot lines forward. ________________________________________________________________ ESC + ‘A’+ n n -DOT LINE SPACING ESC+ ‘3’ + n ________________________________________________________________ Decimal codes: <27><65> Hexadecimal codes: <1B><41> Function: Sets line spacing to “n” dots. (line spacing in mm = “n” x 0,125). “n” can take on value from 20H to 7FH (4 to 127 dot line). The default value for “n” is 16H (2,5mm). ________________________________________________________________ ESC + SP+ n CHARACTER SPACING ________________________________________________________________ Decimal codes: <27><32> Hexadecimal codes: <1B><20> Function: Sets the character spacing to n dots. The least significant 4 bits are valid for n (0 to 16). Operation: The specified amount of space is appended to the right side of each character. The n is initialised to 4 dots. The LTPH245 is 384 dots width, and the IF1101 internal character font is 8 (width) x 16 (height). So, the following table shows the number of the column that user can get changing the character spacing (in normal character: 8 dots width):
Character spacing n=1 n =2 n =3 n =4 n =5 n =6 n=7 n=8 . . .
Column number (characters/line) 42 38 34 32 29 27 25 24 . . .
Table 5.1- Character/line in relation to character spacing. 20
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
________________________________________________________________ ESC + ‘W’ + n DOUBLE-WIDTH ________________________________________________________________ Decimal codes: <27><87> Hexadecimal codes: <1B><57> Function: Turns on/off double width mode. Only the least significant bit is valid for n. n = 0 : Turns double-width mode off (default). n = 1 : Turns double-width mode on. Operation: Prints double width characters. Character spacing is also doubled (up to 254 dots). A line may contain normal size, double-width, and/or double-height characters. The IF1101 enters double-width/double-height mode if double-height mode is also active. Whenever double-width mode is set to ON, the characters’ new width is 2, despite of the previous value of the X-Scale. Whenever double-width mode is set to OFF, the characters’ new width is 1, despite of the previous value of the X-Scale. The X-Scale command sets the characters’ new width, despite of the previous state of the double-width mode. These commands do not affect the characters’ height. ________________________________________________________________ ESC + ‘w’ + n DOUBLE-HEIGHT ________________________________________________________________ Decimal codes: <27><119> Hexadecimal codes: <1B><77> Function: Turns on/off double-height mode. Only the least significant bit is valid for n. n = 0 : Turns double-height mode off (default). n = 1 : Turns double-height mode on. Operation: Prints double width characters. A line may contain normal size, doublewidth, and/or double-height characters. The IF1101 enters double-width/double-height mode if double-width mode is also active. Whenever double-height mode is set to ON, the characters’ new height is 2, despite of the previous value of the Y-Scale. Whenever double-height mode is set to OFF, the characters’ new height is 1, despite of the previous value of the Y-Scale. The Y-Scale command sets the characters’ new height, despite of the previous state of the double-height mode. These commands do not affect the characters’ width.
21
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
________________________________________________________________ ESC + ‘V’ + nl + nh + Image Data BIT IMAGE SPECIFY ________________________________________________________________ Decimal codes: <27><86> Hexadecimal codes: <1B><56> Function: Prints bit image. nl,nh : number of dot lines in vertical direction. nl represents the least significant byte and nh represents the most significant byte. Number of dot lines = nh x 256+nl 0<=nlnh<=FFFFH(65535) Ignored when nl=nh=0 Operation: Enter the image data following nl and nh. Since data for one dot line is 48 bytes, the amount of image data is as follows: Amount of image data =(nhx256+nl)x48 bytes The data following nl and nh is printed out entirely as image data. A bitmap picture may be considered like a bidimensional array of bits. Each bit corresponds to a graphic dot (called “pixel”) of the image. If bit is at logical state ‘1’ pixel is not printed. If bit is at logical state ‘0’ pixel is printed. Because of memory configuration, bits are grouped in bytes of 8 bits each one. However, pixels in the image are grouped in bytes, too.
bit 0 ...
... bit
*
byte 1 byte 2 byte 3 byte 4 byte 5 byte 6 byte 7
*
*
* * * * * * * * * * * * *
byte 8 ‘ ’ = bit at logical ‘1’ ‘*‘ = bit at logical ‘0’
Fig. 5.2 - Example of bitmap graphic Picture is then represented by an array of bytes, each byte having 8 horizontal pixels (bits) of the image. Bytes are grouped in graphics rows. Each row in printer mechanism contains : 48 bytes x 8 bits = 384 pixels in a row
22
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
This is a fixed number and user cannot change it. Number of rows is freely configured by user and is limited to a maximum of 65535 in each graphic command.
byte 1 ... 1 2 3 4 5
2
... byte 24 3
........
4
22
23
24
. . .
N-1 N N = number of graphic rows (max. 65535). Each byte has 8 pixels horizontally.
Fig.5.3 - Bitmap image layout
To enter the graphics mode there is one escape sequence available ESC
V
n1
n2
data
where: ESC V n1 n2 data
is escape character (27 dec., 1B hex.) is “V” character (uppercase) is the number of graphics rows in binary format (low byte) is the number of graphics rows in binary format (high byte) are the bit image data to print
For example, if graphic data of ‘A’ character is: row 1 row 2 row 3 row 4 row 5 row 6 row 7 -
11101111 bin = EF hex 11010111 bin = D7 hex 10111011 bin = BB hex 10111011 bin = BB hex 10000011 bin = 83 hex 10111011 bin = BB hex 10111011 bin = BB hex
To print this letter in graphic mode, we can send the following sequence of bytes: 1B hex “V” 7 0 EF hex 0 (23 times)
character ESC = 1B hex = 27 dec. character V character number 7 = 7 graphic rows (low byte) character number 0 = 7 graphic rows (high byte) first row of ‘A’ character character number 0 (23 times to complete the 24 bytes row) 23
FENIX IMVICO
D7 hex 0 (23 times) BB hex 0 (23 times) BB hex 0 (23 times) 83 hex 0 (23 times) BB hex 0 (23 times) BB hex 0 (23 times)
IF1101 INTERFACE OPERATION MANUAL
second row of ‘A’ character character number 0 (23 times to complete the 24 bytes row) third row of ‘A’ character character number 0 (23 times to complete the 24 bytes row) fourth row of ‘A’ character character number 0 (23 times to complete the 24 bytes row) fifth row of ‘A’ character character number 0 (23 times to complete the 24 bytes row) sixth row of ‘A’ character character number 0 (23 times to complete the 24 bytes row) seventh row of ‘A’ character character number 0 (23 times to complete the 24 bytes row)
Enter the data sequentially from the top leftmost byte (LSB) to the bottom rightmost byte (MSB), and from left to right in each dot line. ________________________________________________________________ ESC+’s’+n TRANSMIT CHARACTER ________________________________________________________________ Decimal codes: <27><115> Hexadecimal codes: <1B><73> Function: This control causes to transmit the next character received (“n”). The sequence “ESC s A” will not print character “A”, but it will be transmitted in serial from the IF1101 to the host device via the TxD pin (CON4, PIN15). If we use this function to memorize blocks of text, we can simulate a password which would be transmitted, for example, when the printer is switched on, or command codes on pressing the PRINT key, or tests to connected printers. ________________________________________________________________ ESC+’L’+n Y-SCALE ________________________________________________________________ Decimal codes: <27><76> Hexadecimal codes: <1B><4C> Function: This control sets the vertical scale for the characters table. “n” can take values from 1 to 47d. The Y-Scale command sets the characters’ new height, despite of the previous state of the double-height mode. Whenever double-height mode is set to ON, the characters’ new height is 2, despite of the previous value of the Y-Scale. Whenever double-height mode is set to OFF, the characters’ new height is 1, despite of the previous value of the Y-Scale. These commands do not affect the characters’ width.
24
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
________________________________________________________________ ESC+’X’+n X-SCALE ________________________________________________________________ Decimal codes: <27><88> Hexadecimal codes: <1B><58> Function: This control sets the horizontal scale for the characters table. “n” can take values from 1 to 47d. The X-Scale command sets the characters’ new width, despite of the previous state of the double-width mode. Whenever double-width mode is set to ON, the characters’ new width is 2, despite of the previous value of the X-Scale. Whenever double-width mode is set to OFF, the characters’ new width is 1, despite of the previous value of the X-Scale. These commands do not affect the characters’ height.
GS + ‘k‘ + n + DATA + NUL Decimal codes: Hexadecimal codes:
BAR CODE PRINT
<27><107>...<0> <1D><6B>...<00>
Function: Data is converted to a bar code designated with “n”. Lower 3 bits are valid in “n”. When input data does not match with code systems, a bar code is not printed. n=0 reserved n=1 “ n=2 “ n=3 “ n=4 CODE39 (1<104> <1D><68>
Function: Sets height of the bar code. n=1 to 255 : Height of the bar code (Unit: dot line) n=162 (default)
25
FENIX IMVICO
CONTROL
IF1101 INTERFACE OPERATION MANUAL
DECIMAL CODE LF <10> CR <13> CAN <24> ESC “@” <27><64> ESC “J” n <27><74> ESC “A” n <27><65> ESC “3” n <27><51> ESC SP n <27><32> ESC “W” n <27><87> ESC “w” n <27><119> ESC “V” n1 n2 <27><86> ESC “s” n <27><115> ESC “L” n <27><76> ESC “X” n <27><88> GS “k” n DATA <29><107 NUL ...<0> GS “h” n <29><104>
HEXADECIMAL CODE <0A> <0D> <18> <1B><40> <1B><4A> <1B><41> <1B><33> <1B><20> <1B><57> <1B><77> <1B><56> <1B><73> <1B><4C> <1B><58> <1D><6B> ...<00> <1D><68>
FUNCTION print and skip line print and skip line clear input buffer printer reset Fwd paper feed n-dot line spacing n-dot line spacing n-char spacing toggle double W toggle double H bit image graphics lines=n1+ 256 x n2 transmit character Y-scale X-scale bar code print bar code height
Table 5.2- Printer command summary.
26
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
______________________________________________________________
APPENDIX A - SPECIFICATIONS IF1101 Printing method Printing mechanism Data interface Dot composition/line Resolution Printing speed (mm/sec)(3) Paper width (mm) Printing width (mm) Character/line(4) Operating voltage range
Thermal dot line SEIKO LTP-1245 8 bit parallel CENTRONICS RS232 Serial/ TTL serial 384 8 dots/mm 21 58 48 32 (normal mode) Vcc --> 5V DC +/-5% Vpp --> 5V DC+/-5%
Current consumption Average ): (see 2.1.Power supply Vpp ---> 2,19 A (at 5v) connector). Vcc ---> 200 mA Maximum (in fixed division mode): Vpp ---> 5,7 A (at 5v) Interface dimensions (mm) 65x70 Operating temperature -0ºC to 50ºC (noncondensing) Storage temperature -20ºC to 60ºC (noncondensing) Weight (with chassis) 300 gr. aprox. Paper feed force 0,49N (50gf) or more Paper hold force 0,78N (80gf) or more Recommended thermal TF50KS-E2C (65 um paper) Paper TF77KS-E2 (95 um paper)(1) TC98KS-T1 (125 um paper)(1)(2) TL69KS-HG76 (label paper)(1) TL69KS-R2 (high-proof paper) TW80KK-S (2-ply thermal paper) Life span (at 25ºC and rated energy) Activation pulse resistance 100 million pulses or more (print ratio = 12,5%) Abrasion resistance 50 Km or more (1) Can not be used in curled path. (2) Can not be used in the LTP1245E and LTP1245F (3) At 25ºC of thermal head temperature, normal carácter (16 dot lines) and line spacing of 16 dots. (4) 4 dots character spacing(See ESC+SP+n command).
27
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
____________________________________________________________________
APPENDIX B – EXTERNAL COMPONENTS IN IF1101 INTERFACE Connect the external components as show the next picture. The LED and the push-button must been soldered on the board pads.
LED POWER ON
PAPER FEED BUTTON
120 mm
Visto parte agujeros PFCS-34-02
Polarizador
Visto parte posterior PFCS-34-02
Polarizador
28
FENIX IMVICO
IF1101 INTERFACE OPERATION MANUAL
________________________________________________________________
APPENDIX C - IF1101 INTERFACE PHYSICAL DIMENSIONS ________________________________________________________________
29