各位大佬,我是刚刚开始学习单片机的小白,今天尝试做滚动箭头时做了一下午在Proteus上仿真运行都没有效果,照着类似帖子做的图和代码如下,运行时什么图案都没有,甚至根本不亮。求助问题出在哪
单片机源程序如下:
#include<reg51.h>
#include<intrins.h>
#define uchar unsigned char;
#define uint unsigned int;
uchar code M[]={0xff,0xff,0xfe,0xfd,0xf8,0xfd,0xfe,0xff,
0xff,0xff,0xfd,0xfb,0xf0,0xfb,0xfd,0xff,
0xff,0xff,0xfb,0xf7,0xe0,0xf7,0xfb,0xff,
0xff,0xff,0xf7,0xef,0xc0,0xef,0xf7,0xff,
0xff,0xff,0xef,0xdf,0x80,0xdf,0xef,0xff,
0xff,0xff,0xdf,0xbf,0x00,0xbf,0xdf,0xff};
uchar i,num,t;
int main(){
TMOD=0x01;
TH0=(65536-2000)/256;
TL0=(65536-2000)%256;
TR0=1;
EA=1;
ET0=1;
P3=0x80;
while(1);
return 0;
}#include<reg51.h>
#include<intrins.h>
#define uchar unsigned char;
#define uint unsigned int;
uchar code M[]={0xff,0xff,0xfe,0xfd,0xf8,0xfd,0xfe,0xff,
0xff,0xff,0xfd,0xfb,0xf0,0xfb,0xfd,0xff,
0xff,0xff,0xfb,0xf7,0xe0,0xf7,0xfb,0xff,
0xff,0xff,0xf7,0xef,0xc0,0xef,0xf7,0xff,
0xff,0xff,0xef,0xdf,0x80,0xdf,0xef,0xff,
0xff,0xff,0xdf,0xbf,0x00,0xbf,0xdf,0xff};
uchar i,num,t;
int main(){
TMOD=0x01;
TH0=(65536-2000)/256;
TL0=(65536-2000)%256;
TR0=1;
EA=1;
ET0=1;
P3=0x80;
while(1);
return 0;
}
|