Thank you. I am using Port Manipulation to run the LED's. I need to make a very simple array where one LED turns on and the previous turns off, then the next one turns on and the previous off (something like a shooting star or a knight rider). With Port Manipulation I've been able to clean my code however I have never tested it with more than 20 LED's.
Analog inputs 0 - 5 can be used as digital pins 14 - 19.
I don't understand what your code is doing, nor do I ever see you set the output values for port C pins (this is the port that has the analog inputs on it).
... maybe pinMode() isn't designed to work on the analog pins
I guess you could try puttingPORTC = 0;in your setup() function and see if that fixes the problem.
You literally tried:PORTC = 0;?