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.

I2C0 and I2C1...



Use the I2C0 and I2C1 in DSP6713. I use the I2C0(I2C0 is good clokck signal). But I2C1 is not clock signal. How about use the I2C1???

void init_device_config(void){  DEVCFG_REG &= ~DEVCFG_EKSRC;  // SYSCLK3 is the EMIF input clock source  DEVCFG_REG |= DEVCFG_TOUT1SEL;  // is used as a Timer1 output pin  DEVCFG_REG |= DEVCFG_TOUT0SEL;  // is used as a Timer0 output pin  DEVCFG_REG |= DEVCFG_MCBSP0DIS; // McBSP0 is enabled and McASP0 is disabled  DEVCFG_REG |= DEVCFG_MCBSP1DIS; // McBSP1 is enabled and McASP1 is disabled

 I2CPSC0_REG = 9;  I2CPSC1_REG = 9; }

// i2c initial void init_i2c(void) {  I2CMDR0_REG = 0x0000;  I2CMDR1_REG = 0x0000;

 I2CMDR0_REG = 0x0020;  I2CMDR1_REG = 0x0020;

 I2CSTR0_REG = 0x1000;  I2CSTR1_REG = 0x1000;

 I2CIER0_REG = 0x0000;  I2CIER1_REG = 0x0000;

 I2CCLKL0_REG = 0x0005;  I2CCLKH0_REG = 0x000A;

 I2CCLKL1_REG = 0x0005;  I2CCLKH1_REG = 0x000A; } //use I2C0 void eeprom_wr(BYTE page, BYTE f_add, BYTE s_add, BYTE data)//zero {  int i = 0;

 BYTE temp[3];  temp[0] = f_add;  temp[1] = s_add;  temp[2] = data;

 I2CCNT0_REG = 3;  I2CSAR0_REG = 0x50;

 I2CMDR0_REG = 0x2E20;

 for( i = 0 ; i < 3 ; i++ )  {   eeprom_str = I2CSTR0_REG;      while( ! (I2CSTR0_REG & ( 0x10 |  0x04)) );

  if( I2CSTR0_REG & 0x02 )   {    I2CMDR0_REG = 0;    return;   }

  I2CDXR0_REG = temp[i];  } }

I use the I2C0 same as I2C1 . But I2C1 Clock Signal is not output.

Please~Help me.