Thanks dannyf for instant reply.
But forget about LED blinking, if i just write a code to glow led,it works properly in debug mode but when i download code in controller it hangs n all leds glow with very low intensity. So what could be the problem that a controller works properly in debug but not in run mode. could it something about clock or bootloader?