Unitech MP200 Printer User Manual


 
Copyright 2008 Unitech Electronics Co., Ltd. All rights reserved. Unitech is a registered trademark of Unitech Electronics Co., Ltd.
12
Copyright 2008 Unitech Electronics Co., Ltd. All rights reserved. Unitech is a registered trademark of Unitech Electronics Co., Ltd.
13
Chapter 3.0
8-Bit Dot Addressable Graphic Commands
3.0 8-Bit Dot Addressable Graphic Commands
The Unitech MP200 printer uses a single line thermal head, which has 384 heating
elements, pitched at 0.125 mm. The total print width is 48 mm. The 8-bit graphic
commands enable control of each one of the 384 heating elements and advancing of
the paper by increments of 0.125 mm.
To select the 8-bit graphic mode the user application must issue the ESC-V command,
next the host application sends two bytes to indicate the number of the graphic lines
desired, followed with a packet of 48 bytes for each graphic line. The printer prints the
graphic line and advances to the next line automatically.
3.1 8- Bit Dot addressable Graphic Commands
The following table displays the 8-bit dot addressable graphic commands and the
printer actions. It also illustrates the Commands with an example. Please note that
characters <> ‘’ and ‘-‘ are not part of the command string.
Command String Printer Action
Esc-’V’-n1-n2 8-bit Graphic mode is selected.<n1> and <n2> is a 16-bit
integer indicating the number of graphic lines of 48 characters
each to be received. Valid Graphic character sets are from
0x00 to 0xFF Hex using bits 0-7.
Esc-’J’-n Performs <n*0.125mm> feed.
Esc-V-0x01-0x00 ’48 bytes of data’ This code prints a single line of graphic.
Table 3.0 – 8-bit Dot addressable Graphic Commands
3.2 8-Bit Compressed Graphic Commands
The two tables below describe the command used to print compressed graphics as
well as explain in detail each of the components of the command string.
Command String Printer Action
Esc-’v’-height-width-counter-data-counter-data…. Prints a compressed graphic
with the specied attributes.
Table 3.1 – 8-bit Compressed Graphic Commands
Graphic String
Component
Function of the component
HEIGHT(# of lines) An eight bit value representing the number of dot-lines
contained in the following data set
WIDTH (# of bytes in
each line)
An eight bit value representing the number of bytes to be
contained in each dot-line of the following data set
Counter
An Eight bit value which describes how the following data will be processed
For Signed
Values
{127 ≥ Counter ≥ 0 } Process the next (Counter + 1 ) bytes
of data as 8 bit graphics.
{0 > Counter ≥ -128} Repeat the next single byte of data ((
-Counter) + 1) times.
For Unsigned
Values
{ 127 ≥ Counter ≥ 0} Process the next (Counter+1) bytes of
data as 8 bit graphics
{128 ≥ Counter ≤ 255} Repeat the next Singe byte of data, ((
256 – Counter)+1) times
Table 3.2 - Components of the compressed graphics command string
COMPRESSED GRAPHICS EXAMPLE:
The following graphics data is to be printed:
This data may be represented in hexadecimal:
0x55 0x55 0x00 0x00 0xAA 0x11
0x55 0x00 0x55 0x55 0x55 0x55