z8188893 发表于 2012-3-28 10:03:41

利用译码法扩展一片6264,判定该6264是否工作正常

#include<reg51.h>
#include<absacc.h>
main()
{
unsigned char cont;
unsigned char i;
bit wrong;
wrong=0;   //设定没有错误存储单元
cont=0x8000;//设定读写初始地址
i=20;
while(i--){
        xbyte=0x55;//向6264中写入55H
      cont++;
      }
cont=0x8000;
i=20;
while(i--){
        if(xbyte!=0x55){
                wrong=1;       //说明有错误存储单元
                goto ed;      // 发现有错误存储单元,停止检测
                }
        cont++;
        }
ed: while(1);
}
页: [1]
查看完整版本: 利用译码法扩展一片6264,判定该6264是否工作正常