64*14点阵程序编译出错!:寻求单片机高手,在网上下了一个64*16点阵C程序,编译时提示有一个地方出错,查了几久没看出来,请求帮助!
#include<reg52.h>
#define ROW_address P2
sbit R1=P1^0;
sbit G1=P1^1;
sbit SK=P1^2;
sbit LT=P1^3;
sbit EN=P1^4;
unsigned char code GB_16[] =
{
0x08,0x00,0x10,0x40,0x06,0x08,0x10,0x20,0x0C,0x00,0x18,0x40,0x78,0x88,0x10,0x20,
0x19,0xFC,0x27,0xFE,0x08,0x48,0x10,0x20,0x10,0x04,0x50,0x40,0x08,0x48,0xFD,0xFE,
0x22,0x04,0x9B,0xFC,0xFE,0x08,0x10,0x20,0x43,0x04,0x32,0x94,0x18,0x88,0x14,0x20,
0xFE,0x04,0x22,0x94,0x1C,0x48,0x19,0xFC,0x04,0x04,0x63,0xFC,0x2A,0x48,0x31,0x08,
0x08,0x04,0xA0,0x00,0x28,0x0E,0xD0,0x88,0x0A,0x04,0x2F,0xFE,0x48,0x78,0x10,0x90,
0x11,0x04,0x20,0x00,0x8B,0x88,0x10,0x60,0x7F,0x84,0x25,0x44,0x08,0x08,0x10,0x60,
0x21,0x04,0x25,0x22,0x08,0x08,0x10,0x90,0x00,0x28,0x25,0x0A,0x08,0x08,0x11,0x0E,
0x00,0x10,0x28,0xF8,0x08,0x08,0x56,0x04,0x00,0x00,0x20,0x00,0x08,0x08,0x20,0x00,
0x01,0x00,0x11,0x08,0x20,0x90,0x00,0x04,0x01,0x00,0x10,0x90,0x20,0x90,0x7F,0x84,
0x01,0x00,0x10,0xA0,0x27,0xFC,0x12,0x24,0x3F,0xF8,0xFB,0xFC,0x20,0x90,0x12,0x24,
0x21,0x08,0x10,0x44,0xFB,0xF8,0xFF,0xE4,0x21,0x08,0x38,0x44,0x22,0x08,0x12,0x24,
0x3F,0xF8,0x37,0xFC,0x73,0xF8,0x12,0x24,0x21,0x08,0x52,0x40,0x6A,0x08,0x22,0x24,
0x21,0x08,0x52,0x40,0xA3,0xF8,0x22,0x04,0x21,0x08,0x93,0xFE,0xA0,0x40,0x41,0x14,
0x3F,0xF8,0x10,0xC2,0x27,0xFE,0x01,0x08,0x21,0x08,0x11,0x42,0x20,0x40,0x3F,0xFC,
0x01,0x02,0x12,0x4A,0x20,0xA0,0x01,0x00,0x01,0x02,0x14,0x44,0x20,0x98,0x01,0x00,
0x00,0xFE,0x10,0x40,0x21,0x0E,0xFF,0xFE,0x00,0x00,0x10,0x40,0x26,0x04,0x00,0x00,
0x20,0x00,0x20,0x40,0x01,0x00,0x02,0x00,0x3F,0x00,0x30,0x40,0x01,0x00,0x02,0x00,
0x48,0x7C,0x24,0x4C,0x01,0x00,0x7F,0xFC,0x08,0x44,0x42,0x70,0x01,0x00,0x04,0x00,
0xFF,0x44,0xFF,0x44,0x09,0x40,0x04,0x80,0x0C,0x44,0x42,0x46,0x0D,0x20,0x08,0x80,
0x0A,0x7C,0x00,0x7C,0x19,0x10,0x10,0x80,0x11,0x00,0x7E,0x00,0x11,0x18,0x3F,0xFC,
0x6F,0xF0,0x42,0x40,0x21,0x0C,0x00,0x80,0x08,0x10,0x7E,0x4C,0x41,0x06,0x00,0x80,
0x08,0x10,0x42,0x70,0x81,0x04,0xFF,0xFE,0x0F,0xF0,0x7E,0x40,0x01,0x00,0x00,0x80,
0x08,0x10,0x42,0x44,0x01,0x00,0x00,0x80,0x08,0x10,0x42,0x46,0x01,0x00,0x00,0x80,
0x0F,0xF0,0x4A,0x3C,0x05,0x00,0x00,0x80,0x08,0x10,0x44,0x00,0x02,0x00,0x00,0x80,
};
unsigned int x=0;
unsigned long cnt=0;
unsigned int Row=0;
void delay(unsigned int i)
{
unsigned int j,k;
for(i;i>0;i--)
for(j=10;j>0;j--)
for(k=200;k>0;k--);
}
void display(unsigned int C_num)
{
unsigned char k,n,num;
for(k=0;k<2*C_num;k++)
{
num=GB_16[8*Row+k+128*x];
for(n=0;n<8;n++)
{
SK=0;
R1=~num&0x80;
G1=~num&0x80;
SK=1;
num<<=1;
}
}
EN=1;
LT=1;
LT=0;
ROW_address=Row;
EN=0;
}
void time0() interrupt 1
{
TH0=0xf8;
TL0=0x09;
Row++;
if(Row==16)
Row=0;
display(4);
cnt++;
}
void init()
{
TMOD=0x01;
TH0=0xf8;
TL0=0xc9;
ET0=1;
TR0=1;
EA=1;
}
void main()
{
init();
while(1)
{
if(cnt==1000)
{
cnt=0;
x++;
if(x==3)
x=0;
}
}
}