void AT24C04_Write(uchar adress,uchar tdata)
{
bit temp;
AT24C04_Start();
AT24C04_Write_Byte(0xa0);
temp = AT24C04_Ack();
if(temp == 0)
AT24C04_Stop();
else
{
AT24C04_Write_Byte( adress);
AT24C04_Write_Byte( tdata); //可以直接传递tdata2020.3.7
temp = AT24C04_Ack();
if(temp == 1)
AT24C04_Stop();
}
来源:CSDN
作者:qq_25814297
链接:https://blog.csdn.net/qq_25814297/article/details/104716510