SLVA416A September   2010  – September 2021 DRV8424 , DRV8812 , DRV8813 , DRV8818

 

  1.   Trademarks
  2. 1Introduction
  3. 2Full Step vs. Microstep
    1. 2.1 The Full Step
    2. 2.2 The Micro Step
  4. 3Application Block Diagram
    1. 3.1 Microstepping Indexer
    2. 3.2 Microcontroller Side Control Signals
    3. 3.3 Microstepping Engine Algorithm
  5. 4Example Plots
  6. 5Revision History

Microstepping Indexer

At the heart of our microstep generation engine is a look-up table that houses up to eight waveforms, In reality, the MSP430F1612 has enough space to hold much more than eight tables, but for this application note and demonstration purposes, eight tables seemed enough.

Each one of these look-up tables is 512 steps deep. Which waveform table is selected is a factor of the three WFS bits.

To generate a step, two values are read from the table and loaded into the DAC registers. For PHASE A to be 90 degrees out of phase with regards to PHASE B, each table item read is located on addresses 256 steps apart from each other (when on 256 microsteps mode). Whether PHASE A lags or leads B depends on the DIR bit. For Clockwise, we chose PHASE A leads B, while for counter clockwise, PHASE A lags PHASE B was chosen. This is totally arbitrary and either way is perfectly acceptable as long as the motor is wired accordingly.

GUID-EE77F5C4-B2DB-4DB8-AF2A-13C6F8EB68CB-low.gifFigure 3-2 Microstepping Indexer

Every time a STEP is issued, a counter is incremented. This counter becomes a pointer to the look-up table. The counter is incremented by 1 if on the highest resolution setting. In this case, maximum degrees of microstepping is obtained. However, to obtain less degrees of microstepping, there is no need to have a smaller look up table as the same large look up table suffices.

To obtain lesser degrees of microstepping, the counter is incremented by a larger factor, that must be base 2. Per example, to obtain 256 degrees of microstepping, the incrementing value is 1 and to obtain 128 degrees of microstepping, the incrementing factor is 2. Subsequent multiplications of 2 for the incrementing factor, take the microstepping degrees down to half of what they were before.

The Index Increment is a factor of the USMx bits. With three bits we have up to 8 different combinations. In this case, the indexer can operate with half step, quad step as well as 8, 16, 32, 64, 128, 256 degrees of microstepping, as depicted in Table 3-1.

Table 3-1 Microstepping Operation
Degrees of Microstepping Divider Factor
(Lookup Table Index Increment)
256 1
128 2
64 4
32 8
16 16
8 32
4 64
2 128