- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am making an project where I would implement a start button.
My plan was to initialize everything and the enter a while loop waiting until the button was press with code like this:
bool START=false;
main()
{
Init all
while(!START)
{ }
Program
}
And then having a interrupt changing START=true;
The problem is I can see the interrupt routine is called, but the program doesn't leave the while loop.
I have tried to turn on a LED in the interrupt routine and the read the output pin afterward but that doesn't work either.
I have isolated the problem to this archive, where i have placed an LED in port 1[7] to GND and uses Port 15[5] as button by pulling it low.
pressing the button should turn on the LED.
Any working solution for a button will be appriciated, but a fix or reason to the problem would be nice too
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I changed your program to
using your own interrupt handler
set drive mode to resistive pull up
adapted to CY8CKIT-059 using switch and blue LED
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content