Sunday, March 09, 2008
Digging into the 18F4550
You can also run the USB module and the CPU at different speeds, which lets you do high speed USB comms with a low speed CPU. I guess that's handy, too, though how escapes me. I have a natural tendency to run electronics and most machinery as fast as I can make it go. That's just a personality trait of mine, I guess.
Anyhow, I was able to get the servicing of the USB comms done with interrupts which left the vast majority of CPU cycles free to run the stepper. Once I did that I was able to get some respectable stepper speeds out of it.
(Read the whole story)
The usual reason you run microprocessors at slower speeds is they consume less power.
Most power is lost during a switching transition High to Lo or vice versa.
Because it takes a finite time to achieve and during that period the circuitry is effectively operating as if analogue and gets warm.
Square waves really aren't there more like trapezoidal with glitches and ringing.
Less cycles equals less transitions equals less power consumed.
In your case you are right to run it flat out, as your equipment isn't battery powered and you want performance over power saving.
Folk who battery power stuff though and want the best power saving over performance go in for modulating the clock speeds and using sleep cycles to get the battery life up to something useful.
Links to this post: