uint code DAT1[]={0x8000,0xc000,0x4000,0xe000,0x6000,0x2000,0xf000,0x7000,0x3000,0x1000,0xf800,0x7800,0x3800,0x1800,0x0800,0xfc00,
0x7c00,0x3c00,0x1c00,0x0c00,0x0400,0xfe00,0x7e00,0x3e00,0x1e00,0x0e00,0x0600,0x0200,0xff00,0x7f00,0x3f00,0x1f00,
0x0f00,0x0700,0x0300,0x0100,0xff80,0x7f80,0x3f80,0x1f80,0x0f80,0x0780,0x0380,0x0180,0x0080,0xffc0,0x7fc0,0x3fc0,
0x1fc0,0x0fc0,0x07c0,0x03c0,0x01c0,0x00c0,0x0040,0xffe0,0x7fe0,0x3fe0,0x1fe0,0x0fe0,0x07e0,0x03e0,0x01e0,0x00e0,
0x0060,0x0020,0xfff0,0x7ff0,0x3ff0,0x1ff0,0x0ff0,0x07f0,0x03f0,0x01f0,0x00f0,0x0070,0x0030,0x0010,0xfff8,0x7ff8,
0x3ff8,0x1ff8,0x0ff8,0x07f8,0x03f8,0x01f8,0x00f8,0x0078,0x0038,0x0018,0x0008,0xfffc,0x7ffc,0x3ffc,0x1ffc,0x0ffc,
0x07fc,0x03fc,0x01fc,0x00fc,0x007c,0x003c,0x001c,0x000c,0x0004,0xfffe,0x7ffe,0x3ffe,0x1ffe,0x0ffe,0x07fe,0x03fe,
0x01fe,0x00fe,0x007e,0x003e,0x001e,0x000e,0x0006,0x0002,0xffff,0x7fff,0x3fff,0x1fff,0x0fff,0x07ff,0x03ff,0x01ff,
0x00ff,0x007f,0x003f,0x001f,0x000f,0x0007,0x0003,0x0001,
0x7fff,0x3fff,0x1fff,0x0fff,0x07ff,0x03ff,0x01ff,0x00ff,0x007f,0x003f,0x001f,0x000f,0x0007,0x0003,0x0001,0x0000,
0x3fff,0x1fff,0x0fff,0x07ff,0x03ff,0x01ff,0x00ff,0x007f,0x003f,0x001f,0x000f,0x0007,0x0003,0x0001,0x0000,0x0000,
0x1fff,0x0fff,0x07ff,0x03ff,0x01ff,0x00ff,0x007f,0x003f,0x001f,0x000f,0x0007,0x0003,0x0001,0x0000,0x0000,0x0000,
0x0fff,0x07ff,0x03ff,0x01ff,0x00ff,0x007f,0x003f,0x001f,0x000f,0x0007,0x0003,0x0001,0x0000,0x0000,0x0000,0x0000,
0x07ff,0x03ff,0x01ff,0x00ff,0x007f,0x003f,0x001f,0x000f,0x0007,0x0003,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,
0x03ff,0x01ff,0x00ff,0x007f,0x003f,0x001f,0x000f,0x0007,0x0003,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x01ff,0x00ff,0x007f,0x003f,0x001f,0x000f,0x0007,0x0003,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x00ff,0x007f,0x003f,0x001f,0x000f,0x0007,0x0003,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x007f,0x003f,0x001f,0x000f,0x0007,0x0003,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0007,0x0003,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0003,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
};
void Red()
{OE=1;
for(i=0;i<391;i++)
{temp=DAT1[i];
OE=1;
for(j=0;j<16;j++)
{P1.0=(bit)temp&0x8000;temp=temp<<1;CLK=1;CLK=0;}
LE=0;LE=1;OE=0;
if(tbit==0)
{while(1)
{;}
}
else{tbit=0;TR0=1;}
}
}请问这样查表有什么不对呀?还有C51支持查16位的表格数据吗?我是用这个控制5026IC的OE,LE,CLK分别接IO脚。本人用汇编已经调试好了,现在想用C写来对比一下,现在我的C烧进去一点反应也没有。查了几遍好像都没有错。 |