Hi everyone, I read that PIC can be interface with thermal printer with RS232(interface)...but to make sure can anyone suggest where (link) I can get one? And do all printer(thermal printer with Rs232 interface) have the same ESC/POS command set?
Hi everyone, I read that PIC can be interface with thermal printer with RS232(interface)...but to make sure can anyone suggest where (link) I can get one? And do all printer(thermal printer with Rs232 interface) have the same ESC/POS command set?
Hi
Of course a PIC can connect to a serial thermal printer. Most printers come with either USB , parallell or rs-232 and very few have more than one interface. When using a PIC the rs-232 is the obvious choice. You only need a MAX232 or a MAX3232 (if you have a 3.3v pic) and then it is enough to connect the TX and RX (if you want to poll the printer status) and Ground. Most printers can work in either text mode (using internal font set) or graphic mode (where you need to format every little pixel yourself an send this data to the printer. Text mode is easier and usually prints faster, plus using less codespace in the PIC.
We are using Epson TM-88 III or IV versions or a TM-90. The TM-88 IV is fast as hell to print. Most Epson printers have an internal memory area where it is possible to upload picture logos using a PC (TMF logo software). This will allow you to get graphic mixed with text and still not need to handle the actual logo in the PIC. You just tell the printer to "print logo nn". The result is a mix of text and graphics, most POS machines uses this way since it is fast to print.
Most printers have a removable communication board in the back so it is easy to change so if you have a printer with USB just get a serial board and plug it in.
Ebay is a good place to start looking, just make sure you get a rs-232.
Different brand and models of printers uses deferent command codes. Even Epson TM-88 and TM-90 does use exactly the same command set but most parts are similar. You can find Epson command set on internet and if you really really look you can find their programmer's reference guide which is gold.
Why not use a standard printer by use of the Serial to Parallel-Printer Converter IC?
Else a mini serial dot matrix printer.
Or browse CUSTOM AMERICA Inc.
Also How to print to HP laserjet 1100 series using PIC without PC?
Or try some code:
NormCode:- 20th January 2004 23:06 bitmaniac Junior Member Registered: Jan 2004 Location: Posts: 2 Serial 2 Paraller PRinter Converter HI! I don't know if this is what you want but give it a try THANKS HARRISON PHAM ,for the codding! 'Serial to Parallel Printer Converter for Generic Printers 'By: Harrison Pham March 30, 2003 '--------------------------------------------------- 'PIC: 16F84 at 4mhz ' ' PIC Printer (DB25 Connector) ' Pin A1 Pin 16 (Init) ' Pin A0 Pin 1 (strobe) ' Pin B0 Pin 2 ' Pin B1 Pin 3 ' Pin B2 Pin 4 ' Pin B3 Pin 5 ' Pin B4 Pin 6 ' Pin B5 Pin 7 ' Pin B6 Pin 8 ' Pin B7 Pin 9 ' Pin 17 to gnd (Printer Select) ' *Pin 14 to gnd (if needed for autofeed feature)* ' Pin 18 to gnd (gnd) '---------------------------------------------------- init con A1 strobe con A0 char var byte trisb = $00 'set portb to all outputs high init 'clear init line high strobe 'clear the strobe line portb = %11111111 'put all data lines high pause 1000 'pause for a second low init 'init the printer pause 500 'pause 500mill seconds to let printer init high init 'clear the line main: serin A2,N9600,[char] 'get characters with serial if char = 13 then 'if detected a cr then insert cr and lf PortB = 10 'lf low strobe 'tell printer to read in byte pauseus 200 'wait 200usec for printer to read in byte high strobe 'clear the strobe PortB = 13 'cr low strobe pauseus 200 high strobe endif portb = char 'set portb to the char byte low strobe pauseus 200 high strobe goto main
I like thermal printers because they dont need any inc or ribbons to work. Just throw in the paper roll and start printing. Bad thing is that the text will fade after some time ..
Also the printout is cheap and good looking.
Bookmarks