打印机驱动一个中文图形的打印,总算差不多了
打印机的只支持并口的驱动,所以就用并口驱动程序。其实串口驱动和并口驱动是一样的。这个程序是用PIC单片机做的,是在打印机的打印一个“中文”两个字符的图像。对于图像打印就是打点的集合,通过图形打印命令可以打印很多简单的图形。
void putpicture(void)
{
unsigned char i;
putword(0x1b);
putword(0x57);
putword(6);
putword(0x1b);
putword(0x4b);
putword(0xf);
//putword(0X3C);
putword(0x0);
putword(0x7c);
putword(0x44);
putword(0x44);
putword(0xff);
putword(0x44);
putword(0x44);
putword(0x7c);
putword(0x00);
putword(0x41);
putword(0x62);
putword(0x54);
putword(0xc8);
putword(0x54);
putword(0x62);
putword(0x41);
打印效果就是“中文”的图形显示。
10:55:24 UTC+0800Wed Aug 15 2007
文章评论(0条评论)
登录后参与讨论