我现在用stm32模拟I2C对单个寄存器地址进行读取,但是完全没有应答,地址和时序都是参考数据手册来的,各位大神麻烦帮忙看哈会是什么问题呢?非常感谢!!!
u8 ReadOneByte(u16 ReadAdder)
{
u8 temp = 0;
IIC_Starts();
IIC_Send_Byte((0x08<<1)|0X00); IIC_Wait_ACK();
Delay_us_76930(1);
IIC_Send_Byte(ReadAdder ); IIC_Wait_ACK();
IIC_Stop();
IIC_Starts();
IIC_Send_Byte((0x08<<1)|0x01);
IIC_Wait_ACK();
temp = IIC_Read_Byte();
IIC_Wait_ACK();
Delay_us_76930(1);
IIC_NAck();
IIC_Stop();
return temp;
}
Star Xu:
www.ti.com/…/slva626b.pdf
带CRC校验您参考上面的文档
Q X:
回复 Star Xu:
请问有模拟I2C的例程吗?
Star Xu:
回复 Q X:
非常抱歉,没有例程