4 Replies Latest reply on Aug 3, 2020 4:41 AM by OsFe_2822791

    How to assign pins to 3 opamps in PsoC 4

    OsFe_2822791

      Hello,

       

      I am using the CY8CKIT-044 kit and I need to use 3 opamps with external inputs and outputs but I don´t know how to assign the pins.

       

      I am using opamp1 like a follower and I´ve asigned P5[3] for the output and P5[5] for the input.

       

      opamp2 is a operational amplifier with P1[1] and P1[0] as inputs and P1[2] as output but I can´t define the pins for opamp3 because there aren´t external pins in the protoboard in my kit for the pins P5[0]-P5[1]-P1[4]-P1[5] and P1[6]. Does anyone know how to route the opamp3 in my case?

       

      Thank you.

      Regards.

        • 1. Re: How to assign pins to 3 opamps in PsoC 4
          MoTa_728816

          Hi,

           

          First of all, let me apologize.

           

          Although I wrote

          > So I think that maximum opamps which can be used with CY8CKIT-044 is 4.

          in the discussion below

          CYCKIT-044 Opamps

           

          Seeing the annotation of /odissey1-san,

          we have only 2 free opeamps in CY8CKIT-044

          which we can use without modifying the board.

          free: P1[2], P1[1], P1[0]

          free: P5[3], P5[5]

          used: P1[3], P1[4], P1[5] (PWM Temp Sensor)

          used: P5[2], P5[0], P5[1] (Ambient Light Sensor)

           

          Probably getting CY8CKIT-043, which has same PSoC 4 and use it will be safer.

          https://www.cypress.com/documentation/development-kitsboards/cy8ckit-043-psoc-4-m-series-prototyping-kit

           

          But if you MUST use CY8CKIT-044, and if you don't mind modifying the board.

           

          Note: From here you need to proceed at your own risk.

           

          Removing PWM Temp Sensor U1

          and use P1[4] and P1[5] from there will allow you to use the third opamp.

          000-schematic.JPG

           

          moto

          • 2. Re: How to assign pins to 3 opamps in PsoC 4
            OsFe_2822791

            Hi Moto,

             

            Thanks for your reply, I was a little confused assigning the pins. What if I use opamp1 and opamp2 with external inputs and outputs and opamp3 only with internal ones? Or are there two opamps with dedicated uses and it is not possible to use them unless we remove the breadboard components?

             

            Thank you,

            regards.

            • 3. Re: How to assign pins to 3 opamps in PsoC 4
              MoTa_728816

              Dear OsFe-san,

               

              So I tried a few experiments.

               

              So far, I could find 2 successful cases.

              (1) Using P1[4] and P1[5] which requires the modification to the board (opamp_test_200802B)

              (2) Limit I/O of an opamp (Opamp_1) only internal (opamp_test_200802C)

               

              So the good news is as you expected, if we limit I/O of one of opamps, we can fit it without modifying the board.

              But the bad news (or what we must be careful) is that the flexibility of the internal only opamp seems to be very limited.

              So I wonder if your requirement fits in this model.

               

              (1) Using P1[4] and P1[5] which requires the modification to the board (opamp_test_200802B)

              schematic

              010-schematic.JPG

              pins

              011-pins.JPG

               

              (2) Limit I/O of an opamp (Opamp_1) only internal (opamp_test_200802C)

              schematic

              020-schematic.JPG

              pins

              021-pins.JPG

               

              main.c for both (compile test only)

              =========================

              #include "project.h"

               

               

              int main(void)

              {

                  CyGlobalIntEnable; /* Enable global interrupts. */

                  UART_Start() ;

                  ADC_Start() ;

               

                  Opamp_0_Start() ;

                  Opamp_1_Start() ;

                  Opamp_2_Start() ;

                  Opamp_3_Start() ;

               

                  for(;;)

                  {

                      /* Place your application code here. */

                  }

              }

              =========================

               

              Best Regards,

              2-Aug-2020

              Motoo Tanaka

              1 of 1 people found this helpful
              • 4. Re: How to assign pins to 3 opamps in PsoC 4
                OsFe_2822791

                Hello Moto,

                 

                that's really useful, you're right. Thank you for spending your time testing this.

                 

                Regards.