After the battery is disconnected, the PCM needs to relearn and I believe this is the problem you are facing.
This pronblem would be prolonged if the idle control system is not working as well as it should. If you clean the throttle body and IAC, the problem should go away much faster.
You would need to test the alternator charging as well since the battery died while the engine was running.
Monday, September 24th, 2012 AT 4:11 PM