??? 12/29/05 19:59 Read: times |
#106190 - everything depends Responding to: ???'s previous message |
Do you mean to say there is no way to reliably extend the PCA if my ISR is not top priority?
everything depends. However, when you let some other ISR take response time away you increase the chance dramatically. How fast is your serial that you need to run it at HP. Do remember that for an ISR only One thing count: KISS (Keep It Short and Sweet) A thing like a 32 bit subtract PCA2LongDelta.L = PCA2Long.L - PCA2LongOld.Lcan easily eat up 100-200 cycles of processor time, just have a look at the generated assembler. Try to get away from the 'longs', if you have to have 16 bits and a bitflag saying "really it's 17" so be it, but going for 16 instead of 32 may very well cure your problems. Another possibility would be to process all of it outside the ISR. Just let the ISR save the values. Then, of course you will need to be careful with atomicity. Erik |
Topic | Author | Date |
PCA extension | 01/01/70 00:00 | |
is this what you mean | 01/01/70 00:00 | |
a major boo-boo | 01/01/70 00:00 | |
Still trying. | 01/01/70 00:00 | |
Use Tags | 01/01/70 00:00 | |
tags? | 01/01/70 00:00 | |
Look Below | 01/01/70 00:00 | |
that will make it erratic any time | 01/01/70 00:00 | |
Is there any way.....? | 01/01/70 00:00 | |
everything depends | 01/01/70 00:00 | |
Hm, sounding like there is no clean fix | 01/01/70 00:00 | |
Hold flags | 01/01/70 00:00 | |
I fixed it, sort of......![]() | 01/01/70 00:00 | |
Compiler | 01/01/70 00:00 | |
should not be t he problem | 01/01/70 00:00 | |
sketching an idea | 01/01/70 00:00 |