PSOC6 in Creator 4.3 - missing logic gates

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
RiTa_288331
Level 2
Level 2
10 replies posted 10 questions asked 5 replies posted

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?

0 Likes
1 Solution
RodolfoGL
Employee
Employee
250 solutions authored 250 sign-ins 5 comments on KBA

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.

View solution in original post

3 Replies
lock attach
Attachments are accessible only for community members.
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

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

0 Likes
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

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

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
RodolfoGL
Employee
Employee
250 solutions authored 250 sign-ins 5 comments on KBA

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.