Due to a rather complex project, I will be using all of the available pins on my Arduino Leonardo, and have some questions on using digital pin 13.
I will be using digital pins 9, 10, 11, 12, and 13 to connect a Pololu DRV 8825 stepper motor driver. All five of the pins will be configured as output pins with pinMode(pinX, OUTPUT);.
I have read that there are certain problems when using pin 13 as digital input. And similarly, if I remember correctly, digital pins 0 and 1 can't easily be used in a project involving serial communication because they become active when serial communication occurs.
I have tested my code to run the motor driver and while I've not experienced any problems in using pin 13, I wonder if there might be some issues that could affect the driving of the motor attached to the Pololu.
So, here are my questions:
Does using pin 13 as digital output present any special issues that I should be aware of?
Is a default signal ever passed to pin 13? For instance when the Arduino is connected to a USB port, is pin 13 brought high or low?
Right now, pin 13 is connected to one of the three pins that controls microstepping on the Pololu DRV 8825. As such, I have some flexibility on how the pin is used. I could write the pin permanently high or write it permanently low. To minimize any potential problems in using pin 13, would it be better to bring the pin high or bring it low?
Is there anything else I could do in code that would reduce the likelihood of problems?
For what it's worth, I have checked the voltage drawn by the Pololu and it is negligible. So, there probably won't be a problem in terms of the onboard LED (connected to pin 13) limiting power to the motor driver.