Digital pin 0 not working

Hi, I runned out of my digital pins on Arduino UNO, so I used pins 1 and 0. There's no serial comunication, Arduino is powered via VIN pin and it isn't connected to the computer. LED on pin 1 is working fine, but LED on pin 0 is still off. What should I do to have pin 0 working? Thanks.

You have this? pinMode (pin), OUTPUT); LED is not installed backwards? If you swap with pin 1 you can show it works?

Are there analog pins free? A0 to A5 can be used as D14 to D19.

CrossRoads: You have this? pinMode (pin), OUTPUT); LED is not installed backwards? If you swap with pin 1 you can show it works?

Are there analog pins free? A0 to A5 can be used as D14 to D19.

Yes, I have setted the pin to output. I have 3 free analog pins, but I have already made PCB, where is it made to use pin 0. It is possible to change it to use A3 instead of D0, but before I do it, I want to know, if there is way to use D0. (It will be "Arduino Breadboard" on PCB to controll huge 7-segment display using transistors, but when I was testing it on Arduino, I discovered that D0 isn't working)

And LED is installed right, when I connect it from D0 to D1, it works. When i connect LED from D1 to D0, it stops working, so there is problem with D0

Does the 328P chip feel warm or hot to the touch? That is usually a good sign of a damaged IO pin.
Can you change D0 to an input, and add a jumper to a free analog pin?

Or, change out the 328P chip. Hopefully you have it in a socket?

CrossRoads: Or, change out the 328P chip. Hopefully you have it in a socket?

Yes, it is in socket, but the new ATMega328Ps haven't arrived yet. The chip is cold, I tried disconect LEDs and Serial communication works withnout any problems. So when they arrive, I will try to change them, thanks.

And it is possible to add a jumper on the PCB, but I wanted to know if I didn't made any misteake before I do it.

Hard to suggest any more without seeing your code and the board schematic.

CrossRoads:
Hard to suggest any more without seeing your code and the board schematic.

I uploaded to Arduino blink, but changed pin 13 to 0 and it work, so there must be any misteake in my code. It is for 2-digits 7-segment display, but it is in czech, so I adden comments with translation.

const int plus = A5;      
const int minus = A3;
const int vynuluj = A0;
/*I using analog inputs to change the number, because there are no digital remaining.
A5 is to number++, A3 to number-- and A0 to number = 0
*/
int cislo = 0; //number to show on display
/*
    ---6--
   |      |
   5      1
   |      |
    --7---
   |      |
   4      2
   |      |
   ----3---
*/

//here I have declared pins for every digit
//                              1  2  3 4 5 6 7
byte Lcislo[8] = {11,10,9,5,6,7,8};
//                              1  2 3 4  5  6 7
byte Pcislo[8] = {4,3,2,12,1,0,13};

void setup()
{

  nastavcislo(Lcislo); //calls function to set pinMode on every pin
  nastavcislo(Pcislo);


  zjisticislo(); //function to show the number


  delay(1500);
}


void(* resetFunc) (void) = 0; //declared function for reset Arduino


void loop()
{

  if(analogRead(plus)>1000) //if is A5 pressed for longer than 0,5 sec, add ++1 to the number
  {
    delay(500);
    if(analogRead(plus)>1000)
    {
      cislo++;
      if(cislo >99)
      {
      cislo = 99;
      }
      zjisticislo();
      delay(500);
    }
  }


  if(analogRead(minus)>1000) //number-- if A3 is pressed for longer than 0,5 sec
  {
    delay(500);
    if(analogRead(minus)>1000)
    {   
      cislo--;
      if(cislo < 0)
      {
        cislo = 0;
      }
      zjisticislo();
      delay(500);
    }
  }

  if(analogRead(vynuluj)>1000) //if A0 is longet than2,5 sec, reset Arduino
  {
    delay(2500);
    if(analogRead(vynuluj)>1000)
    {
      resetFunc();
    }
  }
}

void zjisticislo() //this is function to "show" the digit (only discover what number on every digit)
{
    if(cislo < 10)
    {
      ukazcislo(Pcislo, cislo);
      ukazcislo(Lcislo, 10);
    }
    else if((cislo > 9 )& (cislo <100))
    {
      int desitky = (cislo - (cislo % 10))/10; 
      ukazcislo(Lcislo, desitky);
      ukazcislo(Pcislo,cislo-(desitky*10)); 
    }
    else
    {
      cislo = 0;
    }
      
    
} 


void ukazcislo(byte cislice[], int cislo) //second part of function to show the dgit
//this realy shows the digit
{
//here are declared the digits, what pin's are LOW and HIGH
  byte datasegmentu[11][8] = {
    {1,1,1,1,1,1,0},  //0
    {1,1,0,0,0,0,0},  //1
    {1,0,1,1,0,1,1},  //2
    {1,1,1,0,0,1,1},  //3
    {1,1,0,0,1,0,1},  //4
    {0,1,1,0,1,1,1},  //5
    {0,1,1,1,1,0,1},  //6
    {1,1,0,0,0,1,0},  //7
    {1,1,1,1,1,1,1},  //8
    {1,1,0,0,1,1,1},  //9
    {0,0,0,0,0,0,0},  //delete number
  };
  
  
  for (int i = 0; i < 8; i++)
  {
    digitalWrite(cislice[i], datasegmentu[cislo][i]);
  }
    
}
  
void nastavcislo(byte pincisla[]) //function for pinMode on every pin
{
  for(int i; i < 8; i++)
  {
    pinMode(pincisla[i], OUTPUT);
  }
}

I hope you understand it. When I repalce pin 0 to pin A2 and reconect it, it works, so there must be anything, that blocks the pin 0.

Thanks for your time.

Curious about these:

byte Lcislo[8] = {11,10,9,5,6,7,8}; // << elements 0 to 6
byte Pcislo[8] = {4,3,2,12,1,0,13}; // << elements 0 to 6
byte datasegmentu[11][8] = {

Why declare them as 8 elements when only 7 are populated?
And then you write to 8 elements, 0 to 7, here:

for (int i = 0; i < 8; i++)
{
digitalWrite(cislice_, datasegmentu[cislo]);_
* }*
and here:
for(int i; i < 8; i++)
* {*
_ pinMode(pincisla*, OUTPUT);
}*
I am thinking you are accessing an undefined element
Lcislo[7] = undefined pin
Pcislo[7] = undefined pin
so maybe that reverts to 0 and you are accessing the pin without realizing it._

CrossRoads: Why declare them as 8 elements when only 7 are populated?

Thanks, I changed to 7 and it works. Thanks for your time.