3 Replies Latest reply on Jun 15, 2020 9:16 PM by RodolfoG_11

    PSOC6 in Creator 4.3 - missing logic gates

    RiTa_288331

      Greatings All!

       

      Using a PSOC6 (BLE Pioneer kit) for BLDC control.  I want the PSOC to generate an interrupt when the external "ADC_BUSY" pin goes low (I.E. "interrupt on negative edge").  When I place an interrupt in the schematic, the only edge-triggered option that I have is rising-edge.  Normally, I would just use a logic inverter gate to fix this, but the logic gate elements seem to be missing in my IDE:

      Untitled.png

      How do I get the logic gates back?

        • 1. Re: PSOC6 in Creator 4.3 - missing logic gates
          MoTa_728816

          Hi,

           

          I'm also missing the logic gates.

           

          But if what you need is a input to interrupt setting.

          We could use following approach.

           

          NOTE: Right after posting my previous response,

          I noticed that this was PSoC6, so I replace almost every thing.

           

          schematic

          010-schematic.JPG

          input config 1 (make it as pull-up)

          002-pull-up.JPG

           

          Set interrupt to "Falling edge" in the "Input" tab of the pin

          001-interrupt.JPG

          pins

          Note: I used SW2 to emulate ADC_BUSY

          011-pins.JPG

           

          main.c

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

          #include "project.h"

           

          volatile int int_flag = 0 ;

           

          void GPIOPortIntHandler(void)

          {

              Cy_GPIO_ClearInterrupt(ADC_BUSY_PORT, ADC_BUSY_NUM) ;

              int_flag = 1 ;

          }

           

          int main(void)

          {

              cy_en_sysint_status_t status ;

              int led_mode = 0 ;

             

              __enable_irq(); /* Enable global interrupts. */

           

              status = Cy_SysInt_Init(&SysInt_1_cfg, GPIOPortIntHandler);

              NVIC_ClearPendingIRQ(SysInt_1_cfg.intrSrc);

              NVIC_EnableIRQ(SysInt_1_cfg.intrSrc) ;

             

              for(;;)

              {

                  if (int_flag) {

                      int_flag = 0 ;

                      if (led_mode) {

                          led_mode = 0 ;

                          Cy_GPIO_Write(LEDB_PORT, LEDB_NUM, 0) ;

                      } else {

                          led_mode = 1 ;

                          Cy_GPIO_Write(LEDB_PORT, LEDB_NUM, 1) ;

                      }

                  }

              }

          }

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

           

          moto

          • 2. Re: PSOC6 in Creator 4.3 - missing logic gates
            LePo_1062026

            RiTa,

             

            I seem to be seeing the logic gates including the "NOT" gate.

             

            Either way, you can use the inverted "Falling edge" in the ISR component as moto pointed out or ...

            You can use the pwm_n output of the PWM component which is the inverted version of the pwm output.

             

            Len

            • 3. Re: PSOC6 in Creator 4.3 - missing logic gates
              RodolfoG_11

              To see all the missing logic gates component, go to menu Tools > Find new components. You can download all the latest components, including the missing logic gates.

              1 of 1 people found this helpful