微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > PIC16F72-AT24C64读写

PIC16F72-AT24C64读写

时间:11-13 来源:互联网 点击:

}

uchar WIN24C64_read(uint address)

{
uchar i;
start();
writex(0xa0);
clock();
writex(address/256);
clock();
writex(address%256);
clock();
start();
writex(0xa1);
clock();
i=readx();
stop();
delay1(10);
return(i);

}

void WIN24C64_write(uint address,uchar info)

{

start();
writex(0xa0);
clock();
writex(address/256);
clock();
delay1(10);
writex(address%256);
clock();
writex(info);
clock();
stop();
delay1(200);

}

#endif

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top