3 Replies Latest reply on Oct 1, 2018 2:26 AM by nsha

    PSoC 5LP  . I2C Is giving negative ACK  , coudn't find where is the issue .

    mathewbasil22_3691606

      Below ref  code as psoc 101 video series

       

       

      #include "project.h"

       

      int main(void)

      {

        

        uint8 compare =0 ;

          uint8 i2cbuf[1];

                i2cbuf[0] = 0 ;

       

         CyGlobalIntEnable; /* Enable global interrupts. */

         PWM_1_Start();

         EZI2C_1_Start();

       

         EZI2C_1_SetBuffer1(1,1,i2cbuf);

       

              for(;;)

             {

               if ( compare !=  i2cbuf[0])

                      {

                          compare = i2cbuf[0];

                          PWM_1_WriteCompare(compare);

                      }

           

              }

      }

       

       

      /* [] END OF FILE */