- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
How do I get the logic gates back?
Solved! Go to Solution.
- Labels:
-
PSoC Creator Software
- Tags:
- logic gates
- psoc6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
input config 1 (make it as pull-up)
Set interrupt to "Falling edge" in the "Input" tab of the pin
pins
Note: I used SW2 to emulate ADC_BUSY
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.