What could cause my engine to run rough at idle and lack power pulling away. on 2003 Mazda Protege

Okay, about a month ago I was driving to the store when the electrics started acting up. Every time I braked the speedometer would surge. About a mile later my car completely died. The lights would still work, but the engine wouldn't even crank. Wouldn't jump, had to hook it up to a battery charger and once it was taken off the charger, the battery light would come on. So I got a new alternator and had to wait a few weeks for my friend who's a mechanic to swap it out. That happened this weekend, also changed the alternator belt and accessory belt at this time. The car started and ran fine fine, no lights on the dashboard. However, every so often when I stopped at a stop sign the engine would idle at about 500 rpm, and sound very rough. After about 10 seconds it would go up to about 1500 rpm and sound fine. The second day had the same problem after the car warmed up a little bit. Then that night not only would the idle get very rough, but pulling away from a stop sometimes, there would be almost no power, until the revs hit 3000 and then it would hit in a surge. Finally as I was about a mile away from home the Check engine light came on, and twice it would flash 3 times and then go back to steady on. Since then I have not driven it. I started it once, idle was stable at 2000 rpm and the check engine light was stable.

by in Indianapolis, IN on February 06, 2013
Get Your Car Fixed at a RepairPal Certified Shop.
We certify shops based on expertise, quality work, and verified customer reviews
2 answers 2 comments
ANSWER by , February 06, 2013
scan codes poss misfire codes. the flashing light means the misfires could cause catt damage
COMMENT by , February 07, 2013
Just scanned for codes and received P0300
COMMENT by , February 07, 2013
get prof diag and est
ANSWER by , December 09, 2013
I'm having similar issues with my Mazda Protege...just wondering if you ever figured this out? Thanks!