I want to interface USB printer to any embedded device. Where can i get examples for this? How can I send data to USB printer for printing? examples..
Hi Parbal,
Your question sounds like complete novice on current scene of USB printers. Here is a brief introduction of USB printers.
1) Image printers Nowadays, most of printers on the market belong to this category. For these printers, host (PC) renders page dot images. The images are sent over USB using printers' specific protocols. Host requires rich resources (CPU/GPU power, memories, font storages) to render page images. Also, dedicated drivers of the specific protocols. In these reasons, a Linux board is realistic choice for embedded to connect to these printers, as Hamish suggested.
2) Character printers Around 20 years ago this type was the majority, but survives just for specific purpose, such as slip/label printers on cache registers, dot impact printers for business form. For these printers, host sends (ASCII) character codes and their position using ESC/P or PCL protocol. Printers put the fonts of the character codes on the specified position in papers. A 16 bits MCU of USB host is enough.
3) PostScript printers Also survive in high-end laser printers for publishers.
If you are interested in character printers, Microchip USB team had good work on their legacy library. http://www.microchip.com/mla v2013-06-15 ww1.microchip.com/.../microchip-libraries-for-applications-v2013-06-15-windows-installer.exe
These files are helpful to understand on character printers and its protocol. \microchip_solutions_v2013-06-15\Microchip\USB\Printer Host Driver\ - Documentation\Printer Study.xls : list of printers which support ESC/POS, or HP PCLs - usb_host_printer_esc_pos.c : implementation of ESC/POS - usb_host_printer_pcl_5.c : implementation of PCL5
IMHO, this is the "smart" way of these days; the data to print is sent once to an Android phone/tablet over wireless BlueTooth/NFC/IR or wired USB PHDC (Personal Healthcare Device Class). When the user wants a handout, he connects the phone/tablet wirelessly to a printer directly.
Tsuneo