Quote:
|
Originally Posted by Jay Lundy
Let's assume 15 ft/s with 6 in diameter wheels (very fast).
That's 9.55 rev/s or 1222 cycles/s.
Should be fine.
Also, (818.1 us/cycle) / (.1 us/instruction) = 8180 instructions/cycle
Assuming your int handler takes 10 instructions, 0.122% of your instructions are devoted to 1 of your encoders.
Heh, I think I got carried away with that calculation, but I was curious myself.
|
Hmmm. I'm not going to dive into the details of this I guess, since I'm going to continue down the "pot path" for measuring the angle. But I suspect this calculation is more than a bit optimistic. (1) can you really handle the shaft encoder interrupt in about 10 instructions? (2) are all instructions one cycle with no wait states needed? (3) what about the state save/restore cost of the interrupt? I'll bet it's more like 1% than 0.1%, still not too much load if you don't have a lot of them.