AnsweredAssumed Answered

L6472 - Fixed Point Registers

Question asked by Nathan Coon on Jun 22, 2016
Latest reply on Apr 3, 2018 by Kristof K
I am trying to find the correct value to send to the speed register. The manual says:
The SPEED register contains the current motor speed, expressed in step/tick (format
unsigned fixed point 0.28).
In order to convert the SPEED value in step/s the following formula can be used:
Equation 1

[steps/s] = (SPEED * 2^-28)/tick

where SPEED is the integer number stored in the register and tick is 250 ns.
The available range is from 0 to 15625 step/s with a resolution of 0.015 step/s.

Lets say I want to go 15000steps/s.  Using the above equation I find that SPEED = 1006632.

My question now is what do I do with the fixed point value given.  I think that I multiply the above value by .28 to get 281856 and send it to the L6472 chip, but I am not sure.

Outcomes