Sei sulla pagina 1di 15

PRINTER DRIVER CARD

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.

2. TTL compatible input output for user interface.

3. IC max 232 is not required.

4. Extremely light weight.

5. Extremely easy to load a paper by paper sense.

6. Setting the baud rate, handshaking, character, by on board.

7. Available Font Sizes (16x24, 16x16).

8. Easy integration into your housing with four mounting points only.

9. User adjustable Printing quality.

www.bitadvanced.com
 Specifications

1. Print method : Direct Thermal

2. Font size : 16x16, 16x24, etc.

3. External Data : User Define Bit Map

4. Print modes : Normal, Reverse, User Defined

5. Interface : RS232

6. Paper width : 58mm

7. Number of columns : 6

8. Print speed : User Adjustable

9. Mechanical lifetime : 50km

10. Baud rate : 9600 bps

11. Power requirement : 5 to 6 volts Dc, 2A

12. Dimensions : 50 x 65mm

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

Relimate_1.27MM +5VDC Gnd

POWER SUPPLY
5 TO 6 VDC, 2A

GND RX

CTS TX

NOTE: Jumper setting must be as shown in image.

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:

Space between two lines = 24 steps

Number of lines in one paragraph = 8

Spaces between two paragraphs = 100 steps

Reset reverse Print

Character code table selection = 01

One Step = 0.125mm

Double character Set

Character line distance = 01

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

NOTE: N is Number in hex, and no space between commands. EX. ESCDP


For entering number using hyper terminal press key sequence as alter and number
(Alt + No)

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.

01 is the expected response for ESCDP command.

2) ESC LF: End of line

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.

02 is the Expected response for this command.

3) ESC HT: Tab


This command is used to print four successive characters as blank spaces. I.e. we can say
this command is used to print tab as a data.
Example:
BITESCHTAdvance
This command will print four blank spaces between BIT and ADVANCE.

03 is the expected response for this command.

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.

04 is the expected response for this command.

www.bitadvanced.com
5) ESC PN: Set the number of line in one paragraph. N is number in hex.

This command is used to define number of lines in one paragraph.

Example:
ESCP3

As a result of this command, after three lines of data, printer will leave paragraph spacing
and start new paragraph.

05 is the expected response for this command.

6) ESC SN: Set the Space between two paragraphs.

This command is used to set paragraph spacing value. I.e. it defines number of blank
lines between two paragraphs.

06 is the expected response of this command.

7) ESC RP: Set Reverse Print.

This command is used to print data in reverse order. Data comes after this command will
be printed in reverse order.

Example:
ESCRP
ABCDEFGHIJKLMNOPQRSTUVWX

But due to “ESCRP” command it will print XWVUTSRQPONMLKJIHGFEDCBA

07 is the expected response for this command.

8) ESC RS: Reset Reveres Print.

This command is generally used after ESCRP, to print data in obverse order, i.e. as it is.

Example:
ESCRS
ABCDEFGHIJKLMNOPQRSTUVWX

But due to “ESCRS” command it will print ABCDEFGHIJKLMNOPQRSTUVWX


08 is the expected response for this command.

www.bitadvanced.com
9) ESC TN: Character code table selection

This command is used to select font.


N=01 for 16*16 font
N=02 for 16*24 font

09 is the expected response for this command.

10) ESC FN: Feeds paper in forward direction

Using this command user can rotate motor ‘N’ times of step in forward direction
One step is 0.125mm

‘A’H is the expected response for this command.

11) ESC KN: Feeds paper in Reverse direction

Using this command user can rotate motor ‘N’ times of step in Reverse direction
One step is 0.125mm

And ‘B’H is the response of this command.

12) ESC @I: Printer initialization. (Default settings)

This command is used to set default settings. These default settings are as follows:

The Space between two lines = 24 steps


The number of line in one paragraph = 8
The Space between two paragraphs = 100 steps
Reset Reveres Print
Character code table selection = 01
One steep is 0.125mm
Double character set
Character line distance =01
Strobe count =11
One steep is 0.125mm

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.

11) ESC UD: User data write

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.

15) ESC DC: Double Character

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.

‘F’H is the expected response for this command.

16) ESC BN: Byte line space

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.

Note: If you increase N then also increase strobe count


Note: Using ESCBN and ESCIN command you can print 2cm of character with very
good quality.

17) ESC IN: strobe count

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

Potrebbero piacerti anche