05 pt cruiser rough idle

I have an 05 pt cruiser that idles rough sporatically. Sometimes it idles smooth, sometimes it is rough but will calmndown when i shift into gear, and sometimes it is rough when i let off the gas and come to a stop sign. When i first crank the car, the idle is rough and will act like it wants to cut out when i first back out of the drive way, but it clears up and drives better after getting gas. I have changed the plugs and wires, which did help, but there is something else still causing some problems. When at cruising speed, you cant detect any stutters or other problems. I looke at the vacuum lines and have a bottle of injector cleaner on 3 tanks of gas back to back with no apparent change. What am i missing? I did put a PCM on it a few years back, is it possible it has gone bad? The gas milage also has seem to be suffering. I also checked the air filter as a possible problem, but it is very clean.

@redneckredz

Is/was the check engine light on . . . ?!

If so, what fault codes do/did you have?

After telling us what codes you have, I would thoroughly clean the throttle body and the idle air control valve

By the way, why did you replace the PCM . . . ?

No engine codes at all. I changed it a few years back because it had over 150000 miles and figured it was due.

If the maf is dirty it will cause rough idle. Also, dirty iac and intake will cause it.

If it idles poorly but runs ok at higher speeds, a vacuum leak can cause that. You get a too-lean mixture at low speeds, but at higher speeds, going uphill, etc, the vacuum leak is such a small percent of the total amount of air being drawn into the engine, the symptom disappears.

Suggest a complete vacuum system check-up. This includes looking for loose or broken fittings, and checking all the vacuum operated components for internal diaphragm leaks.

Well, after getting the car out of the body shop after hitting a deer, the idle problem has strangely enough left as mysteriously as it started.

No engine codes at all. I changed it a few years back because it had over 150000 miles and figured it was due. …That is the strangest thing I ever heard.