- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to use 4 buttons to generate 4 interrupts(4 pins belong to different ports), but it seems that there is a limit on the port. What should I do? thanks in advance.
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I changed the project. Mainly the external switch setup the pins and the isr component. When you use a CY8C32XXBLE you will have some more resources for creating logical gates etc. These could be used to invert the isr polarity.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome in the forum.
You may connect 4 Isr components to the pins and provide 4 different interrupt handlers using Isr_StartEx() API.
Alternatively you can use the Global Signal Reference component to get interrupted by any of the port pins. You will need to read the pins to decide which one was pressed.
I also suggest to think about how to debounce the buttons using software.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you ,Bob.
And sorry for my mistake.What I want to know is that:If 2 pins belong to the same port and both connect ISR component(separately),there will be an error:When interrupts are used, spanning is not allowed (i.e. all pins must be placed in the same physical port).How to solve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is only a common port interrupt, so you have to check which pin raised the exception.
You may connect an Isr component directly to the hw-connection of an input pin without using the port interrupt. Will that solve your problem?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I changed the project. Mainly the external switch setup the pins and the isr component. When you use a CY8C32XXBLE you will have some more resources for creating logical gates etc. These could be used to invert the isr polarity.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content