Sunday, March 09, 2008


Digging into the 18F4550

I appear to have got this USB-enabled 18F4550 chip to to what I want it to do. It has a rather complicated pre and post scaler scheme for the clock crystal which enables you to run it at its maximum speed of 48 MHz regardless of what kind of clock crystal you use. That's VERY handy.

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.
Post a Comment

Links to this post:

Create a Link

<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to
Posts [Atom]