@ -6,20 +6,20 @@ These devices use voltage PWMs to drive the stepper phases. Phase current is not
This software assumes that all L6470 drivers are in one SPI daisy chain.
This software assumes that all L6470 drivers are in one SPI daisy chain.
``` {.gcode}
```
The hardware setup is:
The hardware setup is:
MOSI from controller tied to SDI on the first device
MOSI from controller tied to SDI on the first device
SDO of the first device is tied to SDI of the next device
SDO of the first device is tied to SDI of the next device
SDO of the last device is tied to MISO of the controller
SDO of the last device is tied to MISO of the controller
all devices share the same SCK, SS\_PIN and RESET\_PIN
all devices share the same SCK, SS\_PIN and RESET\_PIN
Each L6470 passes the data it saw on its SDI to its neighbor on the **NEXT** SPI cycle (8 bit delay).
Each L6470 passes the data it saw on its SDI to its neighbor on the **NEXT** SPI cycle (8 bit delay).
Each L6470 acts on the **last** SPI data it saw when the SS\_PIN **goes high**.
Each L6470 acts on the **last** SPI data it saw when the SS\_PIN **goes high**.
```
```
The L6470 drivers operate in STEP\_CLOCK mode. In this mode the direction and enable are done via SPI commands and the phase currents are changed in response to step pulses (generated in the usual way).
The L6470 drivers operate in STEP\_CLOCK mode. In this mode the direction and enable are done via SPI commands and the phase currents are changed in response to step pulses (generated in the usual way).
@ -58,12 +58,12 @@ The steppers are **NOT** powered up during this sequence.
This array is used by all routines that transmit SPI data.
This array is used by all routines that transmit SPI data.
``` {.gcode}
```
Location 0 - number of drivers in chain
Location 0 - number of drivers in chain
Location 1 - axis index for first device in the chain (closest to MOSI)
Location 1 - axis index for first device in the chain (closest to MOSI)
…
...
Location N - axis index for last device in the N device long chain (closest to MISO)
Location N - axis index for last device in the N device long chain (closest to MISO)