beautypg.com

Microcom 814M Programming Manual User Manual

Page 84

background image

80

c) The status of the first byte and second byte based on printer process status give exact printer status

information.

For example, “01 04 15 F0” is returned by printer.

F0 is synchronous data which cannot be analyzed.

15 : i.e. “10+05” and “05” means the printer is in PRST retraction process and “10”

means that there are error occurring in this process.

04 : means PRST paper jam

01 : means the paper is near end

From information above, the user can learn that printing has finished but PRST has failed to retract the

printout (after the programmed waiting time) and the paper is near end.

The detailed information refers to 1D 61 n

4.3.5 Download bit images into RAM or FLASH

User may download one or more bit images into RAM (RAM bit images) or FLASH (FLASH bit images).

Bit images in FLASH are retained when the printer is powered off while those in RAM are cleared when

the printer is turned off or initialized using command 1B 40. Therefore, the user would need to

re-download the bit images into RAM whenever the printer is restarted or initialized.

Refer to command 1D 2A (download bit images into RAM) and 1C 71 (download bit images into NV) for

detailed information on how to perform the download. In both RAM bit image download and NV bit image

download, a number must be specified for the image to be downloaded. Please read carefully the

commands 1D 2A and 1C 71 for the difference between RAM bit image download and NV bit image

download.

Bit image data processing (example using BMP format bit images)

1. The data is arranged in column data type in the bit image download command. Refer to command 1D

2A and 1C 71 for details.

2. BMP format bit image data is arranged in line data type. Normally, a monochromic BMP image is made

of sixty two (62) bytes of BMP image attributes description (including bit image width and height etc.) and

normal image data. The BMP image data is arranged in multiples of 4 bytes. For example, if the width

is 34 dots, 8 bytes instead of 5 bytes are needed to store the data. Therefore, the total amount of bytes

a bit image occupies in the memory is “(Line width in bits+31)/32*4 * line height in bits”

Below is an example written in VC++ (for reference only).

Note: A non-monochrome BMP image must be transformed into a monochrome image (1-bit color depth)

before downloading it to the printer. Both the height (in pixels) and width (in pixels) of the BMP image

shall be a multiple of eight (8), otherwise the printer may not be able to handle the data correctly.
//************************************************//
//Function: AntiRotateBmp90D //
//Utility: Transform bmp format bit image into a format that the printer can accept //
//Parameter: pBmpData---Pointer to source data //
// nPixelsOfWidth----bit image width (in dots) //
// nPixelsOfHeight---bit image height (in dots) //
// pBmpDataRotated---Pinter to target data //
//Value return: 1: data transformation ok. 0: parameter error. //