? 只能運(yùn)行到1? 發(fā)送設(shè)備地址0x30 邏輯分析儀檢測(cè)到的確是0x18
#define NorthAdderss? 0x30?
I2C_Init(I2C_Mode_I2C, 10000, I2C_DutyCycle_16_9, I2C_Ack_Enable, I2C_AckAddr_7bit, 0);
? while(I2C_GetFlagStatus(I2C_FLAG_BUSY));
??? PRINT("IIC start\r\n");
?????? I2C_GenerateSTART(ENABLE);
??????????? while(!I2C_CheckEvent(I2C_EVENT_MASTER_MODE_SELECT));
??????????? I2C_Send7bitAddress(NorthAdderss, I2C_Direction_Transmitter);
??????????? PRINT("1 \r\n");
??????????? while(!I2C_CheckEvent(I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED));
??????????? PRINT("2 \r\n");
??????????? I2C_SendData(0x39);
??????????? while(!I2C_CheckEvent(I2C_EVENT_MASTER_BYTE_TRANSMITTED));
??????????? PRINT("3 \r\n");