This is the source of the application note from microchip AN1078
/* End speed converted to fit the startup ramp */
#define END_SPEED (END_SPEED_RPM * NOPOLESPAIRS * LOOPTIME_SEC * 65536 / 60.0)*1024
The formula looks like speed = 60 * f / p; One limited question generally why do we multiply with 65536 and then with 1024?
For example if i have total of 360Degrees to convert uint16 that is 65536, then i do for example 180Degrees as 180/360*65536 = 32768. Is my understanding correct? Similarly why to multiply with 1024?
/* End speed converted to fit the startup ramp */
#define END_SPEED (END_SPEED_RPM * NOPOLESPAIRS * LOOPTIME_SEC * 65536 / 60.0)*1024
The formula looks like speed = 60 * f / p; One limited question generally why do we multiply with 65536 and then with 1024?
For example if i have total of 360Degrees to convert uint16 that is 65536, then i do for example 180Degrees as 180/360*65536 = 32768. Is my understanding correct? Similarly why to multiply with 1024?