ISendByte(0x94,0x8c); DelayNS(10); I2C_ReadNByte(0x94,ONE_BYTE_SUBA,0x00,data_buf1,0x03); DelayNS(10); ISendByte(0x96,0x8c); DelayNS(10); I2C_ReadNByte(0x96,ONE_BYTE_SUBA,0x00,data_buf2,0x03); DelayNS(10); ISendByte(0x98,0x8c); DelayNS(10); I2C_ReadNByte(0x98,ONE_BYTE_SUBA,0x00,data_buf3,0x03); DelayNS(10); ISendByte(0x9a,0x8c); DelayNS(10); I2C_ReadNByte(0x9a,ONE_BYTE_SUBA,0x00,data_buf4,0x03); if(UART0_GetByte()==0x55) { UART0_SendByte(data_buf1[2]); DelayNS(10); UART0_SendByte(data_buf2[2]); DelayNS(10); UART0_SendByte(data_buf3[2]); DelayNS(10); UART0_SendByte(data_buf4[2]); DelayNS(10); } 本来读回的值应该是写进去的控制字0x8c,为什么显示的是两个FF呢? |