Arduino Diecimila can't upload

It shows this one:
avrdude: stk500_getsync(): not in sync: resp=0x00 or
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

at the board the PWR(green light) - ok
but the light of the reset button doesn’t light(blink) after I insert the USB. The first time I use it, it usually blinks.

I use this code:

int ledPin = 13;
int sensorPin = 0;
double alpha = 0.75;
int period = 20;
double change = 0.0;
void setup()
{
pinMode(ledPin, OUTPUT);
}
void loop()
{
static double oldValue = 0;
static double oldChange = 0;
int rawValue =
analogRead(sensorPin);
double value = alpha * oldValue
+ (1 - alpha) * rawValue;
change = value - oldValue;
digitalWrite(ledPin, (change <
0.0 && oldChange > 0.0));
oldValue = value;
oldChange = change;
delay(period);
}

Please help.
Btw I am a newbie…

Btw I am using Windows XP. And before this problem occurs I am using the arduino diecimila as a supply(5v) :roll_eyes:

Dunno what to do. Please help.