单片机控制的16*16点阵显示汉字,为什么出现的字体是镜像的?怎么改正?
DJNZR4,CM;96列未移动完,继续AJMPMAIN;96列移动完,返回,重新从“凤”开始显示D1MS:MOVR6,#2MOVR7,#248DJNZR7,$DJNZR...
DJNZ R4,CM ;96列未移动完,继续
AJMP MAIN ;96列移动完,返回,重新从“凤”开始显示
D1MS: MOV R6,#2
MOV R7,#248
DJNZ R7,$
DJNZ R6,$-4
RET
TAB: DB 010H,000H,0F8H,03FH,010H,020H,010H,020H,0F0H,02FH,050H,020H,050H,028H,090H,024H;
DB 090H,022H,010H,021H,090H,022H,0D0H,024H,050H,028H,012H,020H,00AH,040H,006H,080H;"凤",
DB 010H,000H,0F8H,01FH,010H,010H,010H,012H,010H,011H,010H,011H,014H,010H,0FEH,0FFH;
DB 010H,010H,010H,010H,010H,010H,010H,010H,010H,010H,010H,010H,050H,020H,020H,040H;"丹",0
DB 000H,008H,07CH,004H,0C4H,0FFH,044H,000H,048H,03FH,048H,021H,050H,021H,048H,03FH;
DB 044H,000H,042H,07FH,042H,002H,062H,004H,054H,0FFH,048H,004H,040H,014H,040H,008H;"郭",1
DB 008H,000H,0FCH,03FH,008H,020H,0F8H,03FH,008H,020H,0F8H,03FH,000H,001H,008H,021H;
DB 0FCH,03FH,000H,021H,010H,041H,0F8H,0BFH,000H,001H,004H,001H,0FEH,0FFH,000H,000H;"星",2
DB 000H,001H,008H,001H,0FCH,07FH,000H,001H,040H,005H,030H,009H,00EH,031H,004H,0C1H;
DB 0E0H,00FH,040H,000H,088H,001H,0FCH,07FH,000H,001H,000H,001H,000H,005H,000H,002H;"李",3
DB 010H,000H,0F8H,01FH,010H,010H,010H,012H,010H,011H,010H,011H,014H,010H,0FEH,0FFH;
DB 010H,010H,010H,010H,010H,010H,010H,010H,010H,010H,010H,010H,050H,020H,020H,040H;"丹",4
END 展开
AJMP MAIN ;96列移动完,返回,重新从“凤”开始显示
D1MS: MOV R6,#2
MOV R7,#248
DJNZ R7,$
DJNZ R6,$-4
RET
TAB: DB 010H,000H,0F8H,03FH,010H,020H,010H,020H,0F0H,02FH,050H,020H,050H,028H,090H,024H;
DB 090H,022H,010H,021H,090H,022H,0D0H,024H,050H,028H,012H,020H,00AH,040H,006H,080H;"凤",
DB 010H,000H,0F8H,01FH,010H,010H,010H,012H,010H,011H,010H,011H,014H,010H,0FEH,0FFH;
DB 010H,010H,010H,010H,010H,010H,010H,010H,010H,010H,010H,010H,050H,020H,020H,040H;"丹",0
DB 000H,008H,07CH,004H,0C4H,0FFH,044H,000H,048H,03FH,048H,021H,050H,021H,048H,03FH;
DB 044H,000H,042H,07FH,042H,002H,062H,004H,054H,0FFH,048H,004H,040H,014H,040H,008H;"郭",1
DB 008H,000H,0FCH,03FH,008H,020H,0F8H,03FH,008H,020H,0F8H,03FH,000H,001H,008H,021H;
DB 0FCH,03FH,000H,021H,010H,041H,0F8H,0BFH,000H,001H,004H,001H,0FEH,0FFH,000H,000H;"星",2
DB 000H,001H,008H,001H,0FCH,07FH,000H,001H,040H,005H,030H,009H,00EH,031H,004H,0C1H;
DB 0E0H,00FH,040H,000H,088H,001H,0FCH,07FH,000H,001H,000H,001H,000H,005H,000H,002H;"李",3
DB 010H,000H,0F8H,01FH,010H,010H,010H,012H,010H,011H,010H,011H,014H,010H,0FEH,0FFH;
DB 010H,010H,010H,010H,010H,010H,010H,010H,010H,010H,010H,010H,050H,020H,020H,040H;"丹",4
END 展开
3个回答
意法半导体(中国)投资有限公司
2023-06-12 广告
2023-06-12 广告
单片机汇编程序是用汇编语言编写的程序,用于控制单片机的操作。汇编语言是一种比较接近计算机硬件语言的低级语言,相对于高级语言来说更容易理解和实现。下面是单片机汇编程序的基本步骤:1. 将代码和数据汇编到规定的段中。2. 在存储器中用未初始化的...
点击进入详情页
本回答由意法半导体(中国)投资有限公司提供
展开全部
单片机控制的16*16点阵显示汉字,出现字体是镜像的现象是由于取点阵时扫描方向搞反了。改正方法是逆序读点阵数组数据,即原来从数组0下标开始读改为从下标15开始倒着读,写的顺序不变,就矫正了。
更多追问追答
追问
逆序试了 显示的也不对
追答
DB 00H,00H,FCH,1FH,04H,10H,04H,10H,F4H,13H,04H,12H,14H,12H,24H,11H;
DB 44H,11H,84H,10H,44H,11H,24H,52H,14H,52H,02H,50H,02H,60H,01H,40H;"凤",0
DB 00H,00H,F8H,0FH,08H,08H,08H,08H,48H,08H,88H,08H,88H,08H,08H,08H;
DB FFH,7FH,08H,08H,08H,08H,08H,08H,04H,08H,04H,08H,02H,0AH,01H,04H;"丹",1
DB 08H,00H,10H,3EH,FFH,22H,00H,12H,7EH,12H,42H,0AH,7EH,12H,00H,12H;
DB 7EH,22H,20H,22H,10H,22H,F0H,16H,1FH,0AH,10H,02H,14H,02H,08H,02H;"郭",2
DB 00H,00H,F8H,0FH,08H,08H,F8H,0FH,08H,08H,F8H,0FH,80H,00H,88H,00H;
DB F8H,1FH,84H,00H,82H,00H,F8H,0FH,80H,00H,80H,00H,FEH,3FH,00H,00H;"星",3
DB 80H,00H,80H,00H,FEH,3FH,C0H,01H,A0H,02H,90H,04H,8CH,18H,83H,60H;
DB F0H,07H,00H,02H,00H,01H,FFH,7FH,80H,00H,80H,00H,A0H,00H,40H,00H;"李",4
DB 00H,00H,F8H,0FH,08H,08H,08H,08H,48H,08H,88H,08H,88H,08H,08H,08H;
DB FFH,7FH,08H,08H,08H,08H,08H,08H,04H,08H,04H,08H,02H,0AH,01H,04H;"丹",5
你再试试。
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
16 X 16 点阵是双字节数据。
(1)显示程序不变,把点阵字符数据镜像:
把 D15 与 D0、D14 与 D1、D13 与 D2、D12 与 D3 。。。对调。
如:12E8H = 0001 0010 1110 1000
改成 0001 0111 0100 1000 = 1748H 。
(2)如果数据是串行送显示,点阵字符数据不变,改变数据传输次序:
如:原来是高位在前,改为低位在前。D15 、D14、。。。D0 改成 D0、D1、。。。D15。
(3)把显示屏的接线镜像对调。
如果你的字符库是标准字库,应该采用(2)或(3)的方法。
(1)显示程序不变,把点阵字符数据镜像:
把 D15 与 D0、D14 与 D1、D13 与 D2、D12 与 D3 。。。对调。
如:12E8H = 0001 0010 1110 1000
改成 0001 0111 0100 1000 = 1748H 。
(2)如果数据是串行送显示,点阵字符数据不变,改变数据传输次序:
如:原来是高位在前,改为低位在前。D15 、D14、。。。D0 改成 D0、D1、。。。D15。
(3)把显示屏的接线镜像对调。
如果你的字符库是标准字库,应该采用(2)或(3)的方法。
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询