'P' mode is you leave everything to the camera. If the camera detects low lighting, it will automatically slows your speed. That may results in blurred pictures. Alternatively, your D40 can set to Auto-ISO, that may boost up the speed a little for clearer picture. Don't worry about degration in quality, your D40 gives acceptable image quality at ISO1600.