- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Solved! Go to Solution.
- Labels:
-
PSoC 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
These might help -
http://www.cypress.com/?docID=41145
http://www.cypress.com/?app=forum&id=2232&rID=69585
There is an example project in the lab book - http://www.cypress.com/?docID=33243
And this - http://www.eetkorea.com/STATIC/PDF/201104/EEKOL_2011APR05_EMS_AN_01.pdf?SOURCES=DOWNLOAD
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
These might help -
http://www.cypress.com/?docID=41145
http://www.cypress.com/?app=forum&id=2232&rID=69585
There is an example project in the lab book - http://www.cypress.com/?docID=33243
And this - http://www.eetkorea.com/STATIC/PDF/201104/EEKOL_2011APR05_EMS_AN_01.pdf?SOURCES=DOWNLOAD
Regards, Dana.
- 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
- 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
PSoCs are out in the market for several years and are frequently used by us deveopers. So when you start with deveoping PSoC projects and discover that something does not behave as you expect, it will be most likely that you mis-interpreted some information in the datasheet.
I admit that interrupts, especially in PSoC1, are not just easy, but we all have managed to overcome its pitfalls. Without your porject (nicely collected in an archive by PSoC Creator as you did before) we only have the choice to guess what your problem might be.
Some hints:
I was told seriously not to connect interrupts directly to mechanical switches. Reason is that bouncing may lead to unpredictable results, so use such constructs on own risk.
There is a better way to introduce an interrupt routine than to inject it code into a generated file: there is the Isr_StartEx() function and the CY_ISR() macros, have a look into the "Sytem Reference Guide" under Creator's help.
I question your list of "No Interrupt" firing. When set to rising edge and with a pull-up internally, what should happen?
You remove the "pending" interrrupt within your ISR, but you cannot remove the cause (pressed button) of the interrupt, so it will re-occur immediately. (Rocky Horror Picture Show: "I remove the cause..... and not the symptom")
Never (ever) put delays into an interrupt service routine. You did that indirectly by calling some LCD-Functions wich use delays to perform their task.
I would suggest:
Use a simple service routine that just sets a global flag which you check in your main-loop and react on when set.
Put some thought into the scenario when a switch is pressed for several seconds
Sme for a switch bouncing several (50-100) ms.
My best experiences I got was with a different progam-structure:
An interrupt from a timer (about 10 ms) checks for changes on the input - pins and sets a flag if there.
When not time - critical the handling can be done within the isr: Count number of similar switch readings and when a treshold is met (100-200ms) assume a switch to be pressed (or released).
Thus de-bouncing is done and there is a choice to act accordingly to longer switch-presses.
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
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content