Loading ...
Sorry, an error occurred while loading the content.

51I²C Configuration

Expand Messages
  • marcusmoser81
    May 9, 2006
      Hello,

      I'm interested in programming the ADuC7020 microcontroller. I have
      succesfully programmed the UART. But now I have problems with I²C.

      Here is a part of my code:

      void InitI2C(void)
      {
      GP1CON = 0x22; // I2C1 on P1.2 and P1.3,

      I2C1CFG = 0x0002; // Master Enable & Enable Generation of Master
      Clock

      // I2C1-Master setup
      I2C1DIVH = 0xCF; // 0x3232 = 400kHz
      I2C1DIVL = 0xCF; // 0xCFCF = 100kHz

      IRQEN = 0x400; // I2C0 Master Interupt

      // Transmit
      I2C1ADR = 0x1A; // set i2c1 address (LSB = 0, Master Write)=
      Adresse of AD5933

      }



      What isn't right? I don't see a signal on my oscilloscope, but I don't
      find any error in my code. Have I forget some configurations?



      Thanks

      Marcus Moser
    • Show all 4 messages in this topic