I2C_InitStructure.I2C_Mode = I2C_Mode_I2C;
I2C_InitStructure.I2C_DutyCycle = I2C_DutyCycle_2;
I2C_InitStructure.I2C_OwnAddress1 = I2C1_SLAVE_ADDRESS7;
I2C_InitStructure.I2C_Ack = I2C_Ack_Enable;
I2C_InitStructure.I2C_AcknowledgedAddress = I2C_AcknowledgedAddress_7bit;
I2C_InitStructure.I2C_ClockSpeed = I2C_Speed;
I2C_OwnAddress1 IIC自身地址, I2C1_SLAVE_ADDRESS7是外接EEPROM的设备地址;为什么要把设备地址 设置到 自身地址寄存器里 有什么好处吗
当 IIC 工作在从模式时 混不混引起 与外部eeprom地址一样儿导致的错误; |