This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

28062通过I2C一个一个字节写24C32,这个办法可行吗

Other Parts Discussed in Thread: CONTROLSUITE

        I2caRegs.I2CFFTX.all = 0x00;  // disable FIFO mode and TXFIFO
        I2caRegs.I2CFFRX.all = 0x00;  // disable RXFIFO, clear RXFFINT,

        I2caRegs.I2CSAR = I2C_SLAVE_ADDR;
        I2caRegs.I2CCNT =1;
 I2caRegs.I2CDXR = I2cMsg.highAddr;
        I2caRegs.I2CMDR.all = 0x6620;   // S.A.D
 for (i=0;i<30000;i++)
  {
  }
 I2caRegs.I2CCNT =1;
 I2caRegs.I2CDXR = I2cMsg.lowAddr;
 I2caRegs.I2CMDR.all = 0x6620;
 for (i=0;i<30000;i++)
  {
  }
 I2caRegs.I2CCNT =1;
 I2caRegs.I2CDXR = I2cMsg.buffer[0];
 I2caRegs.I2CMDR.all = 0x6620;
 for (i=0;i<30000;i++)
  {
  }
 I2caRegs.I2CCNT =1;
 I2caRegs.I2CDXR = I2cMsg.buffer[1];
 I2caRegs.I2CMDR.all = 0x6E20;// S.A.D.P
 for (i=0;i<30000;i++)
   {
   }

FIFO只能写4个字节,这个办法可最多能写32个字节,能缩短存储时间。