Currently an Artix-7 FPGA is used as the controller. It has a serial interface with a command width of 80 bytes.
The first byte gives the command. The command has a variable width, with a maximum length of 80 bits. Most commands just get enqueued into an internal FIFO with 64 entries.
The internal clock frequency is 20MHz.
- ramp(8'h9a,36'<acceleration>, 36'<clock count>)
For the given number of clocks increment the internal acceleration register by the value given in the command. Acceleration can also be negative.
Start the engine. All commands in the fifo will be executed.
- configure clocks/rev (8'ha3, 24'<step per revolution>)
Set number of steps for one revolution. With a 0.9deg stepper and 256 microstepping set it to 1024000. If the internal position counter reaches this value, it is reset to zero and a pulse on the REV pin is generated.
Run until the next rising edge of the home sensor. If reached, reset the internal position to 0.