Problem interfacing ArduinoMega-2560 with laptop

Im using Arduino Mega 2560 and it was working fine. I tried to energize a relay coil of 5V using a digital output pin of Arduino and a ground pin, it worked and after a minute i disconnected the arduino. Later when i tried to upload new MATLAB model, laptop could not recognise the board..i could not even see it in the device manager.

But the power ON LED and the LED near 13th pin are working when I connect board using USB and also the last program which was burnt on the board is still there , running fine.

What could be the problem? Operating system is Windows7.

Unless the relay was VERY small and has a snubbing diode it may have fried a pin. Which pin did you use? If it was 0 or 1 you may have damaged one of the two pins used for serial I/O.

Sir, Thank You for your response. Yes Sir, a current 0f 80mA might have flown for a minute before I disconnected it from the circuit.

The pin I used was Digital I/O pin 22 and a ground pin and still I am getting output from that pin and the remaining pins which I used are still giving outputs as per my program which was last burnt on the board.

I could not figure the problem of why the board is not getting recognised by computer. If serial I/O has damaged , any chance to get it work fine? Or should I buy another Arduino?

Sounds like something has gone wrong with the firmware on the ATmega8u2 used as the USB-to-Serial converter. Here are the instructions for refreshing that firmware:

http://arduino.cc/en/Hacking/DFUProgramming8U2

Sir I have gone through the link you suggested. But, to update/check the firmware, I could not find the board in the device manager. When it was fine, Port -COM42 was my Arduino's port . Now it is not being shown in the device manager.

vishnuX: Sir I have gone through the link you suggested. But, to update/check the firmware, I could not find the board in the device manager. When it was fine, Port -COM42 was my Arduino's port . Now it is not being shown in the device manager.

At what step in the instructions did you look for and fail to find the Arduino in Device Manager?

Sir, Since the beginning (for the past two days) itself , I could not find it in the device manager. But the previous code is still running and When i connect the board through USB, power light turns ON and the LED at 13th pin also turns ON but I cannot find it in the device manager ports...

I installed the flip software and tried to download the firmware hex file but an error, "Atlibusbduf.dll missing "is coming! but the file usb_duf.inf file is there in the flip/usb folder.