![]() |
發(fā)布時間: 2018-2-8 21:20
正文摘要:#include<reg52.h> unsigned char lie[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe}; unsigned char hang[3][8]={0x00,0x18,0x24,0x24,0x24,0x24,0x18,0x00, //數(shù)字0 &n ... |
是消影問題,改一下程序就好了 |
admin 發(fā)表于 2018-2-9 01:11 可以說詳細一點嗎?我真的想不出辦法來了
|
科技論2 發(fā)表于 2018-2-8 21:29 可能是有特殊字符被屏蔽了,代碼最好用代碼框 框起來 |
又來寫一遍,好煩啊。大家可以看一下圖片和程序,按照正常的思路數(shù)字“0”在8*8點陣第一行應該是0x00,第二行應該是0x18,我按照這種思路用delay函數(shù)寫過一遍結果是正常的,用定時器就出現(xiàn)上面這中情況,先謝謝大家了。 |
#include<reg52.h> unsigned char lie[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe}; unsigned char hang[3][8]={0x00,0x18,0x24,0x24,0x24,0x24,0x18,0x00, //數(shù)字0 0x00,0x3c,0x20,0x38,0x04,0x24,0x38,0x00, //數(shù)字5 0x00,0x00,0x36,0x49,0x49,0x49,0x36,0x00}; //數(shù)字8 int a,i,j; void main() { TMOD=0x01; TH0=(65536-50000)/256; TL0=(65536-50000)%256; TR0=1; while(1) { P2=hang[j][i]; P1=lie[i]; i++; if(i==8) { i=0; } if(TF0==1) { TF0=0; a++; if(a==10) { a=0; j++; if(j==3) { j=0; } } } } } |
本來有挺多東西接結果上傳后就不見了 |