- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Everybody
We are trying to use our first touch starter kit to make a self balancing robot. But it seems that the system won't let us use two custom build clock driven ISRs in the same time? Has anyone in here expirienced some similar problems, or does anyone know a solution?
Best Regards
Anders
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think it should work - in a recent project I had 2 ISRr trigger by timer components (one with 10Hz and the other one with 1000Hz). What do you want to do exactly?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no such restriction. As a rule of thumb:
Declare your interrupt handlers with CY_ISR_PROTO() and define them with CY_ISR() macros. Both explained in short in the System Reference Guide (Help -> Documentation -> System Reference ->)
Use isr_StartEx() to tell which handler will use which isr.
Keep the handlers short, no output to LCD, do not wait for anything.
Since you are going to program a closed loop (PID) you'll need a (relatively) constant time-base (20 to 50 ms) get the 3 values of the on-board accellerometer and call your PID-function.
Bob