0 Replies Latest reply on Aug 18, 2017 3:42 PM by user_349997642

    I2C/GPIO multiplexing

    user_349997642

      I'm trying to multiplex GPIO pin functionality with an I2C master, and I can't seem to get it to work as an output.

         

      I can make the pin an input and read it; if I disconnect the I2C module on the schematic from the pin, the pin works just fine, so I know my hardware is good.

         

      Here's my code:

         

      int main()

         

      {

         

          uint8_t temp = A4_BYP;

         

          temp = temp & 0xFE;

         

          A4_BYP = temp;

         

          A4_SetDriveMode(A4_DM_STRONG);

         

          A4_Write(0);

         

          for(;;)

         

          {

         

              A4_Write(1);

         

              CyDelay(500);

         

              A4_Write(0);

         

              CyDelay(500);

         

          }

         

      }

         

      Any ideas?

         

       

         

      Mike