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.

SM470的I2C读AT24C04中数据

uint16* I2c_Page_Rx_single()
{
  uint16 I2Cbuffer,i;
  int num=0;
      
         I2C2OAR = 0x00;
         I2C2IMR = 0x0;
         I2C2CNT = 16;
         I2C2SAR = 0x50;
         I2C2MDR |= MST;
         I2C2MDR |= NIRS;
         I2C2MDR &= ~TRX;
         I2C2MDR |= STT + STP;
               for(i=0;i<16;i++)
        {
          while(!(I2C2SR & 0x0008));
          I2Cbuffer=I2C2DRR;
          printf("%d\r\n", I2Cbuffer);
        }

AT24C04有512个字节,32页,现在我想读取某一页的数据,在程序中I2C2SAR = 0x50   0x50是设备地址,接下来要给读具体哪一页的地址;到这里我就不知道怎么给它地址,求各路大神指导!