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

52RE : [ADuC_ARM] I²C Configuration

Expand Messages
  • Jean-Marc ROUXEL
    May 10, 2006
    • 0 Attachment

      Hello,

       

      I think you forgot the send of data (I2C1MTX register) just after the I2C1ADR.

       

      I send you a document from AD on the I2C bus.

       

      Jean-Marc

       

       

      -----Message d'origine-----
      De : ADuC_ARM@yahoogroups.com [mailto:ADuC_ARM@yahoogroups.com] De la part de marcusmoser81
      Envoyé : mardi 9 mai 2006 13:23
      À : ADuC_ARM@yahoogroups.com
      Objet : [ADuC_ARM] I²C Configuration

       


      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