Post by tegwyntwmffat on Jul 11, 2018 12:09:13 GMT
An easy question for you guys ………
I'm running a CNC machine and controlling it with TC275 and it works fine as long as I remember to turn the motor drivers on AFTER the TC275. If I forget, then the motors run like crazy for a second or so before the pins on the TC275 stop floating about.
I figured that instead of using the 'INPUT_PULLUP' command eg pinMode(2, INPUT_PULLUP);I should solder some resistors into the circuit, permanently pulling the relevant pins up to 5V. Then just use:
When coming out of reset, the TC275 IO pins are all set to input with a weak pull-up. These will float until you set them to outputs. Adding some 4k7 pull-up resistors to the pins should fix the problem. You do not need to change to pinMode(2, INPUT) but it will not cause any harm.
One other thing you could try is to put pinMode(2, OUTPUT); digitalWrite(2, HIGH); in the setup1(). Core1 and Core2 get started much more quickly than core0 as the latter has to initialise the Arduino run time environment, which takes 500ms or so. This would still cause the motors to move but not for more than a few tens of milliseconds.