Quote:
Originally Posted by Mark McLeod
I dropped what you described into a (almost) default project and didn't see the major jump in CPU utilization that you got.
Sounds like other code cross influences may be at work.
|
I'm beginning to think that as well. Finding it will be the challenge.
Quote:
Originally Posted by Alan Anderson
It is possible to set up the switch to trigger an interrupt. However, I wouldn't try that until every other option is exhausted. Normally one wouldn't want to do actual motor control in an interrupt service routine.
|
Exactly. I definitely don't want to be doing much in an ISR. ISR's need short and sweet. Learned that lesson a long long time ago.
Quote:
Originally Posted by Alan Anderson
What you're doing shouldn't give you what you're getting. Something else is going on here. To start with, can you show us the loop that pegs the CPU?
|
I agree, which is why I'm so puzzled by this. I'll post loop later when I have access to it. It's really simple and straight forward, but another pair of eyes never hurts. It's got to be something else, something I'm not seeing, something I'm missing.
Quote:
Originally Posted by chris.boyle
Replace the tunnels into the loop with Shift Registers. This will help if there are any errors found during any loop. Without them, the code has to find the errors every loop.
|
Interesting idea, not something I want to resort to. I'd much rather isolate, identify and fix it.
Thanks everyone for your input and advice. Time to delve deeper, cross "T's" dot "I's" and make sure there isn't something stupid, which there probably is.