4.6电源模块设计
4.6.1单元电源电路设计
为了能够让单片机和打印机更好,更稳定地工作,采用了图4-12所示单元电源电路,由电源变压器、桥堆和滤波电容器所组成。电源变压器的初级电压输入为220V,次级输出电压为12V[15] [16]。
由于单片机所需的是+5V电源,经滤波电容和三端稳压集成电路MC7812后可得到+12V电压,MC7812能将15V~25V的直流电压变换成12V的稳定电压,在12V的电压中含有少量的低频成分和接收外界的高频成分,再经后一级滤波后送三端稳压集成
图4-12 电源电路图
电路LM317,LM317能将大于7V~15V的直流电压变换成+5V的稳定电压并且提供的较大电流以保证打印机正常工作。同时由于电流较大导致三端稳压集成电路MC7812和LM317过热,为了确保电路工作正常,给两个芯片分别加上散热片。
4.6.2直流稳压电源的检测
本系统对电源要求高,因为稳定性和可靠性在单片机的应用中具有格外重要的意义。为了提高稳定性,单片机的允许电压变化范围很宽。通常单片机使用5V电压,所以采用较为复杂的稳压电源,电源电路的主要部件采用集成的三端稳压器件如LM317与MC7812,稳压电源输入电压范围宽,输出电压稳定,电流较大,抗干扰能力强,以满足主控系统和微型打印机的要求[17]。
数字万用表对稳压电源的测试结果,如表4-14所示:
输入级(原) |
MC7812输出 |
输出级 |
|
+5V直流稳压电源 |
220V交流电压 |
11.998 V |
4.997V |
表4-14 电压测试
5 软件部分
根据程序设计步骤流程图(图5-1),准备本次设计所需要的整体流程图和部分流程图。
5.1 程序设计整体流程图
通过对本设计的了解,可以知道软件的主要作用是通过单片机来控制打印机、键盘、液晶显示器三个外接设备。当数据选通信号为上升沿时,单片机上的8位并行数据写入到打印机内锁存;忙判断信号BUSY为高电平时,此时,单片机不能向打印机发送数据。当打印机忙时,调用显示,使液晶显示屏显示当前打印的信息,并可通过按键来改变打印数值。
首先,进行整个程序的初始化及清屏。当有按键按下时,程序判断是哪个键被按下,然后执行相应的按键功能,并调用液晶显示器,显示所打印的内容;当没有键按下时,返回键盘扫描,再判断是否有键被按下。
本次程序设计的整体流程图,如图5-2所示:
5.2 键处理的流程图
键盘部分应实现如下功能:首先,对键盘进行扫描,判断是否有键被按下。如果没有,则转回键盘扫描,看下次是否有键被按下;如果有键被按下,则先对键进行去抖动,然后算出是哪个键被按下,再延时等待键释放。因为每一个键都对应一个处理子程序,得到闭合键的键码后,就可以根据键码,转相应的键处理子程序(分支是使用JMP等散转指令实现的),进行字符、数据的输入或命令的处理。这样就可以实现该键所设定的功能。
根据上述说明,画出本次程序设计的键处理流程图,如图5-3所示:
6 显示与测试结果
整个电路接通后,当键盘中打印按键按下时,微型打印机开始工作,打印所设定的汉字,同时在液晶显示屏上显示所打印的内容;当打印完毕后,显示屏上显示打印完毕。当按下第十五键时,显示屏清屏并显示汉字和“请输入:”,微型打印机等待打印。当按下数字键中任何一个时,显示屏上显示相应数字同时微型打印机打印该数字。
具体打印显示结果如下图6-1所示:
7 结 论
此设计体现了由单片机控制的微型打印机的众多优点:多功能超小体积,可用电池供电,设计紧凑,方便操作,可打印的内容及其形式具有多样性,节约资源(低耗材),耐用性强,打印精度高,且保证打印噪音低。在本次设计中,实现了利用微型打印机打印出一段固定的文字,并可以任意打印出0~9十个阿拉伯数字,同时在液晶显示器上显示所打印的内容;在不超过单片机内存的情况下,根据改编程序重新设定一些字符或者表格等,就可以将所设定的内容打印且显示出来。
在设计制作微型打印机控制电路的过程当中,遇到了不少问题。例如,在打印过程中,会出现只打印出字的一半的情况,即字的上半部分不对应该字的下半部分,原因是代码顺序调反;还有一种情况就是打印乱码,原因是打印机对单片机造成干扰。而设计制作直流稳压电源时,发现应用三端集成稳压电路MC7805输出的电压虽然可以达到5V,但是提供的电流较小,使微型打印机无法正常工作。把MC7805换成大电流稳压器件LM317,可得到较大的电流。由于带负载较重导致稳压器件本身过热,因此在稳压器件上加了散热片,防止器件过热烧坏。本设计由于水平有限,电路及程序设计还有需要改进的地方,在今后的学习和研究中,将继续改进完善。
另外在调试过程中,以保证作品实现功能准确为前提,尽量做到电路简单、美观,效果好成本低,以增强其实用价值。
COM EQU 34H ;指令寄存器 DAT EQU 35H ;数据寄存器 CWADD1 EQU 8400H ;写指令代码地址(左) CRADD1 EQU 8600H ;读状态字地址(左) DWADD1 EQU 8500H ;写显示数据地址(左) DRADD1 EQU 8700H ;读显示数据地址(左) CWADD2 EQU 8800H ;写指令代码地址(右) CRADD2 EQU 8A00H ;读状态字地址(右) DWADD2 EQU 8900H ;写显示数据地址(右) DRADD2 EQU 8B00H ;读显示数据地址(右) RELIE EQU 36H ;在汉字中保存列其始值 COLUMN EQU 30H ;列地址寄存器(0-127) PAGER EQU 31H ;页地址寄存器D2,D1,D0:页地址 ;D7:字符体D7=0为6X8点阵 ; D7=1为8X8点阵 CODER EQU 32H ;字符代码寄存器 COUNT EQU 33H ;计数器 ZIDI EQU 37H ;字体在表中的位置指针地位 ;MOV DPTR,#CCTAB ; MOV ZIDI,DPL MOV ZIGAO,DPH ZIGAO EQU 38H ;字体在表中的位置指针高位 DONGXH EQU 39H ;此为动态显示的位数 BAOHUDI EQU 3AH BAOHUGAO EQU 3BH ;3CH,3DH,3EH,3FH作键盘用 ADREL1 EQU 42H ADREL2 EQU 43H ;******************************************************************* ORG 0000H AJMP MAIN ORG 0030H ;数据接P0口 MAIN: MOV SP,#70H MOV 40H,#00H MOV 41H,#40H MOV R4,#0AH MOV R0,#50H CLEARA: MOV @R0,#00H INC R0 DJNZ R4,CLEARA LCALL INT LCALL CLEAR LCALL DDD ;静态字显示 L1: MOV 3CH,#0F7H ;开始键扫描 MOV 3DH,#00H L2: MOV A,3CH MOV P1,A MOV A,P1 MOV 3EH,A SETB C MOV 3FH,#04H L3: RLC A JNC KEYIN INC 3DH DJNZ 3FH,L3 ;LCALL DISP1 MOV A,3CH SETB C RRC A MOV 3CH,A JC L2 AJMP L1 KEYIN: MOV R7,#60 D2: MOV R6,#248 DJNZ R6,$ DJNZ R7,D2 D3: MOV A,P1 XRL A,3EH JZ D3 CLR C MOV A,3DH RLC A MOV DPTR,#TABLE JMP @A+DPTR MNMN: AJMP L1 TABLE: AJMP MN0 ;键盘入口地址 AJMP MN1 AJMP MN2 AJMP MN3 AJMP MN4 AJMP MN5 AJMP MN6 AJMP MN7 AJMP MN8 AJMP MN9 AJMP MN13 AJMP MN14 AJMP MN15 ;键盘入口地址 MN0: MOV A,40H JNZ FANMN0 AJMP MN0_0 FANMN0: AJMP MNMN MN0_0: MOV A,41H SUBB A,#80H JC JX0 AJMP FANMN0 AJMP MNMN MN10: AJMP MNMN MN11: AJMP MNMN MN12: AJMP MNMN MN13: AJMP MNMN MN15:; MOV ADREL1,#00H MOV ADREL2,#0BCH SETB P3.2 LP1_1: JB P3.2,LP1_1 MOV R4,ADREL1 LP2_1: MOV A,R4 MOV DPTR,#PRNTAB1_1 MOVC A,@A+DPTR MOV DPTR,#0000H MOVX @DPTR,A LP3_1: JB P3.2,LP3_1 INC R4 MOV A,R4 XRL A, ADREL2 JNZ LP2_1 MOV ADREL1,#00H MOV ADREL2,#0BCH SETB P3.2 LP1_2: JB P3.2,LP1_2 MOV R4,ADREL1 LP2_2: MOV A,R4 MOV DPTR,#PRNTAB1_2 MOVC A,@A+DPTR MOV DPTR,#0000H MOVX @DPTR,A LP3_2: JB P3.2,LP3_2 INC R4 MOV A,R4 XRL A, ADREL2 JNZ LP2_2 MOV DPTR,#CCTAB4 MOV ZIDI,DPL MOV ZIGAO,DPH MOV PAGER,#06H MOV COLUMN,#00H ;打 MOV CODER,#00H LCALL CCW_PR MOV DPTR,#CCTAB4 MOV ZIDI,DPL MOV ZIGAO,DPH MOV PAGER,#06H MOV COLUMN,#10H ;印 MOV CODER,#01H LCALL CCW_PR MOV DPTR,#CCTAB4 MOV ZIDI,DPL MOV ZIGAO,DPH MOV PAGER,#06H MOV COLUMN,#20H ;完 MOV CODER,#02H LCALL CCW_PR MOV DPTR,#CCTAB4 MOV ZIDI,DPL MOV ZIGAO,DPH MOV PAGER,#06H MOV COLUMN,#30H ;毕 MOV CODER,#03H LCALL CCW_PR AJMP MNMN ;以下字不动 DDD: MOV DPTR,#CCTAB1 MOV ZIDI,DPL MOV ZIGAO,DPH MOV PAGER,#00H MOV COLUMN,#00H ;天 MOV CODER,#00H LCALL CCW_PR MOV DPTR,#CCTAB1 MOV ZIDI,DPL MOV ZIGAO,DPH MOV PAGER,#00H MOV COLUMN,#10H ;津 MOV CODER,#01H LCALL CCW_PR MOV DPTR,#CCTAB1 MOV ZIDI,DPL MOV ZIGAO,DPH MOV PAGER,#00H MOV COLUMN,#20H ;工 MOV CODER,#02H LCALL CCW_PR MOV DPTR,#CCTAB1 MOV ZIDI,DPL MOV ZIGAO,DPH MOV PAGER,#00H MOV COLUMN,#30H ;程 MOV CODER,#03H LCALL CCW_PR MOV DPTR,#CCTAB1 MOV ZIDI,DPL MOV ZIGAO,DPH MOV PAGER,#00H MOV COLUMN,#40H ;师 MOV CODER,#04H LCALL CCW_PR MOV DPTR,#CCTAB1 MOV ZIDI,DPL MOV ZIGAO,DPH MOV PAGER,#00H MOV COLUMN,#50H ;范 MOV CODER,#05H LCALL CCW_PR MOV DPTR,#CCTAB1 MOV ZIDI,DPL MOV ZIGAO,DPH MOV PAGER,#00H MOV COLUMN,#60H ;学 MOV CODER,#06H LCALL CCW_PR MOV DPTR,#CCTAB1 MOV ZIDI,DPL MOV ZIGAO,DPH MOV PAGER,#00H MOV COLUMN,#70H ;院 MOV CODER,#07H LCALL CCW_PR RET ;中文演示程序段 MOV DPTR,#CTAB MOV ZIDI,DPL MOV ZIGAO,DPH MOV PAGER,#84H ; : MOV COLUMN,#20H MOV CODER,#1AH LCALL CW_PR RET ;初始化子程序 INT: MOV COM,#0C0H ;设置显示起始行为第一行 LCALL PRL0 LCALL PRR0 MOV COM,#3FH ;开显示设置 LCALL PRL0 LCALL PRR0 RET ;清显示RAM区(清屏)子程序 CLEAR: MOV R2,#00H ;页面地址暂存器设置 CLEAR1: MOV A,R2 ORL A,#0B8H ;"或"页面地址设置代码 MOV COM,A ;页面地址设置 LCALL PRL0 LCALL PRR0 MOV COM,#40H ;列地址设置为"0" LCALL PRL0 LCALL PRR0 MOV R3,#40H ;一页清64个字节 CLEAR2: MOV DAT,#00H ;显示数据为"0" LCALL PRL1 LCALL PRR1 DJNZ R3,CLEAR2 ;页内字节清零循环 INC R2 ;页地址暂存器加1 CJNE R2,#08H,CLEAR1 ;RAM区清零循环,共八页 RET ;写指令代码子程序(左) PRL0: PUSH DPL ;片选设置为"00" PUSH DPH MOV DPTR,#CRADD1 ;设置读状态字地址 PRL01: MOVX A,@DPTR ;读状态字 JB ACC.7,PRL01 ;判"忙"标志为"0"否,否在读 MOV DPTR,#CWADD1 ;设置写指令代码地址 MOV A,COM ;取指令代码 MOVX @DPTR,A ;写指令代码 POP DPH POP DPL RET ;写显示数据子程序(左) PRL1: PUSH DPL ;片选设置为"00" PUSH DPH MOV DPTR,#CRADD1 ;设置读状态字地址 PRL11: MOVX A,@DPTR ;读状态字 JB ACC.7,PRL11 ;判"忙"标志为"0"否,否在读 MOV DPTR,#DWADD1 ;设置写显示数据地址 MOV A,DAT ;取数据 MOVX @DPTR,A ;写数据 POP DPH POP DPL RET ;读显示数据子程序(左) PRL2: PUSH DPL ;片选设置为"00" PUSH DPH MOV DPTR,#CRADD1 ;设置读状态字地址 PRL21: MOVX A,@DPTR ;读状态字 JB ACC.7,PRL21 ;判"忙"标志为"0"否,否在读 MOV DPTR,#DRADD1 ;设置读显示数据地址 MOVX A,@DPTR ;读数据 MOV DAT,A ;存数据 POP DPH POP DPL RET ;写指令代码子程序(右) PRR0: PUSH DPL ;片选设置为"10" PUSH DPH MOV DPTR,#CRADD2 ;设置读状态字地址 PRR01: MOVX A,@DPTR ;读状态字 JB ACC.7,PRR01 ;判"忙"标志为"0"否,否在读 MOV DPTR,#CWADD2 ;设置写指令代码地址 MOV A,COM ;取指令代码 MOVX @DPTR,A ;写指令代码 POP DPH POP DPL RET ;写显示数据子程序(右) PRR1: PUSH DPL ;片选设置为"10" PUSH DPH MOV DPTR,#CRADD2 ;设置读状态字地址 PRR11: MOVX A,@DPTR ;读状态字 JB ACC.7,PRR11 ;判"忙"标志为"0"否,否在读 MOV DPTR,#DWADD2 ;设置写显示数据地址 MOV A,DAT ;取数据 MOVX @DPTR,A ;写数据 POP DPH POP DPL RET ;读显示数据子程序(右) PRR2: PUSH DPL ;片选设置为"10" PUSH DPH MOV DPTR,#CRADD2 ;设置读状态字地址 PRR21: MOVX A,@DPTR ;读状态字 JB ACC.7,PRR21 ;判"忙"标志为"0"否,否在读 MOV DPTR,#DRADD2 ;设置读显示数据地址 MOVX A,@DPTR ;读数据 MOV DAT,A ;存数据 POP DPH POP DPL RET ;8*8 CW_PR: CLR EA MOV DPL,ZIDI ;确定字符字模块首地址 MOV DPH,ZIGAO MOV A,CODER ;取代码 MOV B,#08H ;字模块宽度为8个字节 MUL AB ;代码X8 ADD A,DPL ;字符字模块首地址 MOV DPL,A ;=字模库首地址+代码X8 MOV A,B ADDC A,DPH MOV DPH,A MOV CODER,#00H ;借用为间址寄存器 MOV A,PAGER ;读页地址寄存器 JB ACC.7,CW_1 ;判字符体 MOV COUNT,#06H ;6X8点阵 LJMP CW_2 CW_1: MOV COUNT,#08H ;8X8点阵 CW_2: ANL A,#07H ;取页地址值 ORL A,#0B8H ;"或"页地址指令代码 MOV COM,A ;写页地址指针 LCALL PRL0 LCALL PRR0 MOV A,COLUMN ;读列地址寄存器 CLR C ANL A,#7FH ;为了滚屏,变成列地址为1-128 SUBB A,#40H ;列地址-64 JC CW_21 ;<0为左屏显示区域 MOV COLUMN ,A ;≥0为右屏显示区域 MOV A,PAGER SETB ACC.4 ;设置区域标志位 MOV PAGER,A ;"01"为右,"10"为左 LJMP CW_3 CW_21: MOV A,PAGER SETB ACC.5 ;设置区域标志位 MOV PAGER,A CW_3: MOV COM,COLUMN ;设置列地址值 如果超过80H,得减80H,为滚屏 ORL COM,#40H ;"或"列地址指令标志位 MOV A,PAGER ;判区域标志以确定设置哪个控制器 ANL A,#30H CJNE A,#10H,CW_31 LCALL PRR0 ;"01"为右区 LJMP CW_4 CW_31: LCALL PRL0 ;"10"为左区 CW_4: MOV A,CODER ;取间址寄存器值 MOVC A,@A+DPTR ;取字符字模数据 MOV DAT,A ;写数据 MOV A,PAGER ;判区域标志 ANL A,#30H CJNE A,#10H,CW_41 LCALL PRR1 ;"01"为右区 LJMP CW_5 CW_41: LCALL PRL1 ;"10"为左区 CW_5: INC CODER ;间址加1 INC COLUMN ;列地址加1 MOV A,COLUMN ;判列地址是否超出区域范围 CLR C CJNE A,#40H,CW_6 CW_6: JC CW_9 ;未超出则继续 MOV COLUMN,#00H MOV A,PAGER ;超出则判在何区域 ANL A,#30H CJNE A,#10H,CW_62 MOV A,PAGER CW_61: SETB ACC.4 ;在左区则转右区 CLR ACC.5 MOV PAGER,A MOV COM,#40H ;设置右区列地址为"0" LCALL PRR0 AJMP CW_9 CW_62: MOV A,PAGER CLR ACC.4 ;在右区则转左区 SETB ACC.5 MOV PAGER,A MOV COM,#40H ;设置左区列地址为"0" LCALL PRL0 CW_9: DJNZ COUNT,CW_4 ;循环 SETB EA RET ;************************************************************************ ;16*16 CCW_PR: CLR EA MOV DPL,ZIDI ;确定字符字模块首地址 MOV DPH,ZIGAO MOV A,CODER ;取代码 MOV B,#20H ;字模块宽度为32个字节 MUL AB ;代码X32 ADD A,DPL ;字符字模块首地址 MOV DPL,A ;=字模库首地址+代码X32 MOV A,B ADDC A,DPH MOV DPH,A MOV RELIE,COLUMN ;保存列地址起始值 MOV CODER,#00H ;借用为间址寄存器 MOV A,PAGER ;读页地址寄存器 CCW_1: MOV COUNT,#10H ;计数器设置为16 CCW_2: ANL A,#07H ;取页地址值 ORL A,#0B8H ;"或"页地址指令代码 MOV COM,A ;写页地址指针 LCALL PRL0 LCALL PRR0 MOV COLUMN,RELIE ;取列地址值 MOV A,COLUMN ;读列地址寄存器 CLR C ANL A,#7FH ;为了滚屏,变成列地址为1-128 SUBB A,#40H ;列地址-64 JC CCW_21 ;<0为左屏显示区域 MOV COLUMN ,A ;≥0为右屏显示区域 MOV A,PAGER SETB ACC.4 ;设置区域标志位 MOV PAGER,A ;"01"为右,"10"为左 LJMP CCW_3 CCW_21: MOV A,PAGER SETB ACC.5 ;设置区域标志位 MOV PAGER,A CCW_3: MOV COM,COLUMN ;设置列地址值 如果超过80H,得减80H,为滚屏 ORL COM,#40H ;"或"列地址指令标志位 MOV A,PAGER ;判区域标志以确定设置哪个控制器 ANL A,#30H CJNE A,#10H,CCW_31 LCALL PRR0 ;"01"为右区 LJMP CCW_4 CCW_31: LCALL PRL0 ;"10"为左区 CCW_4: MOV A,CODER ;取间址寄存器值 MOVC A,@A+DPTR ;取字符字模数据 MOV DAT,A ;写数据 MOV A,PAGER ;判区域标志 ANL A,#30H CJNE A,#10H,CCW_41 LCALL PRR1 ;"01"为右区 LJMP CCW_5 CCW_41: LCALL PRL1 ;"10"为左区 CCW_5: INC CODER ;间址加1 INC COLUMN ;列地址加1 MOV A,COLUMN ;判列地址是否超出区域范围 CLR C CJNE A,#40H,CCW_6 CCW_6: JC CCW_9 ;未超出则继续 MOV COLUMN,#00H MOV A,PAGER ;超出则判在何区域 ANL A,#30H CJNE A,#10H,CCW_62 MOV A,PAGER CCW_61: SETB ACC.4 ;在左区则转右区 CLR ACC.5 MOV PAGER,A MOV COM,#40H ;设置右区列地址为"0" LCALL PRR0 LJMP CCW_9 CCW_62: MOV A,PAGER CLR ACC.4 ;在右区则转左区 SETB ACC.5 MOV PAGER,A MOV COM,#40H ;设置左区列地址为"0" LCALL PRL0 CCW_9: DJNZ COUNT,CCW_4 ;当页循环 MOV A,PAGER ;读页地址寄存器 JB ACC.7,CCW_10 ;判完成标志D7位,"1"则完成退出 INC A ;否则页地址加1 SETB ACC.7 ;置完成位为"1" ANL A,#0CFH ;清区域标志 MOV PAGER,A MOV CODER,#10H ;间址寄存器设置为16 LJMP CCW_1 ;大循环 CCW_10: SETB EA RET ;西文字符库 CTAB: DB 000H,000H,000H,000H,000H,000H,000H,000H ;""=00H DB 000H,000H,000H,04FH,000H,000H,000H,000H ;"!"=01H DB 000H,000H,007H,000H,007H,000H,000H,000H ;"""=02H DB 000H,014H,07FH,014H,07FH,014H,000H,000H ;"#"=03H DB 000H,024H,02AH,07FH,02AH,012H,000H,000H ;"$"=04H DB 000H,023H,013H,008H,064H,062H,000H,000H ;"%"=05H DB 000H,036H,049H,055H,022H,050H,000H,000H ;"&"=06H DB 000H,000H,005H,003H,000H,000H,000H,000H ;"1"=07H DB 000H,000H,01CH,022H,041H,000H,000H,000H ;"("=08H DB 000H,000H,041H,022H,01CH,000H,000H,000H ;")"=09H DB 000H,014H,008H,03EH,008H,014H,000H,000H ;"*"=0AH DB 000H,008H,008H,03EH,008H,008H,000H,000H ;"+"=0BH DB 000H,000H,050H,030H,000H,000H,000H,000H ;";"=0CH DB 000H,008H,008H,008H,008H,000H,000H,000H ;"-"=0DH DB 000H,000H,060H,060H,000H,000H,000H,000H ;"."=0EH DB 000H,020H,010H,008H,004H,002H,000H,000H ;"/"=0FH DB 000H,03EH,051H,049H,045H,03EH,000H,000H ;"0"=10H DB 000H,000H,042H,07FH,040H,000H,000H,000H ;"1"=11H DB 000H,042H,061H,051H,049H,046H,000H,000H ;"2"=12H DB 000H,021H,041H,045H,04BH,031H,000H,000H ;"3"=13H DB 000H,018H,014H,012H,07FH,010H,000H,000H ;"4"=14H DB 000H,027H,045H,045H,045H,039H,000H,000H ;"5"=15H DB 000H,03CH,04AH,049H,049H,030H,000H,000H ;"6"=16H DB 000H,001H,001H,079H,005H,003H,000H,000H ;"7"=17H DB 000H,036H,049H,049H,049H,036H,000H,000H ;"8"=18H DB 000H,006H,049H,049H,029H,01EH,000H,000H ;"9"=19H DB 000H,000H,036H,036H,000H,000H,000H,000H ;":"=1AH DB 000H,000H,056H,036H,000H,000H,000H,000H ;";"=1BH DB 000H,008H,014H,022H,041H,000H,000H,000H ;"<"=1CH DB 000H,014H,014H,014H,014H,014H,000H,000H ;"="=1DH DB 000H,000H,041H,022H,014H,008H,000H,000H ;">"=1EH DB 000H,002H,001H,051H,009H,006H,000H,000H ;"?"=1FH DB 000H,032H,049H,079H,041H,03EH,000H,000H ;"@"=20H DB 000H,07EH,011H,011H,011H,07EH,000H,000H ;"A"=21H DB 000H,041H,07FH,049H,049H,036H,000H,000H ;"B"=22H DB 000H,03EH,041H,041H,041H,022H,000H,000H ;"C"=23H DB 000H,041H,07FH,041H,022H,01CH,000H,000H ;"D"=24H DB 000H,07FH,049H,049H,049H,049H,000H,000H ;"E"=25H DB 000H,07FH,009H,009H,009H,001H,000H,000H ;"F"=26H DB 000H,03EH,041H,041H,049H,07AH,000H,000H ;"G"=27H DB 000H,07FH,008H,008H,008H,07FH,000H,000H ;"H"=28H DB 000H,000H,041H,07FH,041H,000H,000H,000H ;"I"=29H DB 000H,020H,040H,041H,03FH,001H,000H,000H ;"J"=2AH DB 000H,07FH,008H,014H,022H,041H,000H,000H ;"K"=2BH DB 000H,07FH,040H,040H,040H,040H,000H,000H ;"L"=2CH DB 000H,07FH,002H,00CH,002H,07FH,000H,000H ;"M"=2DH DB 000H,07FH,006H,008H,030H,07FH,000H,000H ;"N"=2EH DB 000H,03EH,041H,041H,041H,03EH,000H,000H ;"O"=2FH DB 000H,07FH,009H,009H,009H,006H,000H,000H ;"P"=30H DB 000H,03EH,041H,051H,021H,05EH,000H,000H ;"Q"=31H DB 000H,07FH,009H,019H,029H,046H,000H,000H ;"R"=32H DB 000H,026H,049H,049H,049H,032H,000H,000H ;"S"=33H DB 000H,001H,001H,07FH,001H,001H,000H,000H ;"T"=34H DB 000H,03FH,040H,040H,040H,03FH,000H,000H ;"U"=35H DB 000H,01FH,020H,040H,020H,01FH,000H,000H ;"V"36H DB 000H,07FH,020H,018H,020H,07FH,000H,000H ;"W"=37H DB 000H,063H,014H,008H,014H,063H,000H,000H ;"X"=38H DB 000H,007H,008H,070H,008H,007H,000H,000H ;"Y"=39H DB 000H,061H,051H,049H,045H,043H,000H,000H ;"Z"=3AH DB 000H,000H,000H,000H,000H,000H,000H,000H ;""=00H ;3B DB 000H,002H,004H,008H,010H,020H,000H,000H ;"\"=3CH DB 000H,000H,041H,041H,07FH,000H,000H,000H ;"]"=3DH DB 000H,004H,002H,001H,002H,004H,000H,000H ;"?"=3EH DB 000H,040H,040H,000H,040H,040H,000H,000H ;"-"=3FH DB 000H,001H,002H,004H,000H,000H,000H,000H ;"1"=40H DB 000H,020H,054H,054H,054H,078H,000H,000H ;"a"=41H DB 000H,07FH,048H,044H,044H,038H,000H,000H ;"b"=42H DB 000H,038H,044H,044H,044H,028H,000H,000H ;"c"=43H DB 000H,038H,044H,044H,048H,07FH,000H,000H ;"d"=44H DB 000H,038H,054H,054H,054H,018H,000H,000H ;"e"=45H DB 000H,000H,008H,07EH,009H,002H,000H,000H ;"f"=46H DB 000H,00CH,052H,052H,04CH,03EH,000H,000H ;"g"=47H DB 000H,07FH,008H,004H,004H,078H,000H,000H ;"h"=48H DB 000H,000H,044H,07DH,040H,000H,000H,000H ;"i"=49H DB 000H,020H,040H,044H,03DH,000H,000H,000H ;"j"=4AH DB 000H,000H,07FH,010H,028H,044H,000H,000H ;"k"=4BH DB 000H,000H,041H,07FH,040H,000H,000H,000H ;"l"=4CH DB 000H,07CH,004H,078H,004H,078H,000H,000H ;"m"=4DH DB 000H,07CH,008H,004H,004H,078H,000H,000H ;"n"=4EH DB 000H,038H,044H,044H,044H,038H,000H,000H ;"o"=4FH DB 000H,07EH,00CH,012H,012H,00CH,000H,000H ;"p"=50H DB 000H,00CH,012H,012H,00CH,07EH,000H,000H ;"q"=51H DB 000H,07CH,008H,004H,004H,008H,000H,000H ;"r"=52H DB 000H,058H,054H,054H,054H,064H,000H,000H ;"s"=53H DB 000H,004H,03FH,044H,040H,020H,000H,000H ;"t"=54H DB 000H,03CH,040H,040H,03CH,040H,000H,000H ;"u"=55H DB 000H,01CH,020H,040H,020H,01CH,000H,000H ;"v"=56H DB 000H,03CH,040H,030H,040H,03CH,000H,000H ;"w"=57H DB 000H,044H,028H,010H,028H,044H,000H,000H ;"s"=58H DB 000H,01CH,0A0H,0A0H,090H,07CH,000H,000H ;"y"=59H DB 000H,044H,064H,054H,04CH,044H,000H,000H ;"z"=5AH DB 000H,000H,008H,036H,041H,000H,000H,000H ;"{"=5BH DB 000H,000H,000H,077H,000H,000H,000H,000H ;"|"=5CH DB 000H,000H,041H,036H,008H,000H,000H,000H ;"}"=5DH DB 000H,002H,001H,002H,004H,002H,000H,000H ;"-"=5FH DB 000H,0FFH,0FFH,0FFH,0FFH,0FFH,000H,000H ;" "=60H ;汉字库 CCTAB1: ;天[12*12]下半列排 DB 00h, 00h, 40h, 48h, 48h, 48h, 48h, 0F8h DB 48h, 48h, 48h, 4Ch, 48h, 40h, 00h, 00h DB 00h, 00h, 20h, 20h, 10h, 08h, 04h, 03h DB 02h, 04h, 08h, 10h, 30h, 10h, 00h, 00h ;津[12*12]下半列排 DB 00h, 00h, 20h, 44h, 08h, 20h, 0A8h, 0A8h DB 0A8h, 0FCh, 0A8h, 0F8h, 20h, 20h, 00h, 00h DB 00h, 00h, 04h, 3Ch, 03h, 08h, 0Ah, 0Ah DB 0Ah, 3Fh, 0Ah, 0Ah, 0Ah, 08h, 00h, 00h ;工[12*12]下半列排 DB 00h, 00h, 00h, 08h, 08h, 08h, 08h, 0F8h DB 08h, 08h, 08h, 0Ch, 08h, 00h, 00h, 00h DB 00h, 00h, 10h, 10h, 10h, 10h, 10h, 1Fh DB 10h, 10h, 10h, 10h, 18h, 10h, 00h, 00h ;程[12*12]下半列排 DB 00h, 00h, 28h, 0A8h, 0F8h, 24h, 24h, 80h DB 0BCh, 0A4h, 0A4h, 0A4h, 0BCh, 80h, 00h, 00h DB 00h, 00h, 06h, 01h, 3Fh, 01h, 22h, 20h DB 24h, 24h, 3Fh, 24h, 34h, 20h, 00h, 00h ;师[12*12]下半列排 DB 00h, 00h, 00h, 0F0h, 00h, 0FCh, 00h, 0E8h DB 28h, 28h, 0F8h, 28h, 2Ch, 0E8h, 00h, 00h DB 00h, 00h, 00h, 27h, 10h, 0Fh, 00h, 0Fh DB 00h, 00h, 3Fh, 00h, 08h, 0Fh, 00h, 00h ;范[12*12]下半列排 DB 00h, 00h, 88h, 28h, 48h, 08h, 1Ch, 0C8h DB 48h, 5Ch, 48h, 0E8h, 4Ch, 08h, 00h, 00h DB 00h, 00h, 04h, 05h, 3Eh, 01h, 00h, 1Fh DB 20h, 22h, 24h, 23h, 20h, 38h, 00h, 00h ;学[12*12]下半列排 DB 00h, 00h, 80h, 60h, 0A4h, 0B8h, 0A0h, 0A4h DB 0B8h, 0A0h, 0B0h, 2Ch, 60h, 20h, 00h, 00h DB 00h, 00h, 04h, 04h, 04h, 04h, 14h, 26h DB 3Eh, 05h, 04h, 04h, 06h, 04h, 00h, 00h ;院[12*12]下半列排 DB 00h, 00h, 0F8h, 08h, 68h, 98h, 20h, 50h DB 50h, 54h, 58h, 50h, 50h, 30h, 00h, 00h DB 00h, 00h, 3Fh, 04h, 08h, 27h, 21h, 11h DB 0Fh, 01h, 1Fh, 21h, 21h, 39h, 00h, 00h PRNTAB1_1: DB 1BH,57H,00H DB 1BH,31H,00h; DB 1BH,4BH,10H,00H; DB 00h, 00h, 04h, 04h, 08h, 10h, 20h, 0C0h DB 40h, 20h, 10h, 08h, 0Ch, 08h, 00h, 00h DB 1BH,36H DB 20H DB 1BH,4BH,10H,00H DB 00h, 00h, 20h, 3Ch, 0C0h, 10h, 50h, 50h DB 50h, 0FCh, 50h, 50h, 50h, 10h, 00h, 00h DB 1BH,36H DB 20H DB 1BH,4BH,10H,00H DB 00h, 00h, 08h, 08h, 08h, 08h, 08h, 0F8h DB 08h, 08h, 08h, 08h, 18h, 08h, 00h, 00h DB 1BH,36H DB 20H DB 1BH,4BH,10H,00H DB 00h, 00h, 60h, 80h, 0FCh, 80h, 44h, 04h DB 24h, 24h, 0FCh, 24h, 2Ch, 04h, 00h, 00h DB 1BH,36H DB 20H DB 1BH,4BH,10H,00H DB 00h, 00h, 00h, 0E4h, 08h, 0F0h, 00h, 0F0h DB 00h, 00h, 0FCh, 00h, 10h, 0F0h, 00h, 00h DB 1BH,36H DB 20H DB 1BH,4BH,10H,00H DB 00h, 00h, 20h, 0A0h, 7Ch, 80h, 00h, 0F8h DB 04h, 44h, 24h, 0C4h, 04h, 1Ch, 00h, 00h DB 1BH,36H DB 20H DB 1BH,4BH,10H,00H DB 00h, 00h, 20h, 20h, 20h, 20h, 28h, 64h DB 7Ch, 0A0h, 20h, 20h, 60h, 20h, 00h, 00h DB 1BH,36H DB 20H DB 1BH,4BH,10H,00H DB 00h, 00h, 0FCh, 20h, 10h, 0E4h, 84h, 88h DB 0F0h, 80h, 0F8h, 84h, 84h, 9Ch, 00h, 00h DB 0DH PRNTAB1_2: DB 1BH,57H,00H DB 1BH,31H,00h; DB 1BH,4BH,10H,00H; DB 00h, 00h, 02h, 12h, 12h, 12h, 12h, 1Fh DB 12h, 12h, 12h, 32h, 12h, 02h, 00h, 00h DB 1BH,36H DB 20H DB 1BH,4BH,10H,00H DB 00h, 00h, 04h, 22h, 10h, 04h, 15h, 15h DB 15h, 3Fh, 15h, 1Fh, 04h, 04h, 00h, 00h DB 1BH,36H DB 20H DB 1BH,4BH,10H,00H DB 00h, 00h, 00h, 10h, 10h, 10h, 10h, 1Fh DB 10h, 10h, 10h, 30h, 10h, 00h, 00h, 00h DB 1BH,36H DB 20H DB 1BH,4BH,10H,00H DB 00h, 00h, 14h, 15h, 1Fh, 24h, 24h, 01h DB 3Dh, 25h, 25h, 25h, 3Dh, 01h, 00h, 00h DB 1BH,36H DB 20H DB 1BH,4BH,10H,00H DB 00h, 00h, 00h, 0Fh, 00h, 3Fh, 00h, 17h DB 14h, 14h, 1Fh, 14h, 34h, 17h, 00h, 00h DB 1BH,36H DB 20H DB 1BH,4BH,10H,00H DB 00h, 00h, 11h, 14h, 12h, 10h, 38h, 13h DB 12h, 3Ah, 12h, 17h, 32h, 10h, 00h, 00h DB 1BH,36H DB 20H DB 1BH,4BH,10H,00H DB 00h, 00h, 01h, 06h, 25h, 1Dh, 05h, 25h DB 1Dh, 05h, 0Dh, 34h, 06h, 04h, 00h, 00h DB 1BH,36H DB 20H DB 1BH,4BH,10H,00H DB 00h, 00h, 1Fh, 10h, 16h, 19h, 04h, 0Ah DB 0Ah, 2Ah, 1Ah, 0Ah, 0Ah, 0Ch, 00h, 00h