LED on PIN 13 is not glowing

Hello Everyone, I am using Arduino ATMEGA 8 board on laptop installed with Windows 7. When I connect my board with USB cable, the green LED on Pin 13 does not turn on and neither it flashes during uploading of code.Besides the following error message is shown in the IDE while uploading: avrdude: stk500_getsync(): not in sync: resp=0x00 avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51 Please help me out.

did you select the right board in the IDE?

Put it another way, you did not select the right board.

I have the selected the right board in the IDE. On pressing the reset button the LED does not even flash once.

Why would digital pin 13 glow when you are using the serial interface?

Perhaps the OP is expecting something that isn’t true. The LED connected to pin 13 only blinks when a) it’s a brand new board with just the bootloaded installed and you haven’t done anything else on it, or b) you loaded a sketch that tells pin 13 to go high/low at specific intervals, or b) the board is being programmed through SPI, or c) it’s sending SPI data out (since pin 13 is also the CLK pin.) (I’m sure there are other cases which I’m forgetting.)

When you first buy a board and connect it the first time, that LED blinks because that’s the sketch that’s preloaded on the board that’s running and blinking it. As soon as you load up something else, that behavior changes. If there absolutely nothing on that Atmega chip, then you can’t expect it to actually do something with pin 13 (or any other pin for that matter.)

Now since you’re getting errors when you attempt to upload something, that tells me it’s not communicating properly with that board. And the reasons for that can be several, which you will have to diagnose and figure out, step by step, by eliminating the different variables, one of which is whether you have selected the proper board in the IDE. You said you did, but you don’t tell us WHICH one you picked. That doesn’t help. Who’s to say what you picked isn’t correct even though you think it is?