微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 嵌入式设计讨论 > MCU和单片机设计讨论 > iic总线写数据问题

iic总线写数据问题

时间:10-02 整理:3721RD 点击:
void write_byte(uchar dete)
{
          uchar i,temp;
          temp=dete;
          for(i=0;i<8;i++)
          {       
                  temp=temp<<1;
                scl=0;
                delay();
                  sda=CY;
                delay();
                scl=1;
                delay();
          }
          scl=0;
          delay();
          sda=1;
          delay();
               
}
iic 总线写入数据时 for 循环之后为什么还要加上
         scl=0;
          delay();
          sda=1;
          delay();

这应该是时序吧

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

网站地图

Top