View previous topic :: View next topic |
Author |
Message |
xuandieu
Joined: 27 Mar 2011 Posts: 3
|
ESC/POS printer with PIC |
Posted: Sun Mar 27, 2011 9:36 pm |
|
|
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
|
|
Posted: Sun Mar 27, 2011 10:56 pm |
|
|
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
|
|
|
ezflyr
Joined: 25 Oct 2010 Posts: 1019 Location: Tewksbury, MA
|
|
Posted: Mon Mar 28, 2011 6:41 am |
|
|
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
|
|
Posted: Mon Mar 28, 2011 8:08 pm |
|
|
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
|
|
Posted: Tue Mar 29, 2011 6:29 am |
|
|
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: 9226 Location: Greensville,Ontario
|
|
Posted: Tue Mar 29, 2011 7:34 am |
|
|
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.... |
|
|
|