Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] Bitmap printing on TTL Thermal Printer

Status
Not open for further replies.

Vibrant2020

Newbie level 6
Newbie level 6
Joined
Sep 23, 2020
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
155
Dear friends,
I am able to print texts, barcodes on the (Serial/TTL) Thermal Printer from the PIC MCU using the following similar commands.

putch(0x1B); // ESC
putch(0x2A); //*
puts("Welcome to Edaboard \r\n");
etc.

but struggling to print the bitmap. I like to bring one important point to your knowledge that I am even struggling to find out the proper/correct ESC/POS commands for my printer. Some documents say to use this command to set the printer to start bitmap : "0x12 *" (DC2 *). Some other documents say "0x1B *" (ESC *). I tried both commands. But it prints only characters not image. Same characters printed even after If I don't use those commands. No datasheet provided along with the printer. I went through the arduino library files on github.

For your information:


But not succeeded yet. I also browsed extensively on web. No useful info received. Any help to solve the issue would be highly appreciated.

Components used:
MCU : PIC16F1938
TTL Thermal Printer RP203.
Communication: TTL (RX, TX)


Thank you,
Vibrant
 
Last edited:

I found a RP203 user manual within a few clicks on the internet...
 

Hi FvM,
Can you please share the user manual? Does it contain the command set? Thanks
 

Hi,

Is it asking too much to do a simple internet search "RP203 command set" on your own?
How much time did you spend?

Klaus
 

Just type in "rp203 thermal printer user manual".
 

Attachments

  • thermal-printer.pdf
    648.9 KB · Views: 366

Is it asking too much to do a simple internet search "RP203 command set" on your own?
How much time did you spend?
Really I did extensive search on the internet for last 3 days to get suitable ESC/POS command set for example downloaded command set from EPSON site and other sources. But commands are different for different models. Even i tried all the command set but i can't succeeded. For your information, I tried with my seller too but they also said they don't have command set. That's why I come here to get your help. After the suggestion of FvM, i tried again on the internet. I found (its really miracle for me) only one pdf document which was same as FvM sent here.

Anyway, finally i got the command set from FvM now.

Thanks to FvM and you all.

Actually i tried with the same bitmap command set mentioned in the document earlier but no bitmap printed. I am still trying to solve the issue. If you can help, it would be very helpful.

Thank you,
Vibrant2020
 

Hi,
Really I did extensive search on the internet for last 3 days
Wow. I did a single search ... and the document was the second hit. 3 seconds.

We won't write code for you, we won't do your job.
But we like to help you to rectify your mistakes.
But for this you need:
* to show your code
* give additional informations like wiring, power supply...all that is required to make a printer to work
* tell what you expect
* tell what you get/see instead

Klaus
 

Hi all,
I finally abled to print bitmap image using the command
GS v 0 xL xH yL yH
Now the image prints on left justification. I need to be centered it. So I tried the command
ESC a 1
(0x1B 61 0x31)
But not succeeded. Any suggestion would be appreciated. Advance thanks.

Files added.

Vibrant2020
--- Updated ---

The sequence I followed :


Code C - [expand]
1
2
3
4
// To align center
putch(0x1B); // ESC
putch(0x61); // a
putch(0x31); // 1




Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Print bitmap image
putch(0x1D); // GS
putch(0x76); // v
putch(0x30); // 0
putch(0x30); // m = 0
putch(0x1F); // xL = 248 pixels /8 = 31
putch(0x00); // xH
putch(0xB4); // yL = 180 pixels (height)
putch(0x00); // yH
 
for (long i = 0; i < 5580: i++){
     putch(data[¡]);
}
puts("\n\n");



This for your information.

Thanks
Vibrant2020
 

Attachments

  • 2021_3_18_17_27_29.png
    2021_3_18_17_27_29.png
    272.9 KB · Views: 303
  • 2021_3_18_17_27_4.png
    2021_3_18_17_27_4.png
    228.5 KB · Views: 287
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top