Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Design by
Bit Advanced Processing Utilities Pvt. Ltd.
Katraj, Pune – 411046
sales@bitadvanced.com
www.bitadvanced.com
TABLE OF CONTENTS
Features
Specifications
Connection Details
Communication Settings
Power ON Status
Command Set
Command Description
Character Table
www.bitadvanced.com
Features
1. Small in size 50 X 65mm.
8. Easy integration into your housing with four mounting points only.
www.bitadvanced.com
Specifications
5. Interface : RS232
7. Number of columns : 6
www.bitadvanced.com
Connection Details
All connection details are shown in following figure. To work properly do
all connections according to given details
JUMPER
SETTING
POWER SUPPLY
5 TO 6 VDC, 2A
GND RX
CTS TX
www.bitadvanced.com
Communication Settings
To communicate with Thermal Printer Baud rate must be 9600 bits per
second, data bits must be 8, Parity should be None, Stop bit should be 1, and
flow control should be set to none.
www.bitadvanced.com
Power On Status
At every Power ON mode, message like “PRINTER IS READY” will
emerge on serial port.
After successful Power On, printer will go into default settings. And those
settings are as follows:
Strobe count = 11
www.bitadvanced.com
Command set
Command
SR.NO Command Description Response
in Hex
1 ESC DP 1B 44 50 Data for printer
01H
2 ESC LF 1B 4C 46 End of line
02H OK
3 ESC HT 1B 48 54 Tab
03H
4 ESC CN 1B 43 … Set the Space between two lines.
04H
5 ESC PN 1B 50 … Set the number of line in one paragraph
05H
6 ESC SN 1B 53 … Set the Space between two paragraphs.
06H
7 ESC RP 1B 52 50 Set Reveres Print
07H
8 ESC RS 1B 52 53 Reset Reveres Print
08H
9 ESC TN 1B 54 … Character code table selection
09H
10 ESC FN 1B 46 … Feeds paper in forward direction
AH
11 ESC KN 1B 4B … Reverse paper feed.
BH
12 ESC @I 1B 40 49 Printer initialization. (Default)
CH
13 ESC MY 1B 4D 59 Test print
DH
14 ESC UD 1B 55 44 User data $ 48byte #
EH
15 ESC DC 1B 44 43 Double char
FH
16 ESC BN 1B 42 ….. Byte line space (Less than 5)
10H
17 ESC IN 1B 49 ….. Strobe count
11H
www.bitadvanced.com
Command Description
1) ESC DP: Data for printer
This command ESC DP is used to print data. Data followed to ESC DP command will get
printed as soon as character length becomes 24.
Example:
ESCDP BIT ADVANCED MANUFACTURE
This command will print BIT ADVANCED MANUFACTURE on paper.
This command used to print characters less than 24. Data comes before ESC LF
command. Using this command user can define end of line for data less than 24
characters.
Example:
BIT ESCLF
This command will print BIT in one line.
4) ESC CN : Set the Line Spacing, where one line is 0.125mm. Here N is
number in hex.
Example: ESCC2
BIT ADVANCE
THURMAL PRINETR
This command set number of lines between two data lines. In above example I have set
line spacing equal to 2, i.e. 2 * 0.125= 0.25mm space between two lines.
www.bitadvanced.com
5) ESC PN: Set the number of line in one paragraph. N is number in hex.
Example:
ESCP3
As a result of this command, after three lines of data, printer will leave paragraph spacing
and start new paragraph.
This command is used to set paragraph spacing value. I.e. it defines number of blank
lines between two paragraphs.
This command is used to print data in reverse order. Data comes after this command will
be printed in reverse order.
Example:
ESCRP
ABCDEFGHIJKLMNOPQRSTUVWX
This command is generally used after ESCRP, to print data in obverse order, i.e. as it is.
Example:
ESCRS
ABCDEFGHIJKLMNOPQRSTUVWX
www.bitadvanced.com
9) ESC TN: Character code table selection
Using this command user can rotate motor ‘N’ times of step in forward direction
One step is 0.125mm
Using this command user can rotate motor ‘N’ times of step in Reverse direction
One step is 0.125mm
This command is used to set default settings. These default settings are as follows:
After this command if user wants to print any data he should send ESCDP command.
‘C’H is the expected response for this command.
www.bitadvanced.com
13) ESC MY: Test Print
This command is used to print a test print message with current settings. It would be as
follows:
PMPML
KATRAJ DEPO ---46
NO: 12455145
ORDINARY
MANDAI – BHARTAI VDP
TOTAL DISTANCE: 8KMs
FULL : 1 X 6.00
RS=6.00
‘D’H is the expected response for this command and also “OK” response for each printed
line.
This command is used to print graph, images or data other than normal text, provided that
user should give bitmap of actual data. User should enter data in $ and #, to recognize
start and end of the data. User can enter maximum 48 bytes of data in one frame.
Ex. $48_byte_data# Data must be 48 byte and ‘F’H is the expected response of this
command.
Example: suppose we want print WelCome. The Bit map is given bellow. All data is in
BINARY so one line must contain 384 bit
Example: Suppose you have following bitmap data to print, then you should provide
1, 2, 3, 4 …384
1st line----0000000000000000000000000000000000000000000000000000000000000000
2nd line----0000000000000000000000000000000000000000000000000000000000000000
3rd line----0000000000000000000000000000000000000000000000000000000000000000
4th line----0000000000000000000000000000000000000000000000000000000000000000
5th line----1100011000110000000011000011111000000000000000000000000000000000
6th line----1100111100110000000011000111111000000000000000000000000000000000
7th line----1100111100100000000011001100001100000000000000000000000000000000
8th line----0100111100100011110011001100000000011110011011101110001111000000
9th line----0110111101100111111011001100000000111110011111111110011111100000
10th line--0110100101100110011011001100000001100011011001100010011001100000
11th line--0111100111100111111011001100000001100011011001100011011111100000
12th line--0111100111000111111011001100001001100011011001100011011111100000
13th line--0011100111000110000011001100001101100011011001100011011000000000
14th line--0011100111000111111011000111111000111110011001100011011111100000
www.bitadvanced.com
15th line--0011000011000011110011000011110000011110011001100011001111000000
16th line--0000000000000000000000000000000000000000000000000000000000000000
Now give command ESCUD, & give all generated bit map line by line to printer in
ascii character format.
E.g. ESCUD$DSD…48charcters#
To convert bit map into ascii, you have to divide 384 bits into 48 bytes and if
one byte is “01000100” i.e. 68 in decimal or D in ascii.
So you have to send D instead of 8 bit binary data.
This command is used to print data in Double character mode instead of Default character
mode. Default character mode indicates 16X16 or 16X32 font size. When user gives this
command Double character mode will be set. As we select Double character mode font
size will become 16by32 or 16 by 48 respectively.
This command is used to set space between two doted lines. N is less than five. If user
provides N greater than 5 then response is ‘E’. And given number is not except. If user
give number less than 5 response is ‘10’H And given number is except.
This command is used to set printing quality. Here N should be less than thirty five.
If user gives N greater than 35 then response is ‘E’.
If user provide N less than 35 then response is ‘10’H and given N is except.
Note: Increase in strobe count can amplify Current taken by driver card.
NOTE : If you send ‘A’ as N printer will take it as a 41, WHERE 41 IS HEX ASCII NO OF
A
www.bitadvanced.com
Character table
http://www.windmill.co.uk/serial.html
www.bitadvanced.com
Thank You
www.bitadvanced.com