哦,少写了一句代码:
void main(void)
{
uchar zhi;
reset();
P1_5=P1_6=1;
P2=0x80; //address
P0=0x01;
IOWB=0;
IOWB=1;
P2=0x80;
P0=0xff;// add this
IORB=0;
zhi=P0;
IORB=1;
if(zhi==0x01)
P1_5=0;
else
P1_6=0;
for(;;){}
}
发表时间:2001年10月17日14:57:00