CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

ESC/POS printer with PIC

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
xuandieu



Joined: 27 Mar 2011
Posts: 3

View user's profile Send private message

ESC/POS printer with PIC
PostPosted: Sun Mar 27, 2011 9:36 pm     Reply with quote

Hi Everybody,

I plan to interface a POS printer (ESC/POS compatible) with a PIC (PIC24) via RS232 (using pins: TX, RX, CTS, RST), but I don't have any experiences about printer. Please help me.

Thanks so much!
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Sun Mar 27, 2011 10:56 pm     Reply with quote

Hi,

What experience do you have?

Can you post a link to the printer datasheet?

What PIC are you using?

John
xuandieu



Joined: 27 Mar 2011
Posts: 3

View user's profile Send private message

PostPosted: Mon Mar 28, 2011 1:01 am     Reply with quote

Hi ezflyr,

thanks for replying me!
This is the link of printer I planed to use.

http://polygon2010.en.made-in-china.com/product/pqInRHZDXeYj/China-Portable-Thermal-Printer-EPX58P-.html

I have knowledge about programming a micro-controller such as ARM, PIC, AVR... but i haven't done any project about printer before, so i do not know how to init a printer, the process to print out a character...

the PIC I chose for my project is PIC24Fj128GB106. Pls help me!

Thanks!
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Mon Mar 28, 2011 6:41 am     Reply with quote

Hi,

It should be very easy to interface your PIC to that printer. It apparently has an "RS232 Serial Port", so you'll need to connect a MAX232 type device between you PIC and the printer. You'll also need to get the manual or the datasheet for the printer to determine the required commands/formating instructions for the printer. Sending these from the PIC and the data you wish to print should be very easy.

Do a Google search for 'ESC/POS Application Guide' for more info on using this type of printer.

John
xuandieu



Joined: 27 Mar 2011
Posts: 3

View user's profile Send private message

PostPosted: Mon Mar 28, 2011 8:08 pm     Reply with quote

Hi,

Thanks you very much!

I got in the internet "ESC/POS command" from internet. And according to the document, we need to connect the printer with micro-controller via 4 wires: TX, RX, DTR, DSR. I wonder if we can connect to micro-controller using only to wires: TX & RX? Could the printer normally operate without handshake signals DTR & DSR?

Thanks!
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Tue Mar 29, 2011 6:29 am     Reply with quote

Hi,

In general, do you know what these "hardware handshaking" signals are intended to accomplich? Perhaps a bit more internet research is in order?

Did you obtain the manual for this specific printer? I used the email contact form on the website and received a copy of the manual a few hours later. It looks to me like a 3 connection interface is recommended for this printer. What are your thoughts on the 3rd connectin?

John
temtronic



Joined: 01 Jul 2010
Posts: 9164
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Mar 29, 2011 7:34 am     Reply with quote

Handshaking...

DTR, DSR are used to tell the computer, hey I'm busy printing, hold data for a bit....I'll tell you when I can accept more data !

Don't have the printer's info, but some also use XON, XOFF in the serial data stream to interface to the computer.

Or, if the baud rate is less than the printing speed and there is a buffer, no handshaking is required.

If the messages are small enough with a time delay between them, the printer may work just fine without handshaking. Depends on it's internal buffer size, message length, printing speed and tying the '4th' signal line high or low as required. The printer's info sheet will explain....
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group