After connecting led in pin no 13 and 12 and near gnd the main board led goes off or blink several time and the another connected led not working
We need to know exactly how you have your circuit wired up. Ideally you would provide us with a schematic (picture of a hand drawn diagram is fine).
Are you using a current limiting resistor?
Sounds like you are not using one which will result in too much current being drawn from the pin and through the microcontroller which can result in a reset.