- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I am a beginner with PSoC 1. Having gone through many app note, i tried my first ever project in PSoC. My aim was to toggle an LED every 1s. Maximum possible configuration ( Vc1 divider= 16, vc2 divider= 16, vc3 (sourced by Vc2) =256 and timer period = 256) gave me 0.6 s . Since it is perceptible i continued as such. In my power Psoc board an LED is connected to P1_5 . I configured those pins (initial value as 1) . when i programmed the Psoc my led kept on glowing(remaining in its inital value assigned) no toggling. I have checked for declaration of interrupts and all. I couldnt find more mistakes with my knowledge.
I have attached my project.
Kindly help
Thanks,
Sundar
- Labels:
-
PSoC 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I cannot see your attachment yet. Build -> Clean project, then Zip (NOT RAW) the folder and upload it here.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sorry my connection is a bit slow...
I have attached it now
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have problem with attaching my file :(..
Now i am trying again....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you are using ISRs make sure you modify boot.tpl file in your root project
directory.
Some useful references on setting up ISRs -
If you added ISR driven code, a couple of rules of thumb -
1) Do not make f() calls from within ISR unless you cannot avoid it. That
is because compiler will do a ton of saves, like full stack, etc. to make sure
it can return fully and properly. That in turn slows machine down considerably.
Look at your listing file to see what the compiler does with your ISR code.
2) Best practice is simple, set a flag inside ISR and return to main() to process ISR.
3) Set up ISR to "fire" as infrequently as possible. If you only need ISR at a low rate,
don't "oversample" it, that would be just a waste of MIPS.
4) Look at coding. If you have multiple ISRs, is there any ISR that can essentially
negate the need to process another pending ISR, eg. compute not when not
needed. If you have an ISR that needs a lot of MIPs occasionally, you can always
skip another pending ISR if by doing so nothing terrible happens.
5) If list file shows compiler generating wacky stuff, consider ASM for the ISR
routine.
6) Turn off optimization when first debugging ISRs, then look at it again after
optimization turned back on, to make sure compiler did not "optimize" in some
crazy jump or other unnecessary code.
7) If display issues are affected, jitter, etc.., consider creating a display buffer in
RAM. And when a write is needed first check if RAM already displaying what you
want, if so do nothing, or update RAM and write to display if needed. This some-
times can cure ISR driven display update issues.
http://www.cypress.com/?id=4&rID=36720
http://www.planetpsoc.com/component/content/article/43-writing-a-c-isr.html
http://www.planetpsoc.com/psoc1-articles-digital/13-basics-of-psoc-gpio.html?start=7
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just solved a similar project here http://www.psocdeveloper.com/forums/viewtopic.php?f=3&t=8695 , maybe this can help you.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Don't use Google Chrome to attach files. Try a different browser.