cancel
Showing results for 
Search instead for 
Did you mean: 

L6472 - Fixed Point Registers

Nathan Coon
Associate II
Posted on June 22, 2016 at 00:19

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.

#l6472 #register #fixed-point
2 REPLIES 2
Nathan Coon
Associate II
Posted on June 22, 2016 at 22:49

Never mind I realized that I don't need to pay attention to what it says about fixed point.  I just need to use the equation.

Kristof K
Associate
Posted on April 03, 2018 at 12:04

The speed register you can only read, writing is not allowed. If you want to move a stepper, you can use RUN with a specified speed & direction (speed should be between min and max speed, these registers you can change), or MOVE with a specified amount of steps, or moving to an absolute position...read datasheet carefully. For code examples see manufacturer website. Otherwise, you don't have to use fixed-point numbers, only the given equations, as you mentioned.