Hi Prilade:
Definitely yes ... Go get him tiger

ATMEGA644-20PU is a killer .
thanks for answering My first question ...
Now ... I'm already smiling because I know the answer ...
prilad wrote:Suppose we have a 12V motor and H-bridge and 12V power supply. In this case:
0% PWM is mean 0V on the motor.
100% PWM - 12V on the motor,
50% PWM - 6V on the motor.
And it does not depend from 8-bit or 10-bit PWM.

but that depends on the bit PWM? Only accuracy of Voltage regulation. With 10-bit PWM you can setup motor Voltage with min. step = 12 mV ( 1/1024 of full Voltage range). With 8-bit PWM min. step = 48 mV (1/256 ).
With the above example I just want to prove that 8-bit PWM is better than 10-bit in motor drive point of view ... Here is how :Note : To avoid mixing papers and you Prilad know that little peace of info ...
Increasing the feed back resolution value to what ever it's maximum Is a very very good design basic principle using a very good feedback sensor ...
but this may cause the position overshooting problem for the motor ... This is not your problem ...
That is considered under a mechanical problem not PID with a various easy stabilization solutions even with a little peace of wood, rubber, or a spring,... , up to a motor break and many many things ... trust me on this.
Now In your above example ... slowly consider a changing PWM from value% to the next value+1% until 100% PWM ... one% at a time .-That is in a 10-bit PWM ... the step up voltage will be small so we need 1024 steps to reach the top speed [smooth speed rise up ] ... and in a 8-bit PWM we need only 256 steps to reach the top speed [rough speed rise up ] ... obviously now the step in 8-bit is wider by 4 times the step in 10-bit ... on this point ... every one will say 10-bit is better than 8-bit ... No and No and ... NO .
"why is that ?" every one says ...
I say :
Because you didn't ask what is the real time for each step in both cases 8 and 10 and what is the benefits taken from wider steps when starting a motor .
Because in each step the motor controller is loosing power as heat connecting and disconnecting your motor from the power to give you that momentary voltage step ...
Because these steps are not real steps in motor voltage ... they are On's and Off's which is combined together to give you a RMS summery of let's say 4 of these 10-bit steps to give
48mv voltage variant the same as 8-bit single step do ... which is
really NOTHING to 12v motor point of view ... with near zero motor speed difference ... plus that the magnetic field build up in coils has been interrupted four times by now for nothing ... Why is that ?
Because when I'm in Italy and I want to send a message to France ... I can't see Eiffel Tower ... to get the message to France ... I may talk easily with 256 people the size of Eiffel Tower ... but I'll be dead after talking to All these people under the Eiffel Tower for every one to get my message ...
"why is that" every one says again ...
I say :
I'm out of here ... @ Prilad ...I suggest using a 4-bit PWM "if there is any" to give the motor enough chance to build the magnetic field and respond to your command without breaking it down on purpose killing it before it starts ... [ Motor inertia ]
Really thanks Prilad for giving us that
magnificent Russian FW that changes the KP, KI, KD, ... to give us variety of motion controlling solutions ...
with the best of the best regards ...
spe

edy