teemuatlut / TMC2130Stepper

Arduino library for Trinamic TMC2130 Stepper driver
MIT License
159 stars 50 forks source link

Write only wiring for set up #24

Closed jeffeb3 closed 6 years ago

jeffeb3 commented 6 years ago

Feature request: Is it possible to have an intermediate setup with the CS, CLK, and MOSI connected between all the drivers, and set them up exactly the same? Specifically enabling stallguard, setting them all to a certain current setting and enabling the mode? I'm really liking these, but I wonder if the number of pins required for two way comms is going to eliminate a lot of possible uses. I'm thinking specifically of Marlin, but wanted to bother you here instead, because I bet this library will need some edits.

teemuatlut commented 6 years ago

Actually it wouldn't need many if any changes to the library. Currently the only write command that also includes a read command is void rms_current (and therefore also void setCurrent). So if you wire all the pins in parallel and don't use any read commands the library won't have any hint that it's talking to more than just one driver. Changes would be needed for Marlin though as it does have some read commands in the setup routine.

However, this is a bit too niche for me to spend time on it and I think saving a few pins but losing read communication to the drivers is not good trade.