Dear Team,
I am new to Stepper Motors!! From Firmware perspective, we have stepper motor control using GPIOs logic. Plan to move SPI based stepper motor driver (DRV8823). My requirement is to move the stepper motor in specific direction and number of steps (HALF STEPS) . Using GPIOs, we have a sequence provided like {0x01,0x03,0x02,0x06,0x04,0x0c,0x08,0x09} - 8 half steps and on regular intervals, these values are given to GPIOs step by step. Using software logic, controlling the direction and moving to number of steps. To achieve the same using DRV8823, i am bit confused.
By looking in to DRV8823 data sheet, i have understood that
Take AB stepper motor - AENBL/BENBL is to enable the bridge A and B (by passing current), APHASE/BPHASE is to control direction, A10,A11,A12/B10,B11,B12 are using to control the current.
In order to achieve the same control as GPIOs, as below sequence - what to do for DRV8823. I mean how to control direction, steps using ENBL, PHASE and AXX. I am clear that PHASE is used for direction. Do we need to change only ENBL?
Half Mode Sequence | ||||
---|---|---|---|---|
Step | A | B | A\ | B\ |
0 | 1 | 1 | 0 | 0 |
1 | 0 | 1 | 0 | 0 |
2 | 0 | 1 | 1 | 0 |
3 | 0 | 0 | 1 | 0 |
4 | 0 | 0 | 1 | 1 |
5 | 0 | 0 | 0 | 1 |
6 | 1 | 0 | 0 | 1 |
7 | 1 | 0 | 0 | 0 |