It is absolutely necessary to define the state of the Inputs and Outputs. On Reset the controller set all pins as inputs.
Give special attention as to which pins you define inputs and outputs. There are cases that pins are not only inputs but set as analog input too!
So,
1. Read with extreme attention to the details the datasheet for the MCU you use.
2. Set if any analog/comparator inputs accordingly
3. Set the pins as inputs and outputs (unused as outputs and unconnected)
Ioannis
Bookmarks