Beginners: please read this post and this post before posting to the forum.
0 Members and 1 Guest are viewing this topic.
I've been reading up on PWM lately, and I just need to get something cleared up. Every PWM tutorial MENTIONS resolution, but no one gives a true definition of it. Most of the tutorials ALLUDE to it I believe, but I just wanted to make sure I'm right. Also, there are zero threads on this.So, PWM resolution is how many settings you can have. For example, if you had a DC motor, and you were using 8 bit PWM (TOP=255), then you'd have 256 "speeds" at which the motor could go. Right? That's the resolution? 256? Of course, this would be way to much for a DC motor, cause how would you differentiate between 33/256 and 34/256... (Took that from the PWM tutorial on the site). So, if I am correct, then what's the best method for choosing the frequency and resolution of PWM to use... (Of course, you'd choose the TYPE of PWM first, Fast vs. Phase Correct(and Frequency Correct)) For example, should I choose the resolution I want first, then choose the frequency? Or should I choose the frequency I need, then choose the resolution I want? Those are really the two most important things in PWM right? Of course duty cycle is important, but that's going to range from 0 to 100 no matter what frequency or resolution I have. Oh, so the resolution defines how finely you can define the duty cycle... I just noticed that. Is that right?Oh, I also noticed that I have a QFN AtMega8. Holy bonkers batman that thing is tiny... And the really funny thing is.. I don't have a socket for it...